Skip to content

Add detect-and-flag job for pending image-catalog updates#1256

Open
ideaship wants to merge 5 commits into
mainfrom
add-check-updates-job
Open

Add detect-and-flag job for pending image-catalog updates#1256
ideaship wants to merge 5 commits into
mainfrom
add-check-updates-job

Conversation

@ideaship

Copy link
Copy Markdown
Contributor

What

A scheduled, read-only job that compares the image catalog against endoflife.date and flags — in a single auto-maintained GitHub issue — supported upstream majors the catalog does not define yet, and enabled images that are past end of life.

  • contrib/check_updates.py — reads etc/images/*.yml, queries endoflife.date per distribution, and reports new majors + end-of-life images. Pure evaluation logic with a three-state exit contract (0 clean / 1 findings / 2 operational failure) and a status.txt completion sentinel written last, so a crash or fetch error can never be mistaken for "clean" (which would wrongly close the issue).
  • .github/workflows/check-updates.yml — runs weekly, reconciles one issue (label pending-image-updates) off the sentinel: create/update on findings, close when clean, and leave the issue untouched on operational failure.
  • Per-distribution EOL semantics: Debian is evaluated on extendedSupport (its free community LTS), everyone else on eol (Ubuntu's extendedSupport is paid ESM), so LTS-active Debian releases are not wrongly flagged.

Testing

  • tox -e test -- test/unit test_check_updates.py — 19 tests: Ubuntu LTS filter, openSUSE both-signals, clean distro, disabled-not-EOL, future-release, boolean eol, data-integrity validation → exit 2, completion sentinel, markdown render.
  • Verified live against endoflife.date: reports the expected new majors plus EOL openSUSE Leap 15.6; the operational-failure path exits 2 and writes no sentinel.
  • flake8 / black / mypy / yamllint clean.

Notes

Independent of the update.py cleanup/refactor work. The gh-issue reconciliation is only fully exercised on a real scheduled run.

Surfaces the kind of drift tracked in:

🤖 Generated with Claude Code

ideaship added 5 commits July 19, 2026 02:00
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Roger Luethi <luethi@osism.tech>
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Roger Luethi <luethi@osism.tech>
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Roger Luethi <luethi@osism.tech>
check_updates flagged enabled Debian releases as end-of-life the moment
endoflife.date's 'eol' date passed. For Debian that field marks the end
of *regular* support only; the free community LTS continues for roughly
two more years, recorded in 'extendedSupport'. As a result Debian 11 and
12 -- both deliberately kept enabled during their LTS window -- were
reported as EOL, which would prompt premature retirement.

Add an eol_field to DistroConfig and evaluate each distro on the field
that marks the end of its *free* support: Debian on 'extendedSupport',
all others on 'eol'. Ubuntu stays on 'eol' on purpose, because its
'extendedSupport' is paid ESM rather than free maintenance. The field is
applied to both the supported-cycle and end-of-life checks so the two
stay consistent.

A regression test covers a Debian cycle past its 'eol' but within
'extendedSupport': it must not be flagged. Live output now lists only
openSUSE Leap 15.6 as EOL, and Debian produces no false findings.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Roger Luethi <luethi@osism.tech>
test/unit/test_check_updates.py imports the checker as
`contrib.check_updates`, but contrib/ had no __init__.py, so `mypy .`
(as run in CI) discovers contrib/check_updates.py under two module names
and aborts: "Source file found twice under different module names".

Make contrib a package, matching openstack_image_manager, so the file
resolves to a single module name and mypy passes.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Roger Luethi <luethi@osism.tech>
@ideaship
ideaship marked this pull request as ready for review July 20, 2026 10:52
@ideaship ideaship moved this from New to Ready for review in Human Board Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

2 participants