Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade workflows to actions/upload-artifact@v4 #2583

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

jsoref
Copy link
Contributor

@jsoref jsoref commented Nov 8, 2024

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows. -- This change is not backwards compatible with existing workflows (if they use the debug artifact feature which I've never seen outside of this repository)
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@jsoref
Copy link
Contributor Author

jsoref commented Nov 8, 2024

Note: I've left a file that tests the old v3 behavior. It's clearly called legacy, and I saw no particular reason to remove it yet as I'm not removing the code that it validates and someone who has access to GHES could conceivably want to test it.

This PR gave me enough insight that I could probably write some code to let that workflow skip doing real work unless it was running under GHES, although the lazy test would be to check the server URL as I did in my initial work.

@angelapwen
Copy link
Contributor

👋 thanks again for splitting this out @jsoref!

The default value for the feature flag is only used when there is no corresponding feature flag value from the GitHub feature flag API: https://github.com/github/codeql-action/blob/main/src/feature-flags.ts#L276-L293 so the default value change won't actually enable the behavior here.

I've begun rolling out the feature flag to true (currently at 10% of repos) and once that rollout is complete, we can set the default value to true. We prefer to roll out with the GitHub internal feature flag API as we have a mechanism that allows us to roll back for specific repositories or organizations. So let's hold the default value change until the rollout via the internal flag API is complete.

Note that the PR checks you are updating can be changed to @v4 at any time: they are uploading SARIF rather than our debug artifacts so are unaffected by the feature flag.

(The PR checks related to debug artifacts, https://github.com/github/codeql-action/blob/main/.github/workflows/debug-artifacts-failure.yml using v4 and https://github.com/github/codeql-action/blob/main/.github/workflows/debug-artifacts-legacy.yml using v3 are unaffected by the default value/feature flag API value because I have set the CODEQL_ACTION_ARTIFACT_V4_UPGRADE environment variable in those workflows.)

@jsoref
Copy link
Contributor Author

jsoref commented Nov 12, 2024

Sigh. The naming is confusing. Actually, the branch name isn't tied either way, so let's make this PR just the workflow changes.

@jsoref jsoref changed the title Change Feature.ArtifactV4Upgrade default to true Upgrade workflows to actions/upload-artifact@v4 Nov 13, 2024
Copy link
Contributor

@angelapwen angelapwen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contributions, as always 😄

@angelapwen angelapwen merged commit 6e3a010 into github:main Nov 13, 2024
265 checks passed
@jsoref jsoref deleted the use-artifact-4 branch November 13, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants