GeezerVison is showing github.com — Ensure artifacts are only uploaded in safe situations by aeisenberg · Pull Request #2726 · github/codeql-action
Conversation
aeisenberg
commented
Jan 25, 2025
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Turns on uploading of artifacts again but only if CLI version is >= 2.20.3. I implemented the check using our feature flag functionality. I was on the fence about this since it makes the PR more complex. However, it does give us more flexibility when controlling artifact uploads.
I've changed the PR so that it checks versions directly.
Also, I renamed the two workflows that were previously disabled. This way we will not accidentally enable the old workflows for previous versions of the action.
Merge / deployment checklist
- Confirm this change is backwards compatible with existing workflows.
- Confirm the readme has been updated if necessary.
- Confirm the changelog has been updated if necessary.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This commit:
Turns on uploading of artifacts again but only if CLI version is
>= 2.20.3. I implemented the check using our feature flag functionality.
I was on the fence about this since it makes the PR more complex.
However, it does give us more flexibility when controlling artifact
uploads.
Also, I renamed the two workflows that were previously disabled. This
way we will not accidentally enable the old workflows for previous
versions of the action.
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.
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/debug-artifacts.ts:300
- No test confirms the 'upload-successful' scenario. Adding a test that verifies successful artifact uploads would provide more complete coverage.
return "upload-successful";
Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Using the feature flag mechanism for checking if uploads are enabled was
too clunky. I'm moving the change to checking versions directly.
Not sure why we need this now, but didn't before.
Comment on lines
+22
to
+29
|
|
strategy:
|
|
|
fail-fast: false
|
|
|
matrix:
|
|
|
version:
|
|
|
- stable-v2.20.3
|
|
|
- default
|
|
|
- linked
|
|
|
- nightly-latest
|
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.
We are now matrixing the build because we want to be sure it is working in the versions we know about.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
angelapwen reacted with thumbs up emoji
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.
Looks good — just some non-blocking comments about giving the tests a bit more clarity!
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
aeisenberg reacted with thumbs up emoji
Uh oh!
There was an error while loading. Please reload this page.
|
|
t.is(
|
|
|
uploaded,
|
|
|
"upload-not-supported",
|
|
|
"Expect failure to upload artifacts since root dir does not exist",
|
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.
I think this test failure should be because the CodeQL version is old and not supported here?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
I think this comment is still valid on this test — the failure should be because the upload is not supported on this version of the CLI, right?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Oops. Yes. You're right about this one. I'll change it.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
@angelapwen, do these comments clarify things?
Yes! I think one comment is still valid, posted above!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
+1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|