| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Warning
The focused implementation is consistent with existing input handling and covers the new behavior with unit tests.
Review tier: Balanced
Findings: None
Prevents cancelled jobs from incorrectly disabling overlay analysis through cached failure markers.
Changes:
| File | Description |
|---|---|
| src/init-action-post.ts | Captures post-step job status before restoring inputs. |
| src/init-action-post-helper.ts | Adds cancellation-aware overlay status handling. |
| src/init-action-post-helper.test.ts | Tests cancellation and prior-error behavior. |
| init/action.yml | Defines the internal job-status input. |
| lib/entry-points.js | Generated output; excluded from review by policy. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
There was a problem hiding this comment.
good catch
Sorry, something went wrong.
There was a problem hiding this comment.
Broadly looks good and makes sense, thanks! Just a few considerations that came to my mind while reviewing this.
Sorry, something went wrong.
| [Internal] The ID of the check run, as provided by the Actions runtime environment. Do not set this value manually. | ||
| default: ${{ job.check_run_id }} | ||
| required: false | ||
| job-status: |
There was a problem hiding this comment.
Never nice to have to feed this in through an extra action input, but I don't see a better approach for getting hold of the job status. An alternative option might be to set CODEQL_ACTION_STEP_(init|analyze|...) environment variables / state that we set to e.g. starting when the respective action starts and then to success or failure depending on the outcome. That should then allow us to identify which step started, succeeded, or failed (gracefully or not). For the overlay status, we could then check that all available environment variables with a CODEQL_ACTION_STEP_ prefix are success and none are starting or failure. The downside is that it wouldn't catch if the failure isn't related to what happens in CodeQL Action steps, or we fail to even set the starting value.
Sorry, something went wrong.
There was a problem hiding this comment.
That approach is also more complex, though it might be interesting to explore later, particularly if we also want to evaluate excluding failures from non-CodeQL Action steps.
Sorry, something went wrong.
| return ( | ||
| jobStatus === JobStatus.FailureStatus || | ||
| jobStatus === JobStatus.ConfigErrorStatus | ||
| ); |
There was a problem hiding this comment.
Could we end up with one of these if the workflow job was cancelled? E.g. because it caused a thread abort style exception to be thrown at an inconvenient moment?
Sorry, something went wrong.
There was a problem hiding this comment.
I expect that it's possible, but the most common case would be the job genuinely failing in some way. It's worth looking into telemetry more once we've tackled the low-hanging fruit, but I'll leave as is for now.
Sorry, something went wrong.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Changes addressing the feedback from my previous review look good, thanks! Agreed on the other two points and happy to leave those for now. We can look into/address them later if necessary.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The overlay status mechanism records a marker in the Actions cache when building an overlay-base database fails, so that later runs skip overlay analysis instead of failing the same way, but it records one whenever the analyze step did not report success, which also covers runs that were cancelled, since the init post step still runs in that case. A cancellation tells us nothing about whether the analysis would have succeeded, and a marker disables overlay analysis for the whole repository until the next CodeQL release, so this adds an internal job-status input defaulting to ${{ job.status }} and skips recording when the job was cancelled.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
Products:
Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist