-
Notifications
You must be signed in to change notification settings - Fork 350
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
Conversation
a1ec01e
to
774d2c3
Compare
ed17f48
to
f72cffc
Compare
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. |
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.
* 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
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/", | ||
); |
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 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).
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 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? 🤷♂️
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.
(though, we're linking to the changelog where the individual actions are listed, so probably is better to just limit ourselves to one warning...)
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 could change the phrasing to something like "Please update all occurrences of the CodeQL Action in your workflow files to v3"?
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've pushed updates, and included links in the description that demonstrate that the limit to one warning is working.
a854253
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 tov3
.The following three workflow runs demonstrate these changes...
v2
of the actionMerge / deployment checklist