-
Notifications
You must be signed in to change notification settings - Fork 872
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 pre-dispatch dryrun check #5277
Feat: add pre-dispatch dryrun check #5277
Conversation
Codecov ReportBase: 61.21% // Head: 61.21% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #5277 +/- ##
==========================================
- Coverage 61.21% 61.21% -0.01%
==========================================
Files 307 307
Lines 46350 46356 +6
==========================================
+ Hits 28375 28376 +1
Misses 15063 15063
- Partials 2912 2917 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
3e70fc6
to
f4a2845
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: Somefive <yd219913@alibaba-inc.com> Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Signed-off-by: Somefive <yd219913@alibaba-inc.com> Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Signed-off-by: Somefive <yd219913@alibaba-inc.com> Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Signed-off-by: Somefive yd219913@alibaba-inc.com
Description of your changes
Previously, when application contains objects that should not be dispatched (like invalid resource, target cluster disconnected, authorization failed), the dispatch of the resources are recorded in ResourceTracker, which will trigger these resources to be recycled and state-kept afterwards. However, since these dispatch are not successful, we will encounter errors during gc or state-keep.
In PR #5266, we add
vela delete -i
command to make post fixes to ResourceTrackers available which means even if these invalid resources are recorded in the ResourceTracker, we can still provide a way for user to fix them.This PR add pre-dispatch DryRun check for the to-dispatch resources before recording them into ResourceTrackers. Therefore, invalid resources will not be recorded if they are detected during the dryrun process. It will greatly reduce the possibility of recording not-dispatched resources into ResourceTrackers. In the case that dryrun does not successfully detected all invalid resources, user can still fall back to use
vela delete -i
to handle the issue.Partially fixes #4700 & fixes #5191.
P.S. cluster-gateway is required to be upgraded to handle multi-cluster dryrun request.
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