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

add v2 deprecation warning #2092

Merged
merged 4 commits into from
Jan 19, 2024
Merged

add v2 deprecation warning #2092

merged 4 commits into from
Jan 19, 2024

Conversation

nickfyson
Copy link
Contributor

@nickfyson nickfyson commented Jan 18, 2024

This PR adds a deprecation warning when v2 of any CodeQL Action is found to be running on a GitHub instance that is capable of upgrading to v3.

The following three workflow runs demonstrate these changes...

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.

@nickfyson nickfyson force-pushed the nickfyson/v2-deprecation-warning branch 4 times, most recently from a1ec01e to 774d2c3 Compare January 18, 2024 19:56
@nickfyson nickfyson force-pushed the nickfyson/v2-deprecation-warning branch from ed17f48 to f72cffc Compare January 18, 2024 20:51
@nickfyson nickfyson marked this pull request as ready for review January 18, 2024 21:10
@nickfyson nickfyson requested a review from a team as a code owner January 18, 2024 21:10
aeisenberg
aeisenberg previously approved these changes Jan 18, 2024
henrymercer
henrymercer previously approved these changes Jan 18, 2024
src/util.ts Outdated
@@ -944,3 +944,38 @@ export async function checkDiskUsage(logger?: Logger): Promise<DiskUsage> {
numTotalBytes: diskUsage.size,
};
}

/**
* Prompt the customer to upgrade to CodeQL Action v2, if appropriate.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Prompt the customer to upgrade to CodeQL Action v2, if appropriate.
* Prompt the customer to upgrade to CodeQL Action v3, if appropriate.

src/util.ts Outdated
Comment on lines 974 to 978
core.warning(
"CodeQL Action v2 will be deprecated on December 5th, 2024. Please upgrade to v3. For " +
"more information, see " +
"https://github.blog/changelog/2024-01-12-code-scanning-deprecation-of-codeql-action-v2/",
);
Copy link
Contributor

Choose a reason for hiding this comment

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

We could optionally set an environment variable such that we only show this warning for the first Action you run, so it only appears once in the workflow logs (at least per job).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd wondered whether we should be including the action name in the warning message, so in general users would still get multiple warnings for a job but each would refer to a specific action. Makes things more explicit? 🤷‍♂️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(though, we're linking to the changelog where the individual actions are listed, so probably is better to just limit ourselves to one warning...)

Copy link
Contributor

Choose a reason for hiding this comment

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

We could change the phrasing to something like "Please update all occurrences of the CodeQL Action in your workflow files to v3"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 I've pushed updates, and included links in the description that demonstrate that the limit to one warning is working.

@nickfyson nickfyson dismissed stale reviews from henrymercer and aeisenberg via a854253 January 19, 2024 14:56
@nickfyson nickfyson merged commit d0c8484 into main Jan 19, 2024
317 checks passed
@nickfyson nickfyson deleted the nickfyson/v2-deprecation-warning branch January 19, 2024 15:30
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.

None yet

3 participants