Skip to content

feat: add lifecycle planning command over usage reports - #34

Merged
HaoZeke merged 2 commits into
mainfrom
feat/lifecycle
Nov 18, 2026
Merged

HaoZeke merged 2 commits into
mainfrom
feat/lifecycle

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

I added eb-keep-logs lifecycle to turn eb-keep-logs usage --json reports into a reviewable software deprecation plan and an Lmod (Lua-based environment module system) .modulerc.lua file.

Sites running EasyBuild and the European Environment for Scientific Software Installations (EESSI) need a safe way to warn users and phase out stale modules without deleting installations blindly. This command reads a Tom's Obvious Minimal Language (TOML) policy file and classifies every installed module into keep, warn, forbid-after, or candidate-remove. It never deletes software directories, modulefiles, or logs.

Before allowing candidate-remove, the command enforces two safeguards. First, the input JavaScript Object Notation (JSON) report from usage must carry a --since boundary covering at least min_observation_days up to the reference time (--now or EB_KEEP_LOGS_NOW). Second, candidate removals are checked against installed reverse dependents by invoking eb-stack rebuild-set as a subprocess (via --easyconfigs, or by reading a precomputed --rebuild-set JSON report). Modules with installed dependents or missing easyconfigs are held back from candidate-remove; modules with installed dependents stay in warn without a forbid directive so dependent modules continue to load.

When --modulerc-out is passed, the command writes the generated .modulerc.lua warnings and forbids durably via a temporary file and rename. Those forbids use forbid{} with after dates in Coordinated Universal Time and nearly_message notices, plus hide_version() on confirmed removal candidates. Passing --json emits one schema-validated JSON document (schema_version 1). I also added the lifecycle JSON Schema. I updated the Command-Line Interface (CLI) reference and COMPAT.md, and wrote a Diátaxis how-to guide. Regression tests compare existing command output to the output from before this command.

Add `eb-keep-logs lifecycle` to classify installed modules into keep, warn, forbid-after, and candidate-remove from `usage --json` output and a TOML policy, emit Lmod `.modulerc.lua` warnings and forbids without deleting files, require a minimum observation window, and check installed dependents with `eb-stack rebuild-set`.
Add the lifecycle JSON Schema, CLI reference documentation, schema validation check, README summary, and a Diataxis how-to guide for planning reversible module deprecations.
@HaoZeke
HaoZeke merged commit dd986d0 into main Nov 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant