-
Notifications
You must be signed in to change notification settings - Fork 880
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
fix(analysis): Fix Analysis Terminal Decision For Dry-Run Metrics #2131
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,9 @@ func IsTerminating(run *v1alpha1.AnalysisRun) bool { | |
for _, res := range run.Status.MetricResults { | ||
switch res.Phase { | ||
case v1alpha1.AnalysisPhaseFailed, v1alpha1.AnalysisPhaseError, v1alpha1.AnalysisPhaseInconclusive: | ||
return true | ||
// If this metric is running in the dryRun mode then we don't care about the failures and hence the terminal | ||
// decision shouldn't be affected. | ||
return !res.DryRun | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so if analysisRun is completed, then dryRun will keep it in running mode (argoCD UI shows as spinning and that will confuse users). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe I am wrong here.. eventually, analysis run will be completed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @harikrongali Yes, it'll only keep running if it's a background analysis where the Since we are only ignoring the state of the dry-run metrics, if a wet-run metric fails then it'd terminate immediately as expected. |
||
} | ||
} | ||
return false | ||
|
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.
why it is Running?
after steps are completed, isn't the result successful?
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.
"Running" is actually the correct state here as these are the background runs which would keep running if there is no
count
specified.