Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v0.7] Backport helm release name fix #1665

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

manno
Copy link
Member

@manno manno commented Jul 21, 2023

Refers to #1660

When a release name must be truncated to comply with Helm's maximum
release name length, Fleet truncates the name and builds a new release
name as `<name>-<hash>`.

In cases where the last character of `<name>` is a dash, a previous
commit would include the character immediately following the dash and
place it before the hash, which might cause confusion.

Instead, this commit does not include that character in such cases and
increases the hash length by 1, so that characters after the last dash
in the release name remain hexadecimal.

Avoid increasing hex length if truncated string ends with -

In such cases, the separator is simply omitted. The resulting string
will be one character shorter than the limit, which should not cause any
issues. On the other hand, the hash will contain only hexadecimal
digits, as it previously did.
Since double dashes are not part of the result, this preserves
consistency across repeated calls, and hence between bundle ID and Helm
release name, thereby preventing unexpected deletion and re-creation of
bundles.

Co-authored-by: Corentin Néau <[email protected]>
@manno manno requested a review from a team as a code owner July 21, 2023 16:06
@manno manno merged commit 4c3a938 into release/v0.7 Jul 24, 2023
9 checks passed
@manno manno deleted the backport-helm-release-name-fix branch July 24, 2023 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants