Repository navigation
AI summary: stop flagging AnalysisRuns that the controller stopped - #2057
Merged
Merged
Conversation
Argo Rollouts stops an in-flight AnalysisRun once the Rollout no longer needs it: a canary finishing with background analysis still running, a newer revision, an abort, a promote-full or a fast rollback. The run then ends Successful with the message "Run Terminated". The AI summary copied status.message into the issue field whenever no metric had failed, so an agent listing AnalysisRuns saw status "Successful" with issue "Run Terminated" after ordinary rollout activity and could read it as a problem. The message now becomes the issue only when the run's own phase is Failed, Error or Inconclusive. Those are the phases the Rollout summary already treats as a bad analysis verdict. Argo writes status.message only when a run finishes, so Pending and Running runs lose nothing. An Error run whose only explanation is in status.message, such as an argument that cannot be resolved, still reports it. The full object from the detail view still carries spec.terminate and the message.
PR Summary by QodoStop treating controller-stopped AnalysisRuns as summary issues
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After ordinary rollout activity, the AI summary reports the Rollout's AnalysisRuns as issues. Reproduce on a kind cluster with Argo Rollouts v1.9.1: start a canary with a step analysis, promote it fully from Radar, then call
list_resourcesforanalysisruns. The run comes back as:{"kind":"AnalysisRun","status":"Successful","issue":"Run Terminated","type":"Step"}Argo stops an in-flight run once the Rollout no longer needs it: a canary that finishes while its background analysis is still running, a newer revision, an abort, a promote-full or a fast rollback (
rollout/analysis.goupstream). The stopped run ends Successful with the message "Run Terminated".summarizeArgoAnalysisRuncopiedstatus.messageintoissuewhenever no metric had failed. Any canary with background analysis that completes normally therefore leaves a run the summary flags.The message now becomes the issue only when the run's phase is Failed, Error or Inconclusive. Those are the phases
rolloutBlockReasonalready treats as a bad analysis verdict when it reads the Rollout's analysis run statuses.Where to look hardest: the phase allowlist. Two cases decide whether it is right.
status.message. Error is in the list, so this still reachesissue. The repro includes such a run, and so does the new test.status.messageonly when a run finishes (analysis/analysis.goin v1.9.1: the error paths set phase Error, and the assessment returns an empty message while metrics are still running), so in practice these runs never carry one.What this gives up: the summary no longer says that a Successful run was stopped early rather than run to completion. The detail view (
get_resource) still returnsspec.terminate: trueand the message, and the summary has no neutral field to carry it without calling it an issue.Evidence, same cluster and same three runs:
issuebeforeissueafterRun TerminatedUnable to resolve metric arguments: secrets "does-not-exist" not foundexits-nonzero failedTests, both passing:
pkg/is its own Go module, so the first one runs from inside it. The new table test fails on main on the stopped-run case (issue = "Run Terminated", want empty).