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
Introduce system artifact manager cleanup job #16879
Conversation
Codecov Report
@@ Coverage Diff @@
## main #16879 +/- ##
==========================================
+ Coverage 67.15% 67.17% +0.01%
==========================================
Files 974 977 +3
Lines 81555 81644 +89
Branches 2599 2599
==========================================
+ Hits 54767 54841 +74
- Misses 23057 23068 +11
- Partials 3731 3735 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
||
func init() { | ||
if err := scheduler.RegisterCallbackFunc(SystemArtifactCleanupCallback, cleanupCallBack); err != nil { | ||
log.Fatalf("failed to register the callback for the scan all schedule, error %v", err) |
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.
it's for the system artifact?
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.
Done
} | ||
|
||
func scheduleSystemArtifactCleanJob(ctx context.Context) { | ||
cronSpec := "0 0 0 * * *" |
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.
please add a comment for this, thanks.
} | ||
|
||
func (c *Cleanup) ShouldRetry() bool { | ||
return true |
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.
refer to this #16833 (comment)
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
25bfbdd
to
e217d79
Compare
@@ -0,0 +1,128 @@ | |||
package systemartifact |
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.
the UT should cover all the methods, we need more, thanks.
@@ -0,0 +1,36 @@ | |||
package systemartifact |
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.
more UT if possible.
e3b6eef
to
a3d98da
Compare
Signed-off-by: prahaladdarkin <prahaladd@vmware.com>
a3d98da
to
55b209e
Compare
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
Signed-off-by: prahaladdarkin <prahaladd@vmware.com>
Scope of change:
Closes #16878
Signed-off-by: prahaladdarkin prahaladd@vmware.com