Skip to content

Use ShortenName for release name in Test action#1492

Open
SebTardif wants to merge 1 commit into
fluxcd:mainfrom
SebTardif:fix/test-release-name-shorten
Open

Use ShortenName for release name in Test action#1492
SebTardif wants to merge 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)

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 <sebtardif@ncf.ca>
@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
Copy link
Copy Markdown
Member

@matheuscscp matheuscscp left a comment

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 🙏

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

2 participants