-
Notifications
You must be signed in to change notification settings - Fork 22
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
KUBESAW-147: Space controller updates tier-hash label based on the NSTemplateTier.Status.Revisions field #454
base: master
Are you sure you want to change the base?
Conversation
…TemplateTier.Status.Revisions field Signed-off-by: Feny Mehta <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #454 +/- ##
==========================================
- Coverage 78.47% 78.44% -0.03%
==========================================
Files 49 49
Lines 2471 2468 -3
==========================================
- Hits 1939 1936 -3
Misses 478 478
Partials 54 54
|
Signed-off-by: Feny Mehta <[email protected]>
pkg/hash/hash.go
Outdated
refs = append(refs, ns.TemplateRef) | ||
refs = append(refs, tier.Status.Revisions[ns.TemplateRef]) | ||
} | ||
if tier.Spec.ClusterResources != nil { | ||
refs = append(refs, tier.Spec.ClusterResources.TemplateRef) | ||
refs = append(refs, tier.Status.Revisions[tier.Spec.ClusterResources.TemplateRef]) |
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.
As it is mentioned in the Jira and also in the design document, we should use the whole revisions map to collect the refs and compute the hash, not only specific references.
It was also mentioned in the other threads that the current logic has a bug that it doesn't include the refs of the role templates - this should be fixed by collecting all revisions from the map
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.
Currently we have extra values and we do not have the logic of delete/clean up of revisions field, thats the reason i did this https://github.com/codeready-toolchain/toolchain-common/pull/454/files#diff-1da09bec2a4b26b257932b06c7ea839cc44492e089bd8276e4ae348bc6772b78R20
if i dont do it and if there are extra values, it will mess with the hash , thats my understanding .
Thats the reason i did the specific check for now and then probably change it once we have the clean-up logic for revisions.
WDYT?
Signed-off-by: Feny Mehta <[email protected]>
Quality Gate failedFailed conditions |
This PR is to update the space controller to compute the tier-hash label value using the NSTemplateTier.Status.Revisions field so that it can match outdated spaces using the new revisions mechanism.
Jira-Link - KUBESAW-147
Related PR