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 — Bump artifact dependencies if `CODEQL_ACTION_ARTIFACT_V4_UPGRADE` enabled by angelapwen · Pull Request #2482 · github/codeql-action

Conversation

@angelapwen

@angelapwen angelapwen commented Sep 13, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

We need to bump actions/upload-artifact and actions/download-artifact to v4 in our PR checks, as v3 will be deprecated in November: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

To do so, we also need to bump @actions/artifact to v2, but it is not yet supported on GHES: https://www.npmjs.com/package/@actions/artifact#v2---whats-new

This change would immediately cause customers using v3 of actions/download-artifact in their workflows to see failures, so we are gating it behind an opt-in feature flag for another month. Customers will be able to set the CODEQL_ACTION_ARTIFACT_V4_UPGRADE environment variable to true in their workflows as they upgrade actions/download-artifact to v4.

At the beginning of November, we will set the default value of the feature flag to true and the upgraded version of the artifact dependencies will be the default.

This PR:

  • imports @actions/artifact@v1 as artifact-legacy and imports @actions/artifact@v2 as artifact
  • adds a feature flag, defaulting to false, that can be enabled by setting the CODEQL_ACTION_ARTIFACT_V4_UPGRADE environment variable to true
  • uses the legacy version of the artifact client on GHES or when the CODEQL_ACTION_ARTIFACT_V4_UPGRADE flag is false; and otherwise the upgraded version
  • adds a PR check that sets CODEQL_ACTION_ARTIFACT_V4_UPGRADE to true, bumping upload-artifact and download-artifact to v4.

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
@angelapwen angelapwen mentioned this pull request Sep 13, 2024
Bump artifacts dependencies #2461
Closed
3 tasks
@angelapwen angelapwen added the Update dependencies Trigger PR workflow to update dependencies label Sep 13, 2024
@github-actions github-actions Bot removed the Update dependencies Trigger PR workflow to update dependencies label Sep 13, 2024
@github-actions

github-actions Bot commented Sep 13, 2024

Copy link
Copy Markdown
Contributor

Pushed a commit to update the checked-in dependencies. Please mark the PR as ready for review to trigger PR checks.

All reactions

Sorry, something went wrong.

Uh oh!

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

@angelapwen
angelapwen marked this pull request as ready for review September 13, 2024 19:22
@angelapwen
angelapwen requested a review from a team as a code owner September 13, 2024 19:22
@angelapwen

angelapwen commented Sep 13, 2024

Copy link
Copy Markdown
Contributor Author

💭 People who have workflows using download-artifacts@v3 will no longer be able to access the debug artifacts that way (they will need to use @v4) — I'm not sure how many users do that as usually the debug artifacts are more of a manual inspection sort of thing. If we think enough people do that we could add a changenote.

All reactions

Sorry, something went wrong.

Uh oh!

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

aeisenberg
aeisenberg reviewed Sep 13, 2024
View reviewed changes

@aeisenberg aeisenberg 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.

Nice. Some suggestions inline.

+2,174,754 −72,459

Productive day! 🎉 😄

Sorry, something went wrong.

Uh oh!

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

angelapwen reacted with laugh emoji
All reactions
  • 😄 1 reaction
Comment thread src/analyze-action-post.ts Resolved

Uh oh!

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

Comment thread src/debug-artifacts.ts Resolved

Uh oh!

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

Comment thread src/start-proxy-action-post.ts Resolved

Uh oh!

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

angelapwen
angelapwen commented Sep 13, 2024
View reviewed changes
Comment thread src/upload-sarif-action-post.ts Resolved

Uh oh!

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

@angelapwen

angelapwen commented Sep 16, 2024

Copy link
Copy Markdown
Contributor Author

Holding on this as I investigate internal reports that #2475 has caused some regressions

All reactions

Sorry, something went wrong.

Uh oh!

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

angelapwen added 2 commits September 25, 2024 12:06
@angelapwen
Install actions/artifact@v1 as artifact-legacy and v2 as `artif…
76b799d
…act`
@angelapwen
Update original import statements to use artifact-legacy
6d887c1
@angelapwen
angelapwen marked this pull request as draft September 25, 2024 20:09
angelapwen added 2 commits September 25, 2024 13:58
@angelapwen
Use new artifact dependency if not on GHES & feature flag enabled
4de3002
@angelapwen
Add PR check with feature flag enabled to test upgrade
35684ba
@angelapwen
angelapwen force-pushed the angelapwen/bump-artifacts branch from 26b076b to 35684ba Compare September 25, 2024 21:15
@angelapwen
Add changenote
4a5884a
@angelapwen angelapwen added the Update dependencies Trigger PR workflow to update dependencies label Sep 25, 2024
@github-actions github-actions Bot removed the Update dependencies Trigger PR workflow to update dependencies label Sep 25, 2024
@github-actions

github-actions Bot commented Sep 25, 2024

Copy link
Copy Markdown
Contributor

Pushed a commit to update the checked-in dependencies. Please mark the PR as ready for review to trigger PR checks.

All reactions

Sorry, something went wrong.

Uh oh!

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

@angelapwen
angelapwen marked this pull request as ready for review September 25, 2024 21:33
@angelapwen angelapwen changed the title Bump artifact dependencies Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_UPGRADE enabled Sep 25, 2024
henrymercer
henrymercer reviewed Sep 26, 2024
View reviewed changes

@henrymercer henrymercer 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.

Thanks for the extra work here to get this behind a feature flag and provide a smooth upgrade path! ✨

Sorry, something went wrong.

Uh oh!

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

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

Uh oh!

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

Comment thread src/feature-flags.ts Resolved

Uh oh!

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

Comment thread src/debug-artifacts.ts Resolved

Uh oh!

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

Comment thread src/start-proxy-action-post.ts Resolved

Uh oh!

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

Comment thread src/start-proxy-action-post.ts Resolved

Uh oh!

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

Comment thread .github/workflows/debug-artifacts-upgrade.yml Resolved

Uh oh!

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

Comment thread CHANGELOG.md Resolved

Uh oh!

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

Comment thread CHANGELOG.md Resolved

Uh oh!

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

angelapwen added 5 commits September 26, 2024 13:19
@angelapwen
Refactor: remove argument array indirection and pass directly instead
8e4d3c2
@angelapwen
Rename feature flag to CODEQL_ACTION_ARTIFACT_V2_UPGRADE
bca51cd
@angelapwen
Add log messages at INFO level about which artifact version used
ce99e34
@angelapwen
Refactor: reuse getArtifactUploaderClient in start-proxy-action
0c5c594
@angelapwen
Update changenote
fbe39bd
@angelapwen
angelapwen force-pushed the angelapwen/bump-artifacts branch from e96bc99 to fbe39bd Compare September 26, 2024 20:49
@angelapwen angelapwen added the Update dependencies Trigger PR workflow to update dependencies label Sep 26, 2024
@github-actions github-actions Bot removed the Update dependencies Trigger PR workflow to update dependencies label Sep 26, 2024
@github-actions
Update checked-in dependencies
fd00289
@github-actions

github-actions Bot commented Sep 26, 2024

Copy link
Copy Markdown
Contributor

Pushed a commit to update the checked-in dependencies. Please mark the PR as ready for review to trigger PR checks.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions
github-actions Bot marked this pull request as draft September 26, 2024 20:52
@angelapwen
angelapwen marked this pull request as ready for review September 26, 2024 20:52
@angelapwen
angelapwen requested a review from henrymercer September 26, 2024 22:56
@angelapwen angelapwen changed the title Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_UPGRADE enabled Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V2_UPGRADE enabled Sep 26, 2024
aeisenberg
aeisenberg reviewed Sep 26, 2024
View reviewed changes

@aeisenberg aeisenberg left a comment •
edited
Loading

Uh oh!

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

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. The test makes sense, but I just want to make sure it is easy to maintain.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread .github/workflows/debug-artifacts-upgrade.yml
Comment on lines +27 to +34
- stable-v2.13.5
- stable-v2.14.6
- stable-v2.15.5
- stable-v2.16.6
- stable-v2.17.6
- default
- linked
- nightly-latest

@aeisenberg aeisenberg Sep 26, 2024

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.

Are we not testing 2.18 or 2.19? How will we maintain this list going forward? Same question for the set of versions below.

Sorry, something went wrong.

Uh oh!

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

All reactions

@angelapwen angelapwen Sep 26, 2024

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 try to keep the list of versions in the checks that don't use the PR check generator consistent with the sync.py file:

codeql-action/pr-checks/sync.py

Lines 9 to 28 in 46e0c78

defaultTestVersions = [
# The oldest supported CodeQL version. If bumping, update `CODEQL_MINIMUM_VERSION` in `codeql.ts`
"stable-v2.13.5",
# The last CodeQL release in the 2.14 series.
"stable-v2.14.6",
# The last CodeQL release in the 2.15 series.
"stable-v2.15.5",
# The last CodeQL release in the 2.16 series.
"stable-v2.16.6",
# The last CodeQL release in the 2.17 series.
"stable-v2.17.6",
# The default version of CodeQL for Dotcom, as determined by feature flags.
"default",
# The version of CodeQL shipped with the Action in `defaults.json`. During the release process
# for a new CodeQL release, there will be a period of time during which this will be newer than
# the default version on Dotcom.
"linked",
# A nightly build directly from the our private repo, built in the last 24 hours.
"nightly-latest"
]
. When we update the list in that file, we also update the manually created PR checks.

default is currently 2.19.0, so looks like we'll need to add 2.18.6 to the list. I'll open up a separate internal issue to track that.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread CHANGELOG.md Resolved

Uh oh!

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

Comment thread src/debug-artifacts.ts Resolved

Uh oh!

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

