Skip to content

fix: honor --release-name instead of generating a random release name#841

Open
somaz94 wants to merge 1 commit into
helm:mainfrom
somaz94:fix-198-release-name
Open

fix: honor --release-name instead of generating a random release name#841
somaz94 wants to merge 1 commit into
helm:mainfrom
somaz94:fix-198-release-name

Conversation

@somaz94

@somaz94 somaz94 commented Jun 4, 2026

Copy link
Copy Markdown

What this PR does / why we need it:

ct install --release-name <name> was ignored. Chart.CreateInstallParams only honored the release name when the chart path resolved to . or /, and unconditionally appended a random suffix — so --release-name go-backend still produced helm install go-backend-<random> (see the reproduction in the issue). This uses the provided --release-name verbatim as the release name (Helm validates the syntax). The namespace derivation is unchanged.

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

Special notes for your reviewer:

  • New unit test TestChart_CreateInstallParams in pkg/chart/chart_test.go (fails before the fix: the release came out as simple-deployment-<random> instead of my-release).
  • go test ./..., go vet ./pkg/chart/, gofmt -l, and golangci-lint run ./pkg/chart/... are all clean locally.
  • Namespace behavior is intentionally unchanged: with --namespace go-backend --release-name go-backend the caller now yields helm install go-backend --namespace go-backend.

@somaz94

somaz94 commented Jun 5, 2026

Copy link
Copy Markdown
Author

Gentle ping 🙏 — green and ready for review. This makes ct install honor an explicit --release-name instead of always generating a random one (also fixes the behavior reported in helm/chart-testing-action#198). Happy to address any feedback.

@somaz94

somaz94 commented Jul 8, 2026

Copy link
Copy Markdown
Author

Friendly ping 🙂 — this has been green and awaiting review for about 5 weeks now. Happy to rebase or address any feedback whenever a maintainer has a chance to take a look. Thanks for maintaining this project!

@moschramm

Copy link
Copy Markdown

Plus one for this PR. I'm running into the same problem in the latest release v3.14.0. The random suffix is preventing me from effective testing. Is there any way I can help getting this over the finishing line?

@somaz94

somaz94 commented Jul 24, 2026

Copy link
Copy Markdown
Author

@moschramm Thanks for confirming — useful to know it reproduces on v3.14.0 and isn't specific to my setup.

The code side has been ready for a while: the change makes ct install honour --release-name instead of generating <chart>-<random>, CI is green, and it's scoped to that one behaviour. The bottleneck is purely review bandwidth — no maintainer has picked it up since it was opened.

The most useful thing you could do is add your 👍 to the PR and describe your concrete blocker (the random suffix making it impossible to assert on release names in your tests). Independent demand from someone other than the author tends to move these along far better than another ping from me.

@moschramm

Copy link
Copy Markdown

@somaz94 thank you for your reply. As you said, I would like to have a mechanism to enforce a completely deterministic release name. Specifically, this would allow for more convenient testing in scenarios where i want to hard reference a resource by its name and the name is generated based on the release name.

@somaz94

somaz94 commented Jul 24, 2026

Copy link
Copy Markdown
Author

@moschramm That's exactly what this PR delivers. With --release-name my-release, ct install uses that literal name instead of the <chart>-<random-suffix> it generates today, so every resource whose name derives from .Release.Name becomes fully deterministic and safe to hard-reference in assertions:

ct install --charts charts/my-chart --release-name my-release
# -> helm install my-release ...  (no random suffix)

So the mechanism you're describing is already implemented and green — it just needs a maintainer to pick it up. Your 👍 and this concrete use case on the PR are the most helpful nudge here. Thanks!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install --upgrade delete namespace at end of previous version install

2 participants