GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Ensure artifacts are only uploaded in safe situations by aeisenberg · Pull Request #2726 · github/codeql-action

Conversation

@aeisenberg

@aeisenberg aeisenberg commented Jan 25, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions
@aeisenberg
Ensure artifacts are only uploaded in safe situations
2bab9f7
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.
Copilot AI review requested due to automatic review settings January 25, 2025 23:32
@aeisenberg
aeisenberg requested a review from a team as a code owner January 25, 2025 23:32
Copilot AI reviewed Jan 25, 2025
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
aeisenberg added 2 commits January 25, 2025 15:34
@aeisenberg
Update changelog
5ff2464
@aeisenberg
Stop using feature-flag support for determining if a feature is active
f71067b
Using the feature flag mechanism for checking if uploads are enabled was
too clunky. I'm moving the change to checking versions directly.
@aeisenberg
aeisenberg force-pushed the aeisenberg/reenable-artifact-upload branch from 7201315 to f71067b Compare January 26, 2025 21:42
aeisenberg added 2 commits January 26, 2025 19:17
@aeisenberg
Fix CLI versions
346d067
@aeisenberg
Iterate over each version
a2c1b36
Not sure why we need this now, but didn't before.
aeisenberg
aeisenberg commented Jan 27, 2025
View reviewed changes
Comment thread .github/workflows/debug-artifacts-failure-safe.yml
Comment on lines +22 to +29
strategy:
fail-fast: false
matrix:
version:
- stable-v2.20.3
- default
- linked
- nightly-latest

@aeisenberg aeisenberg Jan 27, 2025

Copy link
Copy Markdown
Contributor Author

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
All reactions
  • 👍 1 reaction
angelapwen
angelapwen previously approved these changes Jan 27, 2025
View reviewed changes

@angelapwen angelapwen left a comment

Copy link
Copy Markdown
Contributor

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
All reactions
  • 👍 1 reaction
Comment thread src/debug-artifacts.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/debug-artifacts.test.ts Outdated
t.is(
uploaded,
"upload-not-supported",
"Expect failure to upload artifacts since root dir does not exist",

@angelapwen angelapwen Jan 27, 2025

Copy link
Copy Markdown
Contributor

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.

All reactions

@angelapwen angelapwen Jan 27, 2025

Copy link
Copy Markdown
Contributor

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.

All reactions

@aeisenberg aeisenberg Jan 27, 2025

Copy link
Copy Markdown
Contributor Author

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.

All reactions
Comment thread src/debug-artifacts.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@aeisenberg
Add better comments around artifact upload tests
62c322f
@aeisenberg
aeisenberg dismissed angelapwen’s stale review via 62c322f January 27, 2025 18:18
@aeisenberg

aeisenberg commented Jan 27, 2025

Copy link
Copy Markdown
Contributor Author

@angelapwen, do these comments clarify things?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@angelapwen

angelapwen commented Jan 27, 2025

Copy link
Copy Markdown
Contributor

@angelapwen, do these comments clarify things?

Yes! I think one comment is still valid, posted above!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aeisenberg
Clarify test fail;ure message
a879704
angelapwen
angelapwen approved these changes Jan 27, 2025
View reviewed changes

@angelapwen angelapwen left a comment

Copy link
Copy Markdown
Contributor

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!!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aeisenberg
aeisenberg enabled auto-merge January 27, 2025 18:57
@aeisenberg
aeisenberg merged commit b494190 into main Jan 27, 2025
@aeisenberg
aeisenberg deleted the aeisenberg/reenable-artifact-upload branch January 27, 2025 19:10
@github-actions github-actions Bot mentioned this pull request Jan 27, 2025
Merge main into releases/v3 #2732
Merged
6 of 8 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Mar 6, 2025
[pull] main from github:main StemmlerSisters/codeql-action#1
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
+1 more reviewer
@angelapwen angelapwen angelapwen approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

3 participants

@aeisenberg @angelapwen
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.