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

Remove deprecated parts of Actions workflows #566

Merged
merged 13 commits into from
Mar 9, 2023
Merged

Remove deprecated parts of Actions workflows #566

merged 13 commits into from
Mar 9, 2023

Conversation

vdye
Copy link
Collaborator

@vdye vdye commented Mar 7, 2023

These fixups should fix all of the deprecation warnings found across this repository's workflows with the exception of check-whitespace (fixed upstream) and git-artifacts (removed upstream).

  • Patches 1-3 fix set-output syntax
  • Patches 4-8 upgrade the version of actions/checkout
  • Patch 9 upgrades actions/github-script and updates usage of the github instance
  • Patch 10 upgrades actions/setup-dotnet to v3
  • Patch 11 upgrades actions/upload-artifact to v3
  • Patch 12 upgrades the mjcheetham/* actions (see the pull requests updating asset-hash and update-homebrew for more details).
  • Patch 13 upgrades the OS versions used in the Scalar Functional tests to Actions-supported versions. This patch can be dropped if we still want to test the older OS versions.

vdye added 9 commits March 2, 2023 15:04
Replace deprecated 'echo "::set-output name=...' syntax with new 'echo
"<name>=<value>" >>$GITHUB_OUTPUT' syntax [1], clearing the deprecation
warning appearing in the 'release-homebrew.yml' workflow.

[1] https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Replace deprecated 'echo "::set-output name=...' syntax with new 'echo
"<name>=<value>" >>$GITHUB_OUTPUT' syntax [1]. A second fixup patch will
remove the one remaining instance of the old syntax to clear the deprecation
warning in 'build-git-installers.yml'.

[1] https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Finish replacing deprecated 'echo "::set-output name=...' syntax with new
'echo "<name>=<value>" >>$GITHUB_OUTPUT' syntax [1], clearing the
deprecation warning appearing in the 'build-git-installers.yml' workflow.

[1] https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Update 'actions/checkout' to v3 to stop using a deprecated Node.js 12
version of the action.
Update 'actions/checkout' to v3 to stop using a deprecated Node.js 12
version of the action.
Update 'actions/checkout' to v3 to stop using a deprecated Node.js 12
version of the action.
Update 'actions/checkout' to v3 to stop using a deprecated Node.js 12
version of the action.
Update 'actions/checkout' to v3 to stop using a deprecated Node.js 12
version of the action.
Upgrade 'actions/github-script' from v4 to v6 to silence the Node.js 12
deprecation warning. Note that this also includes an update to how the
'github' object is accessed in the script ('github' -> 'github.rest') due to
a breaking change introduced in v5 [1].

[1] https://github.com/actions/github-script#breaking-changes-in-v5
@vdye vdye self-assigned this Mar 7, 2023
vdye added 4 commits March 6, 2023 18:08
Upgrade the 'actions/setup-dotnet' Action to v3 to stop using Node.js 12
(deprecated).

Signed-off-by: Victoria Dye <vdye@github.com>
Upgrade the 'actions/upload-artifact' Action to v3 to stop using Node.js 12
(deprecated).

Signed-off-by: Victoria Dye <vdye@github.com>
Update to Node.js 16 versions of 'mjcheetham/asset-hash' [1] and
'mjcheetham/update-homebrew' [2].

[1] mjcheetham/asset-hash#342
[2] mjcheetham/update-homebrew#17
Update the runner versions for the Scalar Functional tests to supported
versions. For MacOS, update to the main supported version (macos-11). For
Ubuntu, ensure we're still testing the two latest LTS versions by replacing
18.04 with 22.04.

Also update the installed dotnet version to the latest v3.1 patch version.

Signed-off-by: Victoria Dye <vdye@github.com>
Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

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

What a delightful read. Neatly organized, well explained, a highlight of my day.

@@ -797,7 +797,7 @@ jobs:

// Create the release
var tagName = "${{ needs.prereqs.outputs.tag_name }}";
var createdRelease = await github.repos.createRelease({
var createdRelease = await github.rest.repos.createRelease({
Copy link
Member

Choose a reason for hiding this comment

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

I hope you did not have a hard time finding out about that; I should have remembered to point out that I had to fix plenty of those in the corresponding git/git patch.

Copy link
Collaborator

@ldennington ldennington left a comment

Choose a reason for hiding this comment

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

Great cleanup! 🚀

@@ -20,17 +20,17 @@ jobs:
fail-fast: false
matrix:
# Order by runtime (in descending order)
os: [windows-2019, macos-10.15, ubuntu-18.04, ubuntu-20.04]
os: [windows-2019, macos-11, ubuntu-20.04, ubuntu-22.04]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: To reduce future churn, perhaps use ubuntu-<previous LTS>, ubuntu-latest .

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

GitHub Actions isn't consistent about which LTS release ubuntu-latest refers to (for example, ubuntu-latest right now is ubuntu-20.04, but IIRC before 22.04 was available ubuntu-latest was still ubuntu-20.04), so we can't really rely on it. If we need to manually update one of the version numbers anyway, hopefully it's not too disruptive to update both.

@derrickstolee
Copy link
Collaborator

I updated the required builds to the latest names with this change. Merging now.

@derrickstolee derrickstolee merged commit 75f0b59 into microsoft:vfs-2.39.2 Mar 9, 2023
dscho added a commit that referenced this pull request Mar 20, 2023
This is a companion to #566.

I pushed a tag to trigger [a
build](https://github.com/microsoft/git/actions/runs/4447499276) that
demonstrates that all the deprecation warnings are gone (for now).
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.

4 participants