-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix configuration metadata inconsistency #15601
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15601 +/- ##
==========================================
- Coverage 84.49% 83.50% -0.99%
==========================================
Files 219 219
Lines 13608 17427 +3819
==========================================
+ Hits 11498 14553 +3055
- Misses 1740 2501 +761
- Partials 370 373 +3 ☔ View full report in Codecov by Sentry. |
pkg/reconciler/labeler/accessors.go
Outdated
@@ -128,15 +129,19 @@ func updateRouteAnnotation(acc kmeta.Accessor, routeName string, diffAnn map[str | |||
return | |||
} | |||
valSet.Delete(routeName) | |||
diffAnn[serving.RoutesAnnotationKey] = strings.Join(valSet.UnsortedList(), ",") | |||
sorted := valSet.UnsortedList() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm here it is not yet sorted, right? so maybe call that variable routes
or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it is going to be sorted :) I can change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ReToCode, skonto The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #15594
Proposed Changes
serving.knative.dev/routes
anno to avoid triggering non-required reconciliations.a)
sets.List(valSet)
<- this sorts the set behind the scenes.b)
I think the overhead is low but b) seems ~10% faster. For a small number of routes, the common case, the diff is negligible (sorting is trivial), does not matter if a) or b) is used.
Release Note