Fail the psmdb-pbm image build when a download fails - #1171
Merged
Conversation
The RUN that installs pmm-client and mgodatagen ended in `;`, so its exit status came from the trailing mkdir instead of the &&-chain. A 503 on the mgodatagen release download was reported by curl and then ignored: the layer was marked DONE and the image shipped without the binary, failing much later with "mgodatagen: executable file not found in $PATH" during setup. Join the chain to the end and retry both downloads on transient errors. Signed-off-by: Claude <noreply@anthropic.com>
This was referenced Aug 12, 2026
yurkovychv
approved these changes
Aug 13, 2026
This was referenced Aug 14, 2026
travagliad
pushed a commit
that referenced
this pull request
Aug 14, 2026
curl gained --retry-all-errors in 7.71.0; OL8 ships 7.61.1, so the flag added in #1171 aborts the build at the first curl with 'option --retry-all-errors: is unknown'. All 7 OL8 jobs of the GSSAPI nightly failed in setup while every OL9 job (curl 7.76.1) passed. --retry 5 --retry-delay 5 both predate 7.61.1 and stay. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
travagliad
pushed a commit
that referenced
this pull request
Aug 14, 2026
curl gained --retry-all-errors in 7.71.0; OL8 ships 7.61.1, so the flag added in #1171 aborts the build at the first curl with 'option --retry-all-errors: is unknown'. All 7 OL8 jobs of the GSSAPI nightly failed in setup while every OL9 job (curl 7.76.1) passed. --retry 5 --retry-delay 5 both predate 7.61.1 and stay. Signed-off-by: Claude <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
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.
Failures fixed (investigator)
CLI / Integration tests / CLI / Integration / PSMDB Replica 6.x— setuppsmdb=6.0,SETUP_TYPE=pss,@psmdbE2E / Backup Management MongoDB UI tests / e2e tests: @bm-mongo— setuppsmdb,SETUP_TYPE=pss,COMPOSE_PROFILES=extraWhat failed
Both jobs died in setup, before a single test ran:
Root cause — the image build swallowed a failed download
The binary was missing because the image was built without it, and the build said
nothing. Both jobs' own build logs carry the answer, ~1000 lines earlier:
GitHub's release CDN was briefly 503ing in that window — the
helm-testsjob in thesame run hit it too, on
.../percona-helm-charts/releases/download/pmm-1.9.0/pmm-1.9.0.tgz.The URL is fine now (
200), and the sibling PSMDB 7.x/8.x jobs, which build the sameimage, downloaded it without trouble.
The transient 503 is not the bug. The bug is
DONEon the next line. The installRUNinqa-integration/pmm_psmdb-pbm_setup/Dockerfileended:curl -Lf -o /tmp/mgodatagen.tar.gz https://github.com/.../mgodatagen_0.11.2_Linux_x86_64.tar.gz && \ tar -xf /tmp/mgodatagen.tar.gz -C /usr/bin && \ dnf clean all; \ rm -rf /var/cache/dnf /var/cache/dnf /data/db && mkdir -p /data/db;That
;beforerm -rfends the&&chain, so the layer's exit status comes frommkdir -p /data/db— which always succeeds. Every command in the chain iseffectively optional: curl reports the failure, the chain short-circuits, the layer is
marked
DONE, and a broken image ships. It is not specific to mgodatagen — a failedpmm-clienttarball download is masked exactly the same way.Fix
&&so the build fails at the download instead of hours later, insomeone else's test.
--retry 5 --retry-delay 5 --retry-all-errorson both downloads, so a transient 5xxis ridden out rather than turned into a red job at all.
/var/cache/dnfon the line being rewritten.Verification
Throwaway Linode VM, FB build for this PR
(
perconalab/pmm-server-fb:PR-4518-984159a+ its client tarball), PSMDB 6.0 —the exact matrix entry that failed.
--add-host github.com:127.0.0.1stands in for the503: same shape of failure (curl exits non-zero mid-chain), reproducible on demand.
Before (
main, download unreachable) — CI's failure, reproduced:The build passes and hands over an image whose
mgodatagenis gone — precisely whatthe runners got.
After (this branch, same unreachable download) — retries, then a red build:
After (this branch, network normal) — the real path, end to end:
pmm-framework --database psmdb=6.0,SETUP_TYPE=psscompleted,command -v mgodatagenin
rs101gives/usr/bin/mgodatagen, andrs101/rs102/rs103are registered in PMM'sinventory.
What this does and does not prove
The masking is proven directly: identical build inputs, one exits 0 with a broken image
and one fails. The retry path is proven to engage and to be supported by the image's
curl, but against connection-refused rather than a real 503 — nothing here can prove the
CDN would have answered on attempt 2 that afternoon.
Note the trade: builds that used to go quietly green with a missing binary will now go
red at the download. That is the point — it fails 20 minutes earlier and names its own
cause, instead of surfacing as
executable file not found in $PATHin an unrelated test.Also red in that run, not fixed here
Helm tests / helm-testsfailed test 5 of 8 on the same GitHub-CDN 503, fetchingpmm-1.9.0.tgzviahelm show values. Tests 6-8 install charts and passed, the fetchsucceeds now, and that job failed loudly with the real error rather than hiding it — a
transient, with no pmm-qa defect behind it. Left alone.
Generated by Claude Code