-
Notifications
You must be signed in to change notification settings - Fork 886
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 a built in garbage-collect policy to application #2575
Conversation
dd83149
to
21be174
Compare
Codecov Report
@@ Coverage Diff @@
## master #2575 +/- ##
==========================================
- Coverage 59.86% 59.81% -0.05%
==========================================
Files 223 223
Lines 22735 22824 +89
==========================================
+ Hits 13610 13652 +42
- Misses 7473 7515 +42
- Partials 1652 1657 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
b1a4c97
to
33c3756
Compare
33c3756
to
0dd3591
Compare
cc @leejanee |
6c03303
to
a50a7b9
Compare
pkg/controller/core.oam.dev/v1alpha2/application/dispatch/gc.go
Outdated
Show resolved
Hide resolved
What's the use case? Why keep those legacy resource? |
859e9b0
to
995ac57
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.
是否可以清理appRev的时候,清理对应对应的resourceTracker
清理resourceTracker会导致历史资源被删除,后面会提供接口让用户主动去删 |
Need to write examples(docs) for this policy and usage. The docs don't need to show in our website, but contributors should be able to understand it |
995ac57
to
0c072e4
Compare
garbage-collect policy usages doc. |
0c072e4
to
6badec7
Compare
264364f
to
81d2e4f
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.
please fix CI
b10d06a
to
213d699
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.
please add scenes-oriented test cases.
|
The test coverage results seem to be incorrect, I am sure that the critical path has corresponding tests. |
b813dd6
to
60d9669
Compare
60d9669
to
9cc9273
Compare
Description of your changes
add a built in
garbage-collect
policy, while now only support one optionkeepLegacyResource
, which means gc mechanism will keep the legacy resource when application is updated. you can enable thekeepLegacyResource
options like:what will the gc mechanism do when enable the
keepLegacyResource
optionsOwnerReference
of those resources will refer to the new resourcesTracker.TODO
Fixes #
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Special notes for your reviewer
cc @Somefive @wangyikewxgm @captainroy-hy