-
Notifications
You must be signed in to change notification settings - Fork 10.8k
[dev] Release: switch release-workflows to run on Blacksmith (batch 2) #59494
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
[dev] Release: switch release-workflows to run on Blacksmith (batch 2) #59494
Conversation
Testing GuidelinesHi @jorgeatorres @woocommerce/flux, Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. Reminder: PR reviewers are required to document testing performed. This includes:
|
📝 WalkthroughWalkthroughThe changes update several GitHub Actions workflow files to conditionally select the runner environment for jobs. If the repository is Changes
Possibly related PRs
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (6)
.github/workflows/release-code-freeze.yml (1)
19-21
: DRY up theruns-on
expression with a YAML anchorThe identical (and rather long) expression is repeated five-times in this workflow. Repetition is easy to overlook when the runner name or condition changes in the future.
One low-friction way to de-duplicate inside a single YAML file is to introduce an anchor at the top of the workflow and reuse it:
16 jobs: + # Re-usable runner selector + x-default-runner: &default-runner "${{ ( github.repository == 'woocommerce/woocommerce' && 'blacksmith-2vcpu-ubuntu-2404' ) || 'ubuntu-latest' }}" check-feature-freeze-event: - runs-on: ${{ ( github.repository == 'woocommerce/woocommerce' && 'blacksmith-2vcpu-ubuntu-2404' ) || 'ubuntu-latest' }} + runs-on: *default-runner ... - runs-on: ${{ ( github.repository == 'woocommerce/woocommerce' && 'blacksmith-2vcpu-ubuntu-2404' ) || 'ubuntu-latest' }} + runs-on: *default-runnerYAML anchors are resolved before GitHub parses the workflow, so the expression will still be evaluated correctly.
This keeps maintenance to one place and improves readability.Also applies to: 70-71, 117-118, 182-183, 215-216
.github/workflows/release-prr-cherry-pick.yml (2)
25-26
: Consider centralising the runner selector to avoid five identical expressionsSame remark as on
release-code-freeze.yml
: an anchor or a workflow-levelenv
variable reused viaruns-on: *default-runner
will cut noise and future copy-paste errors.Also applies to: 75-76, 125-126, 144-145, 163-164
129-131
: Typo in step id:release-breanch-check
Minor spelling mistake (
breanch
) – won’t break the workflow but hurts grepping and consistency.- id: release-breanch-check + id: release-branch-check.github/workflows/release-commits-and-contributors.yml (2)
16-17
: Runner expression repetition – extract onceThe same conditional appears in five jobs. Introduce a YAML anchor (
&default-runner
) and reference it (*default-runner
) to keep the file shorter and avoid accidental drift.Also applies to: 144-145, 180-181, 241-242, 365-366
160-168
: Silently swallowinggit
errors may mask real failures
set +e
allows the command to continue even ifgit rev-list
fails (e.g., branch missing).
You already capture the exit code—good—but consider failing early instead of printing the raw error string to avoid reporting a misleading commit/contributor count of “error text”..github/workflows/release-cfe-prr-issue-validation.yml (1)
11-12
: Factor the runner selector into an anchorSix identical
runs-on
expressions; same DRY comment as in the other workflows.Also applies to: 42-43, 192-193, 209-210, 255-256, 317-318
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/release-cfe-prr-issue-validation.yml
(6 hunks).github/workflows/release-code-freeze.yml
(2 hunks).github/workflows/release-commits-and-contributors.yml
(5 hunks).github/workflows/release-prr-cherry-pick.yml
(5 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
PR: woocommerce/woocommerce#0
File: .cursor/rules/generate-pr-description.mdc:0-0
Timestamp: 2025-06-30T09:26:55.361Z
Learning: Provide clear, step-by-step instructions for how to test the changes in the PR description.
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#59445
File: .github/workflows/release-update-stable-tag.yml:73-101
Timestamp: 2025-07-07T18:35:48.213Z
Learning: GitHub Actions ubuntu-latest runner image includes PHP CLI by default, so no additional installation step is needed when using PHP commands in workflows.
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#59445
File: .github/workflows/release-update-stable-tag.yml:73-101
Timestamp: 2025-07-07T18:35:48.213Z
Learning: GitHub Actions ubuntu-latest runner image includes PHP 8.3 by default as part of Ubuntu 24.04 LTS, so no additional installation step is needed when using PHP commands in workflows.
Learnt from: gigitux
PR: woocommerce/woocommerce#58785
File: plugins/woocommerce/client/blocks/package.json:0-0
Timestamp: 2025-06-17T10:25:36.686Z
Learning: Do not suggest using `cross-env` in the WooCommerce repository as it's deprecated/archived and the team is working to remove it from blocks commands to reduce the dependency tree. Instead, inline environment variables like `WP_EXPERIMENTAL_MODULES=true knip` should work fine in supported environments.
.github/workflows/release-prr-cherry-pick.yml (4)
Learnt from: CR
PR: woocommerce/woocommerce#0
File: .cursor/rules/woo-phpunit.mdc:0-0
Timestamp: 2025-06-30T09:27:17.200Z
Learning: Applies to plugins/woocommerce/tests/**/*.php : Run WooCommerce PHPUnit tests for specific files or directories using the command: pnpm run test:php:env {relative_path} --verbose, and ensure the command is run in the plugins/woocommerce directory.
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#59445
File: .github/workflows/release-update-stable-tag.yml:73-101
Timestamp: 2025-07-07T18:35:48.213Z
Learning: GitHub Actions ubuntu-latest runner image includes PHP 8.3 by default as part of Ubuntu 24.04 LTS, so no additional installation step is needed when using PHP commands in workflows.
Learnt from: CR
PR: woocommerce/woocommerce#0
File: .cursor/rules/git.mdc:0-0
Timestamp: 2025-06-30T09:27:06.883Z
Learning: Branch names should follow the structure: 'release/{version}' for release branches.
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#59445
File: .github/workflows/release-update-stable-tag.yml:73-101
Timestamp: 2025-07-07T18:35:48.213Z
Learning: GitHub Actions ubuntu-latest runner image includes PHP CLI by default, so no additional installation step is needed when using PHP commands in workflows.
.github/workflows/release-code-freeze.yml (3)
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#59445
File: .github/workflows/release-update-stable-tag.yml:73-101
Timestamp: 2025-07-07T18:35:48.213Z
Learning: GitHub Actions ubuntu-latest runner image includes PHP CLI by default, so no additional installation step is needed when using PHP commands in workflows.
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#59445
File: .github/workflows/release-update-stable-tag.yml:73-101
Timestamp: 2025-07-07T18:35:48.213Z
Learning: GitHub Actions ubuntu-latest runner image includes PHP 8.3 by default as part of Ubuntu 24.04 LTS, so no additional installation step is needed when using PHP commands in workflows.
Learnt from: gigitux
PR: woocommerce/woocommerce#58785
File: plugins/woocommerce/client/blocks/package.json:0-0
Timestamp: 2025-06-17T10:25:36.686Z
Learning: Do not suggest using `cross-env` in the WooCommerce repository as it's deprecated/archived and the team is working to remove it from blocks commands to reduce the dependency tree. Instead, inline environment variables like `WP_EXPERIMENTAL_MODULES=true knip` should work fine in supported environments.
.github/workflows/release-commits-and-contributors.yml (2)
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#59445
File: .github/workflows/release-update-stable-tag.yml:73-101
Timestamp: 2025-07-07T18:35:48.213Z
Learning: GitHub Actions ubuntu-latest runner image includes PHP CLI by default, so no additional installation step is needed when using PHP commands in workflows.
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#59445
File: .github/workflows/release-update-stable-tag.yml:73-101
Timestamp: 2025-07-07T18:35:48.213Z
Learning: GitHub Actions ubuntu-latest runner image includes PHP 8.3 by default as part of Ubuntu 24.04 LTS, so no additional installation step is needed when using PHP commands in workflows.
.github/workflows/release-cfe-prr-issue-validation.yml (2)
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#59445
File: .github/workflows/release-update-stable-tag.yml:73-101
Timestamp: 2025-07-07T18:35:48.213Z
Learning: GitHub Actions ubuntu-latest runner image includes PHP 8.3 by default as part of Ubuntu 24.04 LTS, so no additional installation step is needed when using PHP commands in workflows.
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#59445
File: .github/workflows/release-update-stable-tag.yml:73-101
Timestamp: 2025-07-07T18:35:48.213Z
Learning: GitHub Actions ubuntu-latest runner image includes PHP CLI by default, so no additional installation step is needed when using PHP commands in workflows.
🔇 Additional comments (2)
.github/workflows/release-code-freeze.yml (1)
128-140
: Double-check Blacksmith image parity withubuntu-latest
run-code-freeze
installs PNPM, Node (from.nvmrc
), and executespnpm build
.
Please verify that the customblacksmith-2vcpu-ubuntu-2404
runner already has:
git
,tar
, typical build-essentials- Working
pnpm/action-setup
cache location permissions- Adequate disk space (the monorepo build can be >3 GB)
If any of these are missing the step will fail only on
woocommerce/woocommerce
, which may slip through CI on forks..github/workflows/release-cfe-prr-issue-validation.yml (1)
223-233
: Slack message hard-codes channel IDs – verify they exist in all environmentsWhen forks trigger this workflow, the secrets and channel IDs might be absent, causing a silent failure of the
archive/github-actions-slack
step.
Consider wrapping Slack steps withif: ${{ env.SLACK_CHANNEL != '' }}
(or similar) or making the job conditional ongithub.repository == 'woocommerce/woocommerce'
.
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.
@jorgeatorres : yep, I can revert changes in those workflows for now - thanks for the heads up! Will ping you again when ready. |
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.
LGTM! Thanks @kalessil!
Submission Review Guidelines:
Changes proposed in this Pull Request:
Closes #58171, WOOPLUG-4353
Batch 1: #59361
Migrates the next batch of release workflows to run on Blacksmith.
How to test the changes in this Pull Request: