pkg/storage: handle more possible release label k/v pairs#399
Merged
joelanford merged 2 commits intooperator-framework:mainfrom Oct 17, 2024
Merged
Conversation
Release labels are stored only in Kubernetes object metadata. In order to support a wider variety of release labels, check release label validity. If a release label is invalid for a kubernetes metadata.label store it as an annotation instead. Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #399 +/- ##
==========================================
- Coverage 85.06% 78.48% -6.59%
==========================================
Files 19 31 +12
Lines 1346 2477 +1131
==========================================
+ Hits 1145 1944 +799
- Misses 125 444 +319
- Partials 76 89 +13 ☔ View full report in Codecov by Sentry. |
|
New changes are detected. LGTM label has been removed. |
joelanford
commented
Oct 17, 2024
Comment on lines
+333
to
+336
| // The only labels that get stored on the index secret are system labels, so we'll do a two-pass | ||
| // query. First, we'll request index secrets from the API server that match the query labels that | ||
| // are system labels. From there, we decode the releases that match, and then further filter those | ||
| // based on the rest of the query labels that are not system labels. |
Member
Author
There was a problem hiding this comment.
This was necessary to get existing tests to pass. We have a test that uses a custom label in a query.
69971bb to
787247e
Compare
Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
787247e to
cceec2e
Compare
everettraven
approved these changes
Oct 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release labels are currently stored only in Kubernetes object metadata, which limits what can actually be stored there.
In order to support a wider variety of release labels, we will only store system labels in the index secret. All custom release labels will be serialized in the release blob itself.