Skip to content

fix(e2e): era-aware --reuse-values pin assertion — baseline release now carries the prod pin - #455

Merged
LukasWodka merged 3 commits into
developfrom
fix/e2e-auto-upgrade-era-aware
Jul 28, 2026
Merged

fix(e2e): era-aware --reuse-values pin assertion — baseline release now carries the prod pin#455
LukasWodka merged 3 commits into
developfrom
fix/e2e-auto-upgrade-era-aware

Conversation

@LukasWodka

@LukasWodkaLukasWodka commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Unblocks #454 and every other chart-touching PR: the "Fleet auto-upgrade E2E (k3d)" check has failed since yesterday's develop → main promotion (#383), because the path-1 assertion hardcoded an era that promotion ended.

Cause.--reuse-values replays the baseline release's computed values and ignores new chart defaults. The assertion expected jm_ingestor_digest to be empty after that upgrade, which was only true while the last published release predated images.ingestor.prodDigest (#398). The #383 promotion published a release that carries the pin in its computed values, so the replay now (correctly) delivers it, and the hardcoded expectation fails — exactly the era boundary the test's own comment described. Diagnosis first posted on #454.

Fix. The expectation is now derived from the baseline release itself, right after it is installed:

  • BASELINE_PROD_DIGEST="$(helm get values --all -o json | jq -r '.images.ingestor.prodDigest // ""')"
  • Pin absent in baseline ⇒ assert it does not arrive (the old behavior, still correct against pre-fix(chart): move the prod ingestor pin into chart defaults so it reaches edges #398 releases).
  • Pin present ⇒ assert the same digest is replayed verbatim — strictly stronger than "non-empty": it still proves the documented limitation (nothing injected from the new chart's defaults) in the new era.

Era-stale comments updated (header contract, path 1, path 2). Other assertions untouched.

Flagged, not fixed here (path-2 era note added in code). Path 1's --reuse-values rewrites the release's recorded values to the baseline's full computed set, so path 2's --reset-then-reuse-values replays the baseline pin as if user-supplied. Today baseline pin == working-tree pin, so path 2's GOT == WANT holds — but the first PR that bumpsprodDigest will fail path 2. That failure is a genuine signal, not noise: any real edge that was ever hand-upgraded with --reuse-values stops receiving chart pin updates the same way. Worth a follow-up decision (isolate path 2 from path 1, or treat as the intended tripwire for the replay-contamination issue).

Type

  • Fix (CI)

Test plan

  • bash -n + shellcheck clean.
  • Era logic: baseline without pin ⇒ old assertion path (unchanged behavior); baseline with pin ⇒ verbatim-replay assertion. jq is preinstalled on the stock runners.
  • The real proof is this PR's own Helm Chart CI run: its E2E installs the current (post-Release develop → main #383, pin-carrying) release and exercises the new era-B branch end-to-end.

🤖 Generated with Claude Code


Note

Low Risk
CI-only changes to e2e-auto-upgrade.sh assertions and comments; no production Helm chart or runtime behavior is modified.

Overview
Fixes the Fleet auto-upgrade E2E (k3d) gate after published charts started carrying images.ingestor.prodDigest in computed values.

The path-1 --reuse-values check no longer assumes the prod ingestor pin is always absent. After installing the last published release, the script reads BASELINE_PROD_DIGEST from helm get values --all (via jq, with a new preflight) and branches: no baseline pin ⇒ digest must stay empty; baseline pin present ⇒ digest must match the baseline verbatim (proving new chart defaults are not injected on this path).

Header and inline comments are updated to describe both eras. Path 2 behavior is unchanged; a new ERA NOTE documents that path 1 can contaminate stored values so a future prodDigest bump may fail path 2 on purpose (client#459).

Reviewed by Cursor Bugbot for commit 5e582dc. Bugbot is set up for automated code reviews on this repo. Configure here.

…ase now carries the prod pin
The path-1 assertion hardcoded the pre-#398 era: it expected NO ingestor
pin after a --reuse-values upgrade because the published release's
computed values predated images.ingestor.prodDigest. The #383 promotion
(2026-07-27) published a release that includes the pin, so replayed
computed values now carry it and the assertion fails on every
chart-touching PR (first hit: #454).
The expectation is now read from the baseline release itself
(helm get values --all): pin absent => must not arrive (old behavior);
pin present => the SAME digest must be replayed verbatim. Both eras keep
asserting the actual limitation: --reuse-values never injects new chart
defaults. Path-2's era-stale comment corrected, with a note on the
replay-contamination signal a future pin bump will surface.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@LukasWodkaLukasWodka self-assigned this Jul 28, 2026
@LukasWodka

Copy link
Copy Markdown
ContributorAuthor

bugbot run

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 8879713. Configure here.

@saqlainsyed007

Copy link
Copy Markdown
Contributor

A minor Suggestion:

jq as a hard dependency for local runs. The claim "jq is preinstalled on the stock runners" is true for GitHub-hosted Ubuntu, but the script advertises local use (Usage: bash scripts/tests/e2e-auto-upgrade.sh) and already gates docker via the has helper. A one-line has jq || error "jq is required" in the preflight section would fail with a clear message instead of a mid-run pipeline abort.

…CI runners)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@LukasWodka

Copy link
Copy Markdown
ContributorAuthor

Good catch — done in 3d13b3d: has jq || error "jq is required (it reads the baseline release's computed values)." sits right next to the docker gate in the preflight section, so a local run without jq fails immediately with a clear message instead of a mid-run pipeline abort. Cherry-picked to #454 as well (d76af0a) so the two copies of the fix stay identical for either merge order.

bugbot run

…the path-2 tripwire in #459 (review)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@LukasWodka

Copy link
Copy Markdown
ContributorAuthor

bugbot run

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 5e582dc. Configure here.

@LukasWodka
LukasWodka merged commit 1adbffd into developJul 28, 2026
64 of 65 checks passed
@LukasWodka
LukasWodka deleted the fix/e2e-auto-upgrade-era-aware branch August 14, 2026 13:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@LukasWodka@saqlainsyed007@divyasinghds