Skip disabled images in update.py#1258
Open
ideaship wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Skip disabled images in
contrib/update.pyso the weekly update run nolonger refreshes images whose
enableflag is explicitlyfalse.Why
The updater refreshed every image carrying a
latest_url, ignoring theenableflag. Disabled, end-of-life images were therefore still updatedand 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: falsein the main loop, before any upstreamfetch. A missing
enablestill defaults to enabled, matching how themanager (
openstack_image_manager/main.py) treats the field. This alignsthe 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
WriteContractTestcase covers it: a disabled image with a changedupstream checksum leaves the YAML file untouched.
🤖 Generated with Claude Code