Skip to content

fix(postgresql): remove static IMAGE_TAG fallback that hid version-mapping misses#3063

Draft
weicao wants to merge 1 commit into
mainfrom
fix/pg-image-tag-fail-fast
Draft

fix(postgresql): remove static IMAGE_TAG fallback that hid version-mapping misses#3063
weicao wants to merge 1 commit into
mainfrom
fix/pg-image-tag-fail-fast

Conversation

@weicao

@weicao weicao commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Problem

Deep-review finding 三.19 (issue #3062): four ActionSets (postgresql-pitr, pgbasebackup, wal-g-pitr, pgdumpall) default IMAGE_TAG to 14.8.0-pgvector-v0.6.1. The BPT's versionMapping overrides it whenever the target serviceVersion is in the chart's declared versions — so the static default only ever takes effect on a mapping miss, at which point a PG 16/17/18 cluster silently runs its backup/restore tooling with the PG 14 image. Wrong-major pg_dump/pg_basebackup/wal-g should fail loudly, not run quietly.

Change

Remove the four static defaults (and the now-empty env: block in pgdumpall). On a mapping miss the image renders with a literal $(IMAGE_TAG) tag → the job fails at image resolution with the unexpanded variable in the error — attributable fail-fast. wal-g/wal-g-incremental methods are unaffected (fixed walgImage helper).

Evidence boundary

Static + rendered chart: the only remaining 14.8.0-pgvector occurrences are the 14.8.0 serviceVersion's own mapping entries and the pg14 cmpd/cmpv images (legitimate). Not runtime-tested; the change removes a fallback rather than altering any matched-path behavior.

🤖 Generated with Claude Code

…pping misses

Four ActionSets defaulted IMAGE_TAG to 14.8.0-pgvector-v0.6.1. The
BPT's per-method versionMapping overrides it for every serviceVersion
declared in the chart, so the default only ever fired on a mapping
miss (e.g. a custom ComponentVersion minor) — silently running a
PG 16/17/18 cluster's backup/restore tooling with the PG 14 image.

The defaults are removed; on a miss the image now renders with a
literal $(IMAGE_TAG) tag and the job fails visibly at image
resolution, naming the unexpanded variable. pgdumpall's env block
became empty and is dropped. wal-g / wal-g-incremental are unaffected
(fixed walgImage helper, no IMAGE_TAG).

Fixes #3062

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@weicao weicao requested review from a team, ldming and leon-ape as code owners July 6, 2026 11:11
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (35e0ded) to head (d8959e0).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3063   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        144     144           
  Lines      23013   23013           
=====================================
  Misses     23013   23013           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@weicao weicao marked this pull request as draft July 6, 2026 11:24

@leon-ape leon-ape left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@leon-ape leon-ape added the nopick Not auto cherry-pick when PR merged label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nopick Not auto cherry-pick when PR merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants