WordPress.org

Make WordPress Core

Opened 7 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#53080 closed defect (bug) (fixed)

Use the `concurrency` option in GitHub Actions workflows.

Reported by: desrosj Owned by: desrosj
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch commit
Focuses: Cc:

Description

GitHub has recently announced a new concurrency key for use at the workflow and job level to ensure only a single workflow run or job is in progress. When used in combination with the cancel-in-progress key, incomplete workflow runs can be cancelled automatically to prevent running workflows unnecessarily.

The feature is currently in beta. However, once it's stable enough, this can replace the need to rely on the 3rd party styfle/cancel-workflow-action action.

Related information:

Some outstanding bug reports:

Change History (6)

This ticket was mentioned in PR #1217 on WordPress/wordpress-develop by ocean90.


6 weeks ago

  • Keywords has-patch added

#2 @ocean90
6 weeks ago

The reported bugs have been fixed by GitHub. Tested in PR #1217 and it seems to work so far.

#3 @prbot
4 weeks ago

desrosj commented on PR #1217:

Just noting that before commit, I am going to add the following:

  • Change the cancel-in-progress to a true value.
  • Going to add concurrency to the coding standards and compatibility workflows. These did not have a step to cancel previous runs, but I did not include that originally because they typically run in 1-2 minutes total, so the additional step was not really worth it. Where it's native now, doesn't hurt to add for when there is a backlog.

#4 @desrosj
4 weeks ago

  • Keywords commit added
  • Milestone changed from Future Release to 5.8
  • Owner set to desrosj
  • Status changed from new to assigned

#5 @desrosj
4 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 50930:

Build/Test Tools: Use the new concurrency setting for GitHub Actions.

The new concurrency setting can be used to ensure only a single workflow run or job is in progress. When used in combination with the cancel-in-progress setting, incomplete workflow runs can be cancelled automatically to prevent running workflows unnecessarily.

The workflows that take longer to run previously had this built into a step and utilized a 3rd-party action. Now that this is natively supported by GitHub Actions, using that is preferred.

This option is currently in beta, but is stable enough to use in our workflows for the time being.

Props ocean90.
Fixes #53080.

Note: See TracTickets for help on using tickets.