fix(ci): Ensure CodeQL comment workflow only runs on success#258
Conversation
The 'CodeQL - Post Comment' workflow was failing intermittently because it would attempt to download an artifact that was not always present. This occurred when the upstream 'CodeQL Analysis' workflow did not produce the artifact, for example, when it failed or when no new alerts were found. This change modifies the trigger condition for the 'post-comment' job to only run when the upstream 'CodeQL Analysis' workflow has a conclusion of 'success'. This ensures that the artifact is guaranteed to exist, resolving the recurring failures.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix intermittent failures in the CodeQL comment workflow by restricting it to only run when the upstream CodeQL Analysis workflow completes successfully. However, this change introduces a critical bug that prevents the comment workflow from running in the most important scenario.
Changes:
- Modified the job-level condition in the CodeQL comment workflow from checking
conclusion != 'cancelled'toconclusion == 'success'
The 'CodeQL - Post Comment' workflow was failing intermittently because it would attempt to download an artifact that was not always present. This occurred when the upstream 'CodeQL Analysis' workflow did not produce the artifact, for example, when it was cancelled or skipped. This change modifies the trigger condition for the 'post-comment' job to only run when the upstream 'CodeQL Analysis' workflow has a conclusion of 'success' or 'failure'. This is because the analysis workflow intentionally fails when new alerts are detected, but it still uploads the comment artifact before exiting. An explanatory comment has also been added to the workflow to clarify this behavior for future maintenance. This ensures the comment is posted reliably when new alerts are found or when existing ones are resolved, and prevents the workflow from running in situations where the artifact is not expected to exist.
The 'CodeQL - Post Comment' workflow was failing intermittently because it would attempt to download an artifact that was not always present. This occurred when the upstream 'CodeQL Analysis' workflow did not produce the artifact, for example, when it failed or when no new alerts were found.
This change modifies the trigger condition for the 'post-comment' job to only run when the upstream 'CodeQL Analysis' workflow has a conclusion of 'success'. This ensures that the artifact is guaranteed to exist, resolving the recurring failures.
PR created automatically by Jules for task 11662169482065959574 started by @greenc-FNAL