@angelapwen @aeisenberg
Update CHANGELOG.md
f52494d
Co-authored-by: Andrew Eisenberg <[email protected]>
henrymercer
henrymercer reviewed Sep 27, 2024
View reviewed changes

@henrymercer henrymercer 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.

This looks great. Just a couple of comments about whether we can avoid the confusion between the npm and Action versions by always talking about the Action versions, in line with the public changelog posts.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread CHANGELOG.md Resolved

Uh oh!

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

Comment thread CHANGELOG.md Resolved

Uh oh!

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

Comment thread src/debug-artifacts.ts Resolved

Uh oh!

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

angelapwen added 2 commits September 27, 2024 13:05
@angelapwen
Refer to download-artifact@v4 everywhere to reduce confusion
7c14037
@angelapwen
Merge remote-tracking branch 'origin' into angelapwen/upgrade-artifac…
3788527
…ts-rebase
@angelapwen

angelapwen commented Sep 27, 2024

Copy link
Copy Markdown
Contributor Author

There is some kind of unrelated CI incident related to Docker so will have to re-run these checks later~

All reactions

Sorry, something went wrong.

Uh oh!

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

henrymercer
henrymercer previously approved these changes Sep 30, 2024
View reviewed changes

@henrymercer henrymercer 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.

Nice! A couple of small suggestions, but this looks good!

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread CHANGELOG.md Resolved

Uh oh!

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

Comment thread src/feature-flags.ts Outdated
*/
export enum Feature {
ArtifactV2Upgrade = "artifact_v2_upgrade",
ArtifactV4Upgrade = "artifact_v2_upgrade",

@henrymercer henrymercer Sep 30, 2024

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.

Should we also update the name of the feature flag?

Sorry, something went wrong.

Uh oh!

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

All reactions

@angelapwen angelapwen Sep 30, 2024

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.

Good point — forgot to do that because we don't really use that value. Fixed!

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/debug-artifacts.ts Outdated
} else if (!(await features.getValue(Feature.ArtifactV4Upgrade))) {
logger.info(
"Uploading debug artifacts using the `@actions/artifact@v1` client because the value of the relevant feature flag is false. To use the `v2` version of the client, set the `CODEQL_ACTION_ARTIFACT_V2_UPGRADE` environment variable to true.",
"Debug artifacts can be consumed with `actions/download-artifact@v3` because the value of the relevant feature flag is false. To use the `actions/download-artifact@v4`, set the `CODEQL_ACTION_ARTIFACT_V4_UPGRADE` environment variable to true.",

@henrymercer henrymercer Sep 30, 2024

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'd suggest we drop "because the value of the relevant feature flag is false" here, since customers shouldn't need to know about feature flags.

Sorry, something went wrong.

Uh oh!

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

All reactions

@angelapwen angelapwen Sep 30, 2024

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.

Makes sense 👍 to them it's just behind an environment variable. Done!

Sorry, something went wrong.

Uh oh!

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

All reactions
angelapwen added 2 commits September 30, 2024 16:08
@angelapwen
Update feature flag name
6b58e15
@angelapwen
Remove logging that mentions feature flags for clarity
d2642b6
@angelapwen
angelapwen dismissed henrymercer’s stale review via d2642b6 September 30, 2024 23:10
@angelapwen @henrymercer
Update CHANGELOG.md
f29ffe2
Co-authored-by: Henry Mercer <[email protected]>
henrymercer
henrymercer previously approved these changes Oct 1, 2024
View reviewed changes

@henrymercer henrymercer 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 one merge conflict to resolve in the changelog.

Sorry, something went wrong.

Uh oh!

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

angelapwen reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@angelapwen
Merge branch 'main' into angelapwen/bump-artifacts
29620a0
@angelapwen
angelapwen dismissed henrymercer’s stale review via 29620a0 October 1, 2024 15:47
@angelapwen
angelapwen requested a review from henrymercer October 1, 2024 16:02
henrymercer
henrymercer approved these changes Oct 1, 2024
View reviewed changes
@angelapwen angelapwen changed the title Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V2_UPGRADE enabled Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V4_UPGRADE enabled Oct 1, 2024
@angelapwen
angelapwen merged commit a196a71 into main Oct 1, 2024
@angelapwen
angelapwen deleted the angelapwen/bump-artifacts branch October 1, 2024 16:59
This was referenced Oct 3, 2024
Merge main into releases/v3 #2522
Merged
Merge releases/v3 into releases/v2 #2524
Merged
@chrisgavin chrisgavin mentioned this pull request Oct 21, 2024
upload-sarif post-action step failed: Input required and not supplied: token #2553
Closed
@mbg mbg mentioned this pull request Sep 25, 2026
Remove unnecessary check in start-proxy-action-post #4176
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aeisenberg aeisenberg aeisenberg left review comments
@henrymercer henrymercer henrymercer approved these changes

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

@angelapwen @aeisenberg @henrymercer
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 01402520 — 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.