Repository navigation
fix: make update work for single-arch images and fail on a missed IMAGES block - #40
Merged
Merged
Conversation
…GES block Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
fix/docs-refresh-findings
branch
from
October 17, 2026 00:06
d169042 to
a8b393c
Compare
joshuarli
approved these changes
Oct 17, 2026
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.
Fixes three problems in
main.pyfound during the docs refresh (#39).updatefailed with HTTP 400 on single-arch images (for examplecheckr/flagr:latest). For a single manifest, the script fetches the config blob. Docker Hub redirects that blob to object storage, and urllib forwards the registryAuthorizationheader across the redirect. The storage backend rejects a request that carries two kinds of auth. The bearer token is now added withadd_unredirected_header, so it only goes to the registry. Multi-arch images andsyncnever hit the redirect, so their behavior is unchanged.'arm64/v8'inARCHScould never match._digestsreturns only thearchitecturefield, neverarchitecture/variant, so arm64 images were already selected by'arm64'. The dead entry is removed. Selected digests stay the same.updatesilently did nothing if theIMAGESregex missed. If the block's layout changed,re.submatched nothing and the script still exited 0. It now usesre.subnand exits with an error unless exactly one block is replaced.This also removes the manual workaround for the 400 error from
README.md, and changes theAGENTS.mdinvariant to say a missed regex now makesupdateexit with an error. Both lines were added in #39.update --dry-runnow finishes for every image in the list. The only digest changes it shows are for moving tags such aspostgres:14, and this PR doesn't commit them.sync --dry-runoutput is identical before and after the change.via @joshuarli.
--
View Junior Session [Sentry]