Feat/checkpoint bugfix#275
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #275 +/- ##
==========================================
- Coverage 73.17% 73.01% -0.17%
==========================================
Files 125 126 +1
Lines 9336 9382 +46
==========================================
+ Hits 6832 6850 +18
- Misses 2183 2210 +27
- Partials 321 322 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
226181e to
cb10e08
Compare
cb10e08 to
8df498e
Compare
|
There's a small issue found by Qoder: Issue #1:
|
| Attribute | Details |
|---|---|
| Location | pkg/sandbox-manager/infra/sandboxcr/utils.go:80-86 |
| Category | Logic / Safety |
Description:
propagateAnnotationsToTemplate calls sbx.GetAnnotations() which can return nil. While Go allows indexing a nil map (returns zero value, no panic), the function always calls template.SetAnnotations(tmplAnnotations) even when no necessary keys were found, replacing the existing nil with an empty map. For CreateCheckpoint, this creates a template with an empty annotations map instead of nil, which is benign but slightly wasteful.
Fix:
Consider returning early if no necessary keys are found in sandbox annotations:
if sbxAnnotations == nil {
return
}8df498e to
e4b0c7d
Compare
8b34339 to
9536bea
Compare
9536bea to
e754cbc
Compare
Signed-off-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
e754cbc to
856e8de
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: furykerry The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews