#61213 closed enhancement (fixed)
Convert GitHub Action workflows into reusable ones
Reported by: | desrosj | Owned by: | desrosj |
---|---|---|---|
Milestone: | 6.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | Cc: |
Description
In trunk
, Core's GitHub Action workflows are a mix of standard and reusable workflows. While each have pros and cons, the advantages of reusable workflows outweigh the shortcomings, primarily because it makes maintaining the workflows within the 25 (and growing) old branches that can still receive security updates significantly easier.
The PHPUnit and build process testing workflows have been callable for a few release cycles now and there have been no major problems. Here is a quick breakdown of the pros and cons:
Benefits
- All branches receiving security updates immediately receive the benefits of performance improvements to the callable workflow file used from
trunk
. - All branches receive the 3rd-party action updates updated when updated in
trunk
. - Any changes required at the platform level only need to be applied in
trunk
(changes to the versions of Node.js found on images or removal ofsave-state
/set-output
as examples).
Disadvantages
- Because a repository and branch is specified when using the workflow, the version of the file found in
trunk
is always used, even within PRs. The best way around this is to change theuses:
path to the PR's fork repository/branch. - Truly using one reusable workflow for all branches would result in a large number of inputs and steps that are skipped. There will likely need to be 2 versions of a few workflows to account for major updates to how a workflow works (see #45863).
This ticket proposes the following:
- Extract the actual testing/building logic in all workflows to reusable ones that accept inputs to configure the environment.
- Establish a naming practice and standardize all reusable workflows so it's clear which files are reusable and which ones contain the strategy matrix/permission configuration.
- Update old branches to use the workflow file in
trunk
.
Attachments (1)
Change History (111)
This ticket was mentioned in PR #6232 on WordPress/wordpress-develop by @desrosj.
4 months ago
#1
#2
@
4 months ago
- Owner set to desrosj
- Resolution set to fixed
- Status changed from new to closed
In 58165:
#4
@
4 months ago
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening to handle the necessary backporting.
#6
@
4 months ago
I'm going to stop here for today and see how these two branches go. I'll update the other PR branches and plan to go back further later next week.
This ticket was mentioned in Slack in #core-performance by johnbillion. View the logs.
4 months ago
This ticket was mentioned in PR #6586 on WordPress/wordpress-develop by @desrosj.
4 months ago
#10
This updates the logic around generating the necessary parts for playground comments to be more reusable, making it possible for old branches to use this feature without added maintenance burden.
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6385 on WordPress/wordpress-develop by @desrosj.
4 months ago
#12
This updates the 6.4 branch to make use of the reusable workflows introduced in [58165].
In addition, several Build Tool related maintenance and convenience changes are being included.
- Fixing npm test jobs that are failing as a result of SVN related commands (this has been deprecated on GHA runners) (and [[Trac Changeset 57249(https://core.trac.wordpress.org/changeset/57249 Trac-61216]]).
- Changes that improve how links for testing PRs in a Playground environment are posted, ensuring the comments are posted for PRs to non-
trunk
branches (Core-59416). - https://core.trac.wordpress.org/changeset/57125
Docker related:
- Migrating to Docker Compose v2 (Trac-60901)
Trac ticket: https://core.trac.wordpress.org/ticket/61213.
- Removing the
version
property fromdocker-compose.yml
(Trac-61101) - Fixing the MySQL container properties to work correctly with newer releases of Docker/containers that don't support ARM (MySQL < 8.0) (Trac-60822).
This ticket was mentioned in PR #6724 on WordPress/wordpress-develop by @desrosj.
3 months ago
#19
This adds an input to prevent test errors from failing the workflow. This is useful for older branches where support for a specific version of PHP was not 100%.
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6517 on WordPress/wordpress-develop by @desrosj.
3 months ago
#22
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6742 on WordPress/wordpress-develop by @desrosj.
3 months ago
#26
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6519 on WordPress/wordpress-develop by @desrosj.
3 months ago
#33
This ticket was mentioned in PR #6525 on WordPress/wordpress-develop by @desrosj.
3 months ago
#34
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in Slack in #core by desrosj. View the logs.
3 months ago
This ticket was mentioned in PR #6906 on WordPress/wordpress-develop by @desrosj.
3 months ago
#36
Trac ticket: Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6907 on WordPress/wordpress-develop by @desrosj.
3 months ago
#37
Trac ticket: Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6908 on WordPress/wordpress-develop by @desrosj.
3 months ago
#38
Trac ticket: Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6915 on WordPress/wordpress-develop by @desrosj.
3 months ago
#39
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6916 on WordPress/wordpress-develop by @desrosj.
3 months ago
#40
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6921 on WordPress/wordpress-develop by @desrosj.
3 months ago
#41
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6922 on WordPress/wordpress-develop by @desrosj.
3 months ago
#42
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6923 on WordPress/wordpress-develop by @desrosj.
3 months ago
#44
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6924 on WordPress/wordpress-develop by @desrosj.
3 months ago
#45
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6925 on WordPress/wordpress-develop by @desrosj.
3 months ago
#46
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6926 on WordPress/wordpress-develop by @desrosj.
3 months ago
#47
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6934 on WordPress/wordpress-develop by @desrosj.
3 months ago
#48
Trac ticket: https://core.trac.wordpress.org/ticket/61213
This ticket was mentioned in PR #6938 on WordPress/wordpress-develop by @desrosj.
3 months ago
#51
Trac ticket: https://core.trac.wordpress.org/ticket/61213
#103
@
2 months ago
- Keywords fixed-major removed
- Resolution set to fixed
- Status changed from reopened to closed
I think we can close this out as fixed and open any necessary follow up tickets.
The lone remaining logic in old branches that is not reusable is the failed-workflow
job responsible for dispatching failed-workflow.yml
on the first failure. This one should require much less maintenance, and we can look at making this reusable in the future.
Trac ticket: https://core.trac.wordpress.org/ticket/61213