Fix for `--upgrade` option by soar · Pull Request #624 · helm/chart-testing · GitHub
Skip to content

Fix for --upgrade option - #624

Merged
cpanato merged 1 commit into
helm:mainfrom
soar:patch-1
Feb 5, 2024
Merged

cpanato merged 1 commit into
helm:mainfrom
soar:patch-1

Conversation

@soar

@soar soar commented Feb 3, 2024

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Currently ct install with --upgrade option is broken. It copies the chart into the ct_previous_revision directory, and when it executes helm install ./ct_previous_revision it fails with the "wrong release name" error:

Testing upgrades of chart "chart-name => (version: \"0.0.1\", path: \".\")" relative to previous revision "chart-name => (version: \"0.0.1\", path: \"ct_previous_revision7182718172\")"...

Installing chart "chart-name => (version: \"0.0.1\", path: \"ct_previous_revision7182718172\")" with values file "ct_previous_revision7182718172/ci/test.yaml"...

Error: INSTALLATION FAILED: release name "ct_previous_revision7182718172-hehs72hayw": invalid release name, must match regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ and the length must not be longer than 53
Upgrade testing for release "ct_previous_revision7182718172-hehs72hayw" skipped because of previous revision installation error: failed waiting for process: exit status 1

Replacing underscores with dashes is the simplest way to solve this issue.

Signed-off-by: Aleksey @soar Smyrnov <i@soar.name>
@cpanato

cpanato commented Feb 3, 2024

Copy link
Copy Markdown
Member

@cpanato
cpanato self-requested a review February 3, 2024 20:31
@soar

soar commented Feb 5, 2024

Copy link
Copy Markdown
Contributor Author

Before the change:

Testing upgrades of chart "test-chart => (version: \"7.2.5\", path: \".\")" relative to previous revision "test-chart => (version: \"7.2.5\", path: \"ct_previous_revision3788771231\")"...

Installing chart "test-chart => (version: \"7.2.5\", path: \"ct_previous_revision3788771231\")" with values file "ct_previous_revision3788771231/ci/001-minimal-values.yaml"...

Error: INSTALLATION FAILED: release name "ct_previous_revision3788771231-pek56ssyow": invalid release name, must match regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ and the length must not be longer than 53
Upgrade testing for release "ct_previous_revision3788771231-pek56ssyow" skipped because of previous revision installation error: failed waiting for process: exit status 1

After this change:

Testing upgrades of chart "test-chart => (version: \"7.2.5\", path: \".\")" relative to previous revision "test-chart => (version: \"7.2.5\", path: \"ct-previous-revision3444486235\")"...

Installing chart "test-chart => (version: \"7.2.5\", path: \"ct-previous-revision3444486235\")" with values file "ct-previous-revision3444486235/ci/001-minimal-values.yaml"...

NAME: ct-previous-revision3444486235-l942ly7znu
LAST DEPLOYED: Sun Feb  4 14:54:22 2024
NAMESPACE: backend-services
STATUS: deployed
REVISION: 1
...

@cpanato
cpanato merged commit 560d59d into helm:main Feb 5, 2024
@soar
soar deleted the patch-1 branch February 5, 2024 14:27
@soar

soar commented Feb 5, 2024

Copy link
Copy Markdown
Contributor Author

Thank you!

@soar

soar commented Feb 5, 2024

Copy link
Copy Markdown
Contributor Author

@cpanato What do you think, when it can be released?

@cpanato

cpanato commented Feb 5, 2024

Copy link
Copy Markdown
Member

@cpanato What do you think, when it can be released?

I need to review other and push some updates, lets try to aim end of this week/next one

@soar

soar commented Mar 19, 2024

Copy link
Copy Markdown
Contributor Author

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.

2 participants