Skip to content

fix(release): let a stack declare the image pins it repeats - #1987

Open
kristinapathak wants to merge 1 commit into
mainfrom
kpathak/auto-bump-stack-collector-pin
Open

kristinapathak wants to merge 1 commit into
mainfrom
kpathak/auto-bump-stack-collector-pin

Conversation

@kristinapathak

@kristinapathak kristinapathak commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

TL;DR

deploy/stacks/nvcf-compute-plane repeats the collector pin the nvca-operator
chart carries, but had no way to declare that. The chart auto-bumped to
0.160.0-nv-0.2.5; the stack sat on 0.157.0-nv-0.2.1. It can declare it now,
and this bumps it.

Before, on main:

$ tools/ci/chart-version-bumper --tag src/compute-plane-services/byoo-otel-collector/v0.160.0-nv-0.2.5
no chart declares that it deploys byoo-otel-collector; nothing to do

After:

$ tools/ci/chart-version-bumper --tag src/compute-plane-services/byoo-otel-collector/v0.160.0-nv-0.2.5
  nvcf-compute-plane-stack: 0.157.0-nv-0.2.1 -> 0.160.0-nv-0.2.5 (declared values path(s): environments/base.yaml:global.nvcaOperator.selfManaged.otelCollector.imageTag)
  nvca-operator: already 0.160.0-nv-0.2.5

Additional Details

Declaring the edge is not enough on its own. That was the first thing I
tried, and it silently did nothing. Two lookups exclude a stack before it can be
planned:

  • ChartsDeploying requires deploy/helm/, so a deploy/stacks/ entry is never
    a candidate — hence the no chart declares… line above.
  • PlanForValuesPaths then requires a Chart.yaml under the entry path. A stack
    is a helmfile tree with no chart of its own, and its charts sit at
    charts/*/Chart.yaml, two levels below where ChartFiles globs.

Both now make an exception for an edge that names its files explicitly via
values_files. That form is self-describing: it says which file and which dotted
path, so it needs no chart to resolve against.

An edge using values_paths still requires a Chart.yaml, because those
paths resolve against the chart's own values.yaml and there is nothing to
resolve them against without one. There's a test pinning that, so the exception
can't quietly widen into "charts are optional."

ApplyValuesPaths needed no change — it returns through commitFileUpdates
before touching Chart.yaml whenever app_version is false, which it is here.

The stale pin is bumped by running the tool, not by editing the file:
chart-version-bumper --tag .../v0.160.0-nv-0.2.5 --write. The fix and the
mechanism that prevents recurrence are the same code path, so the one-line diff
in base.yaml is also the end-to-end proof.

Why this drifted and deploy/stacks/self-managed didn't: that stack is
covered by different machinery — stack-pin-bump.yml / stack-pin-resolver,
scoped to deploy/stacks/self-managed/helmfile.d. Nothing covered this one.

For the Reviewer

The two guard relaxations in metadata.go and chart.go are the substance;
please sanity-check that keying the exception on len(d.ValuesFiles) == 0 is the
boundary you'd want, rather than an explicit kind: stack marker on the entry.
I chose the former because it derives from what the edge already has to say, and
adds no new vocabulary.

For QA

  • go test ./... in tools/chart-version-bumper passes, 2 tests new. Both
    confirmed failing first — the values_files one left the pin at
    0.157.0-nv-0.2.1.
  • Ran the real tool against the real repo, dry-run then --write; output
    above. The resulting base.yaml diff is one line.
  • tools/ci/check-go-tools: 10 modules, 9 tested, 0 failed.
  • tools/ci/chart-service-edge --audit: 25 charts, 21 declared, 4 undeclared,
    0 naming an unknown service — unchanged from main.
  • tools/ci/stack-pin-resolver --audit: 31 releases, 0 unresolved.
  • Note on a red herring: docs-version-sync fails in a checkout missing recent
    tags (resolve stack source tag …/v0.20.7). It fails identically on clean
    main and passes after git fetch --tags. Not related to this change.

Golden testdata carries the rendered value twice. Those two literals are
substituted, not re-rendered — rendering pulls the operator chart from
nvcr.io and needs credentials this checkout lacks. The substitution is
literal-for-literal what a re-render produces for a value-only change, and no
workflow runs compare-golden (nothing in .github/workflows invokes
compare-golden, test-local or render-local). Flagging it so a reviewer with
registry access can confirm rather than take my word for it.

Not exercised: a real release-triggered chart-version-bump.yml run.

Issues

Closes #1986

Checklist

  • I am familiar with the Contributing Guidelines.
  • I have signed off my commits for Developer Certificate of Origin (DCO) compliance.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Updates

    • Updated the self-managed OpenTelemetry collector to version 0.160.0-nv-0.2.5.
    • Release automation now includes the OpenTelemetry collector deployment in compute plane stack updates.
  • Bug Fixes

    • Improved chart version updates for deployments that define values files without requiring a chart definition.
    • Targets that require chart metadata continue to be skipped when that metadata is unavailable.

deploy/stacks/nvcf-compute-plane pins the BYOO OTel collector in
environments/base.yaml, the same image the nvca-operator chart pins.
The chart's four fields auto-bump on every collector release through
their deploys edge; the stack had no edge and no way to declare one, so
it sat on 0.157.0-nv-0.2.1 while the chart moved to 0.160.0-nv-0.2.5.
The gap widened with each release rather than holding steady.

Declaring the edge was not enough on its own. Two lookups excluded the
stack before it could be planned:

- ChartsDeploying required deploy/helm/, so a deploy/stacks/ entry was
  never a candidate at all, and the run reported "no chart declares
  that it deploys byoo-otel-collector".
- PlanForValuesPaths then required a Chart.yaml under the entry path.
  A stack is a helmfile tree with no chart of its own, and its charts
  sit at charts/*/Chart.yaml, two levels below where ChartFiles looks.

Both now make an exception for an edge that names its files explicitly,
which is self-describing and needs no chart to resolve against. An edge
using values_paths still requires a Chart.yaml, because those paths
resolve against the chart's own values.yaml and there is nothing to
resolve them against without one.

ApplyValuesPaths needed no change: it returns through
commitFileUpdates before touching Chart.yaml whenever app_version is
false, which it is here.

The stale pin itself is bumped in this commit by running the tool
(`chart-version-bumper --tag .../v0.160.0-nv-0.2.5 --write`) rather
than by editing the file, so the fix and the mechanism are the same
code path.

Golden testdata carries the rendered value twice. Those two literals
are substituted rather than re-rendered: rendering pulls the operator
chart from nvcr.io, which needs credentials this checkout does not
have. The change is literal-for-literal what a re-render produces, and
no workflow runs compare-golden.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Kristina Pathak <kpathak@nvidia.com>
@kristinapathak kristinapathak added the ci Continuous integration, build, and release pipeline work label Sep 18, 2026
@kristinapathak
kristinapathak requested review from a team as code owners September 18, 2026 21:12
@kristinapathak kristinapathak self-assigned this Sep 18, 2026
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: NVIDIA/nvcf/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 543188a1-141c-4b5a-beab-a2af27e2e766

📥 Commits

Reviewing files that changed from the base of the PR and between 4557744 and e82d287.

⛔ Files ignored due to path filters (2)
  • deploy/stacks/nvcf-compute-plane/testdata/golden/local/02-nvca.yaml-nvca-operator/helm-nvca-operator/templates/deployment.yaml is excluded by !**/testdata/**
  • deploy/stacks/nvcf-compute-plane/testdata/golden/local/02-nvca.yaml-nvca-operator/helm-nvca-operator/templates/self-managed-nvcfbackend-cm.yaml is excluded by !**/testdata/**
📒 Files selected for processing (5)
  • deploy/stacks/nvcf-compute-plane/environments/base.yaml
  • tools/chart-version-bumper/chart.go
  • tools/chart-version-bumper/main_test.go
  • tools/chart-version-bumper/metadata.go
  • tools/ci/github-release-subprojects.json

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The chart-version bumper now supports eligible chartless stack targets that update declared values files. Release configuration connects the OTEL collector to the stack, and the stack pin advances to 0.160.0-nv-0.2.5.

Changes

Chartless stack bump

Layer / File(s) Summary
Chartless deployment discovery and planning
tools/chart-version-bumper/metadata.go, tools/chart-version-bumper/chart.go, tools/chart-version-bumper/main_test.go
The bumper includes non-chart deployments with ValuesFiles. It plans values-only updates without Chart.yaml and skips chartless values_paths targets. Tests cover both behaviors.
OTEL collector release wiring
tools/ci/github-release-subprojects.json, deploy/stacks/nvcf-compute-plane/environments/base.yaml
The release configuration declares the byoo-otel-collector deployment. The stack pin changes to 0.160.0-nv-0.2.5.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant CollectorRelease
  participant chart-version-bumper
  participant base.yaml
  CollectorRelease->>chart-version-bumper: publish byoo-otel-collector version
  chart-version-bumper->>base.yaml: update declared OTEL image tag
  base.yaml-->>chart-version-bumper: record updated stack value
Loading

Suggested reviewers: sbaum1994

Merge Risk: ⚪ Minimal · up to e82d2

The chartless values-file support and collector release wiring have no identified actionable issue. The change is ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses valid Conventional Commits syntax with the required scope for a fix. It accurately describes the primary change: allowing stacks to declare repeated image pins for release updates.
Linked Issues check ✅ Passed The changes satisfy #1986. tools/ci/github-release-subprojects.json adds the nvcf-compute-plane-stack deployment and maps global.nvcaOperator.selfManaged.otelCollector.imageTag to `deploy/stacks…
Out of Scope Changes check ✅ Passed The reviewed changes remain within #1986. The tool changes enable chartless stack pin updates, the tests verify the required behavior, the release configuration adds the required deployment edge, and …
Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration, build, and release pipeline work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nvcf-compute-plane stack pin never auto-bumps with the collector it deploys

1 participant