-
Notifications
You must be signed in to change notification settings - Fork 172
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
feat: add convenience shard field on warehouse spec #1637
feat: add convenience shard field on warehouse spec #1637
Conversation
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
✅ Deploy Preview for docs-kargo-akuity-io ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1637 +/- ##
==========================================
+ Coverage 43.96% 43.98% +0.02%
==========================================
Files 199 199
Lines 12673 12683 +10
==========================================
+ Hits 5572 5579 +7
- Misses 6864 6866 +2
- Partials 237 238 +1 ☔ View full report in Codecov by Sentry. |
warehouse.Labels = make(map[string]string, 1) | ||
} | ||
warehouse.Labels[kargoapi.ShardLabelKey] = warehouse.Spec.Shard | ||
} else if warehouse.Labels != nil && warehouse.Labels[kargoapi.ShardLabelKey] != "" { |
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.
Nit: I think the != nil
check is redundant. As checking the value of a nil
map is actually safe (xref: https://go.dev/play/p/XiztcCXuNdt), only assignments cause panics.
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.
TIL
Fixed in 70d776e
Fixes #1631
This is similar to #1582, but for Warehouses.