Skip to content

Use ShortenName for release name in Test action#1492

Merged
matheuscscp merged 1 commit into
fluxcd:mainfrom
SebTardif:fix/test-release-name-shorten
May 19, 2026
Merged

Use ShortenName for release name in Test action#1492
matheuscscp merged 1 commit into
fluxcd:mainfrom
SebTardif:fix/test-release-name-shorten

Conversation

@SebTardif

Copy link
Copy Markdown
Contributor

Description

action.Test() passes obj.GetReleaseName() directly to test.Run() without calling release.ShortenName(). Install and Upgrade both use release.ShortenName() to hash release names that exceed 53 characters. The Test action uses the full unhashed name, causing a lookup miss for long release names.

Closes #1489

Changes

One-line change: wrap obj.GetReleaseName() with release.ShortenName() in test.go:44, and add the release import.

Verification

  • go build ./... passes
  • go vet ./... passes
  • Integration tests require etcd (CI)

@matheuscscp matheuscscp added bug Something isn't working backport:release/v1.5.x To be backported to release/v1.5.x labels May 19, 2026

@matheuscscp matheuscscp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@SebTardif Please rebase and force-push 🙏

Install and Upgrade both call release.ShortenName(obj.GetReleaseName())
before passing the name to Helm, but Test passes the raw unshorteened
name. When GetReleaseName() returns a composed name (TargetNamespace +
Name) that exceeds 53 characters, ShortenName hashes it. The Test
action then looks up the release by the full unhashed name, causing a
lookup miss and a silent test failure.

Signed-off-by: Sebastien Tardif <[email protected]>
@SebTardif SebTardif force-pushed the fix/test-release-name-shorten branch from b66f2b1 to 6d3f888 Compare May 19, 2026 10:54
@SebTardif

Copy link
Copy Markdown
Contributor Author

Rebased onto main and force-pushed. Thanks for the review.

@matheuscscp matheuscscp merged commit 6d8a552 into fluxcd:main May 19, 2026
5 of 6 checks passed
@fluxcdbot

Copy link
Copy Markdown
Member

Successfully created backport PR for release/v1.5.x:

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

Labels

backport:release/v1.5.x To be backported to release/v1.5.x bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test action uses unshortened release name, fails for names over 53 characters

3 participants