-
Notifications
You must be signed in to change notification settings - Fork 905
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(analysis): Add ConsecutiveSuccessLimit feature to Analysis #3970
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3970 +/- ##
==========================================
- Coverage 82.69% 82.66% -0.04%
==========================================
Files 163 163
Lines 22895 22944 +49
==========================================
+ Hits 18934 18967 +33
- Misses 3087 3100 +13
- Partials 874 877 +3 ☔ View full report in Codecov by Sentry. |
Published E2E Test Results 4 files 4 suites 3h 14m 16s ⏱️ Results for commit 979fa81. ♻️ This comment has been updated with latest results. |
Published Unit Test Results2 293 tests 2 293 ✅ 2m 59s ⏱️ Results for commit 979fa81. ♻️ This comment has been updated with latest results. |
Signed-off-by: Youssef Rabie <youssef.rabie@procore.com>
defa236
to
979fa81
Compare
Quality Gate passedIssues Measures |
@y-rabie I don't know how I missed this could you add some docs for the feature with a lot of the great info you have mentioned in this PR and proposal descriptions |
@y-rabie Probably something on this section of the docs. https://argo-rollouts.readthedocs.io/en/stable/features/analysis/ |
@zachaller Sure, will do and open a PR with them |
…proj#3970) Signed-off-by: Youssef Rabie <youssef.rabie@procore.com>
…proj#3970) Signed-off-by: Youssef Rabie <youssef.rabie@procore.com>
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.This regards the enhancement proposal, see there for a brief description first.
First, regarding the fields and their possible values:
The value used for
FailureLimit
to disable it is-1
. The default is left to be0
as is currently the case. This preserves backward compatibility. The rationale for adding a value to disableFailureLimit
is the convenience for a user who wants to only useConsecutiveSuccessLimit
(waiting on a condition to hold/event to happen), instead of forcing them to type an arbitrarily big value for theFailureLimit
.The default value for
ConsecutiveSuccessLimit
is0
, which makes it effectively disabled by default. This is explicitly an opt-in feature to use.Both of them can be used side-by-side (
ConsecutiveSuccessLimit
> 0 andFailureLimit
>= 0). Notes regarding behavior follow here shortly after.They cannot be both disabled. Validation throws an error for that.
Second, a lot of the following resembles the way metric measurements themselves are evaluated in utils/evaluate/evaluate.go, with regards to
FailureCondition
andSuccessCondition
. That is:FailureCondition
is satisfied, it fails (even ifSuccessCondition
is specified separately and is satisifed).All possible scenarios should be obvious from reading the added unit tests, but the particular ones I think deserve mention are:
On terminating/cancelling analyses prematurely, that is, either any indefinite analysis, or limited analysis with
count
not yet reachedThey are always terminated with
AnalysisPhaseSuccessful
, UNLESS, it happens thatFailureLimit
is enabled and violated, then they terminate withAnalysisPhaseFailed
.This is already the case, but my emphasis here is that
ConsecutiveSuccessLimit
changes nothing from that. Even if it was not yet reached, the analysis is terminated successfully.For limited analysis (with
count
specified)When count is reached, the note above regarding similaritly to metric measurement evaluation comes into play.
If both
FailureLimit
andConsecutiveSuccessLimit
are enabled, andFailureLimit
is violated andConsecutiveSuccessLimit
is not satisfied =>AnalysisPhaseFailed
FailureLimit
is violated andConsecutiveSuccessLimit
is satisfied =>AnalysisPhaseFailed
FailureLimit
is not violated andConsecutiveSuccessLimit
is satisfied =>AnalysisPhaseSuccessful
FailureLimit
is not violated andConsecutiveSuccessLimit
is not satisfied =>AnalysisPhaseInconclusive
I've written unit tests for the added logic, and ran and tested the controller myself. The minor changes in the UI dashboard have not been tested (building and accessing it always cause the tab to load indefinitely for some reason, and I doubt that is related to my changes).