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

Deterministically sort default tags to prevent permadiff #1571

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

flostadler
Copy link
Contributor

Previously the default tags where randomly appended to the tag list because of Go's random iteration order for maps. This introduces sorting for the key's of the default tags in order to produce deterministic tag lists and prevent permadiffs.

Fixes #1486

Previously the default tags where randomly appended to the tag list
because of Go's random iteration order for maps.
This introduces sorting for the key's of the default tags in order
to produce deterministic tag lists and prevent permadiffs
@flostadler flostadler requested a review from a team June 5, 2024 14:19
@flostadler flostadler self-assigned this Jun 5, 2024
Copy link
Contributor

github-actions bot commented Jun 5, 2024

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.67%. Comparing base (ac6eb71) to head (4142a7c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1571      +/-   ##
==========================================
+ Coverage   41.62%   41.67%   +0.04%     
==========================================
  Files          35       35              
  Lines        4685     4689       +4     
==========================================
+ Hits         1950     1954       +4     
  Misses       2533     2533              
  Partials      202      202              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

for k := range defaultTags {
keys = append(keys, k)
}
sort.Strings(keys)
Copy link
Member

Choose a reason for hiding this comment

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

NIce.

Copy link
Member

@t0yv0 t0yv0 left a comment

Choose a reason for hiding this comment

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

Thank you!

@flostadler flostadler merged commit baa54f8 into master Jun 5, 2024
18 checks passed
@flostadler flostadler deleted the 1486-default-tags-permadiff branch June 5, 2024 15:11
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.

Default tags always generate a diff
2 participants