Skip to content

[bridge] fix nil pointer when global.digests is unset - #2519

Merged
vitaliil-jfrog merged 2 commits into
jfrog:bridge-101.262.58-20260902-182903from
markgalpin:fix/bridge-global-digests-nil
Sep 2, 2026
Merged

vitaliil-jfrog merged 2 commits into
jfrog:bridge-101.262.58-20260902-182903from
markgalpin:fix/bridge-global-digests-nil

Conversation

@markgalpin

Copy link
Copy Markdown
Contributor

PR Checklist

  • Chart Version bumped
  • CHANGELOG.md updated
  • Title of the PR starts with chart name

What this PR does / why we need it:

stable/bridge/templates/_helpers.tpl dereferences .Values.global.digests.<x> with no nil guard. When bridge runs as a subchart of jfrog-platform alongside catalog, worker or wingman — whose values define a global block with no digests key — the coalesced global has no digests, and rendering fails:

Error: jfrog-platform/charts/bridge/templates/_helpers.tpl:44:14
  executing "router.image" at <.Values.global.digests.router>:
    nil pointer evaluating interface {}.router

bridge is the only chart referencing global.digests in its helpers, so the fix is local: the nil-safe (.Values.global.digests).<x> form. It holds regardless of which sibling subcharts are enabled, and behaviour is unchanged when digests are supplied. Applied to all five image helpers — bridge, router, initContainers, observability, filebeat.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #2517

Special notes for your reviewer:

Verified by A/B against this branch, with a control that passes both ways so the harness itself is validated:

control (default digests: {}) repro (--set global.digests=null)
with fix PASS PASS
without fix PASS FAIL _helpers.tpl:55:14

No README change — this adds no values.

bridge's image helpers dereference .Values.global.digests.<x> without a nil
guard. When bridge is used as a subchart of jfrog-platform alongside catalog,
worker or wingman — whose values define a global block without a digests key —
the coalesced global has no digests, and rendering fails:

  Error: jfrog-platform/charts/bridge/templates/_helpers.tpl:44:14
    executing "router.image" at <.Values.global.digests.router>:
      nil pointer evaluating interface {}.router

bridge is the only chart referencing global.digests in its helpers, so the
fix is local: use the nil-safe (.Values.global.digests).<x> form, which holds
regardless of which sibling subcharts are enabled and leaves behaviour
unchanged when digests are supplied.

Applied to all five image helpers (bridge, router, initContainers,
observability, filebeat).
@vitaliil-jfrog
vitaliil-jfrog merged commit c8575cb into jfrog:bridge-101.262.58-20260902-182903 Sep 2, 2026
1 check passed
Sign up for free to 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.

[jfrog-platform] bridge fails to render: nil pointer on global.digests when catalog/worker/wingman is enabled

2 participants