Skip to content

[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

Merged
merged 2 commits into from
Jul 11, 2025

Conversation

kalessil
Copy link
Contributor

@kalessil kalessil commented Jul 8, 2025

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:

  • n/a, code review only - similar to the previous PR, the changes are a search and replace performed by an IDE

@kalessil kalessil self-assigned this Jul 8, 2025
@github-actions github-actions bot added the focus: monorepo infrastructure Issues and PRs related to monorepo tooling. label Jul 8, 2025
@kalessil kalessil marked this pull request as ready for review July 8, 2025 07:04
@kalessil kalessil requested a review from a team as a code owner July 8, 2025 07:04
@kalessil kalessil requested review from joshuatf and removed request for a team July 8, 2025 07:04
Copy link
Contributor

github-actions bot commented Jul 8, 2025

Testing Guidelines

Hi @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:

  • 🖼️ Screenshots or screen recordings.
  • 📝 List of functionality tested / steps followed.
  • 🌐 Site details (environment attributes such as hosting type, plugins, theme, store size, store age, and relevant settings).
  • 🔍 Any analysis performed, such as assessing potential impacts on environment attributes and other plugins, conducting performance profiling, or using LLM/AI-based analysis.

⚠️ Within the testing details you provide, please ensure that no sensitive information (such as API keys, passwords, user data, etc.) is included in this public issue.

@kalessil kalessil requested a review from jorgeatorres July 8, 2025 07:04
@woocommercebot woocommercebot requested a review from a team July 8, 2025 07:04
@kalessil kalessil removed the request for review from joshuatf July 8, 2025 07:04
Copy link
Contributor

coderabbitai bot commented Jul 8, 2025

📝 Walkthrough

Walkthrough

The changes update several GitHub Actions workflow files to conditionally select the runner environment for jobs. If the repository is woocommerce/woocommerce, jobs run on the custom blacksmith-2vcpu-ubuntu-2404 runner; otherwise, they use ubuntu-latest. No other workflow logic, steps, or outputs are modified.

Changes

Files Change Summary
.github/workflows/release-cfe-prr-issue-validation.yml Conditionally sets job runner to blacksmith-2vcpu-ubuntu-2404 for woocommerce/woocommerce, else uses ubuntu-latest for six jobs.
.github/workflows/release-code-freeze.yml Conditionally sets job runner for modify-zip-version and notify-slack jobs as above.
.github/workflows/release-commits-and-contributors.yml Applies conditional runner selection to five jobs as above.
.github/workflows/release-prr-cherry-pick.yml Applies conditional runner selection to five jobs as above.

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 the runs-on expression with a YAML anchor

The 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-runner

YAML 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 expressions

Same remark as on release-code-freeze.yml: an anchor or a workflow-level env variable reused via runs-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 once

The 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 swallowing git errors may mask real failures

set +e allows the command to continue even if git 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 anchor

Six 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

📥 Commits

Reviewing files that changed from the base of the PR and between e3b7e2c and 26c4373.

📒 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 with ubuntu-latest

run-code-freeze installs PNPM, Node (from .nvmrc), and executes pnpm build.
Please verify that the custom blacksmith-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 environments

When 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 with if: ${{ env.SLACK_CHANNEL != '' }} (or similar) or making the job conditional on github.repository == 'woocommerce/woocommerce'.

Copy link
Member

@jorgeatorres jorgeatorres left a comment

Choose a reason for hiding this comment

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

Hey @kalessil!

This looks good to me, but I wonder if we can exclude the CFE and PRR workflows for now, as they will be removed/touched by the changes proposed in #59048. Maybe we can revisit what else needs to be moved to Blacksmith those new workflows finally land.

What do you think?

@kalessil
Copy link
Contributor Author

@jorgeatorres : yep, I can revert changes in those workflows for now - thanks for the heads up! Will ping you again when ready.

Copy link
Member

@jorgeatorres jorgeatorres left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @kalessil!

@kalessil kalessil merged commit c4ddb88 into trunk Jul 11, 2025
12 checks passed
@kalessil kalessil deleted the dev/WOOPLUG-4353-release-workflows-migration-batch-2 branch July 11, 2025 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: monorepo infrastructure Issues and PRs related to monorepo tooling.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Blacksmith for release automation
2 participants