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

controllers: use short SHA in chart SemVer meta #507

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Dec 2, 2021

As the full version can be used as a label value, the full SHA from the
reference takes up too much space from the 63 characters available in
total.

* metadata.labels: Invalid value: "kube-prometheus-stack-20.0.1_a4303ff0f6fb560ea032f9981c6bd7c7f146d083.1": must be no more than 63 characters

To mitigate against this, we now take a "short" version of the first 12
characters, which was still unique for the Linux kernel in 2019 with
875.000 commits:
http://git-scm.com/book/en/v2/Git-Tools-Revision-Selection#Short-SHA-1

This should be sufficient to safely detect all changes within the
context of operations.

@hiddeco hiddeco added bug Something isn't working area/helm Helm related issues and pull requests labels Dec 2, 2021
@hiddeco hiddeco force-pushed the chart-meta-short-sha branch 2 times, most recently from ea65f66 to 34757b1 Compare December 2, 2021 17:38
@hiddeco hiddeco marked this pull request as ready for review December 2, 2021 18:05
Copy link
Contributor

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

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

LGTM!
Thanks for documenting it nicely 👍

@hiddeco hiddeco force-pushed the chart-meta-short-sha branch 2 times, most recently from d8052e5 to bbf79b1 Compare December 2, 2021 21:24
As the full version can be used as a label value, the full SHA from the
reference takes up too much space from the 63 characters available in
total.

To mitigate against this, we now take a "short" version of the first 12
characters, which was still unique for the Linux kernel in 2019 with
875.000 commits:
http://git-scm.com/book/en/v2/Git-Tools-Revision-Selection#Short-SHA-1

This should be sufficient to safely detect all changes within the
context of operations.

Signed-off-by: Hidde Beydals <[email protected]>
@hiddeco hiddeco merged commit 50f930a into main Dec 3, 2021
@hiddeco hiddeco deleted the chart-meta-short-sha branch December 3, 2021 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Helm related issues and pull requests bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants