Skip to content

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

Description

@SebTardif

Description

action.Test() passes obj.GetReleaseName() directly to test.Run() without calling release.ShortenName():

// internal/action/test.go:44
rlsr, shutdownFunc, err := test.Run(obj.GetReleaseName())

All other actions that look up releases by name use shortened names:

  • Install: release.ShortenName(obj.GetReleaseName()) (install.go:88)
  • Upgrade: release.ShortenName(obj.GetReleaseName()) (upgrade.go:60)
  • LastRelease: release.ShortenName(releaseName) (verify.go:84)

When GetReleaseName() returns a composed name (TargetNamespace-Name) that exceeds 53 characters, ShortenName hashes it during install/upgrade. The Test action then attempts to look up the release by the full unhashed name, causing a lookup miss.

Steps to Reproduce

  1. Create a HelmRelease where TargetNamespace + "-" + Name exceeds 53 characters
  2. Install succeeds (using shortened name)
  3. Test action fails to find the release (using full name)

Expected Behavior

Test should use release.ShortenName(obj.GetReleaseName()) consistent with Install and Upgrade.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions