-
Notifications
You must be signed in to change notification settings - Fork 148
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
Implement garbage collection action #1374
Implement garbage collection action #1374
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature-operator-refactor #1374 +/- ##
============================================================
Coverage ? 26.85%
============================================================
Files ? 60
Lines ? 4782
Branches ? 0
============================================================
Hits ? 1284
Misses ? 3349
Partials ? 149 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
pkg/controller/actions/render/kustomize/action_render_manifests.go
Outdated
Show resolved
Hide resolved
) | ||
|
||
// TODO: this singleton must be removed. | ||
var Instance *GC |
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.
Can this eventually be a struct?
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 is actually a struct, I've removed the global Run
method and added some better comments
629bcba
to
12d0afb
Compare
85f2c44
to
603652a
Compare
3f6dda1
to
eb3b863
Compare
controllers/components/datasciencepipelines/datasciencepipelines_controller.go
Outdated
Show resolved
Hide resolved
eb3b863
to
f00710e
Compare
if !rr.Generated { | ||
return nil | ||
} |
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.
so this is saying:
even component CR gets deleted by human, after it gets recreated, since we have cache, rr.Generated = true
wont be called, thus this run() will get fast return nil
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.
Not sure if I got it right, but in the case of the component CR being re-created, the rr.Generated == true
, because the rendering task takes into account also the CR's UID when computing the hash, so the gc task would kicks in.
e71521b
to
ba512a7
Compare
ba512a7
to
a6260ae
Compare
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
a6260ae
to
dcfd87a
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zdtsw The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d748e02
into
opendatahub-io:feature-operator-refactor
Signed-off-by: Luca Burgazzoli lburgazzoli@gmail.com
Description
https://issues.redhat.com/browse/RHOAIENG-15183
How Has This Been Tested?
Screenshot or short clip
Merge criteria
Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).