Skip to content

Skip disabled images in update.py#1258

Open
ideaship wants to merge 1 commit into
mainfrom
update-skip-disabled-images
Open

Skip disabled images in update.py#1258
ideaship wants to merge 1 commit into
mainfrom
update-skip-disabled-images

Conversation

@ideaship

Copy link
Copy Markdown
Contributor

What

Skip disabled images in contrib/update.py so the weekly update run no
longer refreshes images whose enable flag is explicitly false.

Why

The updater refreshed every image carrying a latest_url, ignoring the
enable flag. Disabled, end-of-life images were therefore still updated
and showed up in the generated pull requests — e.g. Ubuntu 20.04 was
bumped to a 2025 build long after being disabled.

How

Skip images with enable: false in the main loop, before any upstream
fetch. A missing enable still defaults to enabled, matching how the
manager (openstack_image_manager/main.py) treats the field. This aligns
the updater with the manager: an image that is not served is also not
refreshed, and its definition stays frozen at its last version.

Tests

A WriteContractTest case covers it: a disabled image with a changed
upstream checksum leaves the YAML file untouched.

🤖 Generated with Claude Code

The update script refreshed every image carrying a latest_url,
regardless of its enable flag. Disabled, end-of-life images were
therefore still updated on the weekly run and appeared in the
generated pull requests -- for example Ubuntu 20.04 was bumped to a
2025 build long after being disabled.

Skip images whose enable flag is explicitly false in the main loop,
before any upstream fetch. Missing enable defaults to enabled, which
matches how the manager (openstack_image_manager/main.py) treats the
field. This aligns the updater with the manager: an image that is not
served is also not refreshed, and its definition stays frozen at its
last version.

A WriteContractTest case covers it: a disabled image with a changed
upstream checksum leaves the YAML file untouched.

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

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants