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

Update workflows with deprecations #26674

Closed
MikeMcC399 opened this issue May 5, 2023 · 3 comments · Fixed by #26696
Closed

Update workflows with deprecations #26674

MikeMcC399 opened this issue May 5, 2023 · 3 comments · Fixed by #26696
Labels
E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented May 5, 2023

This issue concerns the GitHub repository, not the released Cypress product:

What would you like?

GitHub workflows should not start failing due to removal of node12 (May 18, 2023) and set-output (June 1, 2023) support.

Why is this needed?

Cypress relies on workflows for CI purposes. If these fail, it may not be possible to update or release the product as desired.

Other

Some GitHub workflows generate deprecation warnings due to using old versions of GitHub JavaScript actions. They threaten to fail after May 18, 2023 if they are not updated in time.

In addition to the above problem, .github/workflows/update-browser-versions.yml is also using set-output which is scheduled to stop working on June 1, 2023.

Suggestions

In affected workflows in .github/workflows:

  1. change actions/checkout@v2 to actions/checkout@v3

  2. replace set-output by $GITHUB_OUTPUT in the form

    run: echo "{name}={value}" >> $GITHUB_OUTPUT

Background

node12

https://github.blog/changelog/2023-05-04-github-actions-all-actions-will-run-on-node16-instead-of-node12/

"Node 12 has been out of support since April 2022, as a result we have started the deprecation process of Node 12 for GitHub Actions. We plan to migrate all actions to run on Node16 by Summer 2023.
Following on from our warning in workflows using Node 12, we will start enforcing the use of Node16 rather than Node12 on the 18th of May.

What you need to do
For Actions maintainers: Update your actions to run on Node 16 instead of Node 12 (Actions configuration settings)
For Actions users: Update your workflows with latest versions of the actions which runs on Node 16 (Using versions for Actions)"

save-state / set-output

https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

"To avoid untrusted logged data to use save-state and set-output workflow commands without the intention of the workflow author we have introduced a new set of environment files to manage state and output.

Starting today runner version 2.298.2 will begin to warn you if you use the save-state or set-output commands via stdout. We are monitoring telemetry for the usage of these commands and plan to fully disable them on 31st May 2023. Starting 1st June 2023 workflows using save-state or set-output commands via stdout will fail with an error."

@emilyrohrbough
Copy link
Member

emilyrohrbough commented May 5, 2023

@MikeMcC399 Closing as the node version doesn't appear to be impacting any of our workflows. If I am mistaken, please specify which ones need updated.

@emilyrohrbough emilyrohrbough closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2023
@MikeMcC399
Copy link
Contributor Author

@emilyrohrbough

Closing as the node version doesn't appear to be impacting any of our workflows. If I am mistaken, please specify which ones need updated.

I believe you are indeed mistaken and if no action is taken then workflows which are currently working and providing deprecation warnings will soon fail.

image

image

image

@MikeMcC399
Copy link
Contributor Author

Workflows in danger

  1. https://github.com/cypress-io/cypress/blob/develop/.github/workflows/snyk_sca_scan.yaml
  2. https://github.com/cypress-io/cypress/blob/develop/.github/workflows/snyk_static_analysis_scan.yaml
  3. https://github.com/cypress-io/cypress/blob/develop/.github/workflows/update-browser-versions.yml

Deprecated usage

$ grep actions/checkout@v2 .github/workflows/*
.github/workflows/snyk_sca_scan.yaml:      - uses: actions/checkout@v2
.github/workflows/snyk_static_analysis_scan.yaml:      - uses: actions/checkout@v2
.github/workflows/update-browser-versions.yml:        uses: actions/checkout@v2

$ grep set-output .github/workflows/*
.github/workflows/update-browser-versions.yml:          echo "::set-output name=branch_name::${{ env.BRANCH_NAME }}"
.github/workflows/update-browser-versions.yml:          echo "::set-output name=branch_exists::$(git show-ref --verify --quiet refs/remotes/origin/${{ env.BRANCH_NAME }} && echo 'true')"
.github/workflows/update-browser-versions.yml:          echo "::set-output name=needs_pr::${{ steps.get-versions.outputs.has_update == 'true' && steps.check-branch.outputs.branch_exists != 'true' }}"
.github/workflows/update-browser-versions.yml:          echo "::set-output name=needs_branch_update::${{ steps.get-versions.outputs.has_update == 'true' && steps.check-branch.outputs.branch_exists == 'true' }}"

@nagash77 nagash77 reopened this May 8, 2023
@nagash77 nagash77 self-assigned this May 8, 2023
@nagash77 nagash77 added E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. labels May 8, 2023
@nagash77 nagash77 linked a pull request May 9, 2023 that will close this issue
@nagash77 nagash77 removed their assignment May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants