chore: Migrate Windows runners to Blacksmith for cost and performance#458
chore: Migrate Windows runners to Blacksmith for cost and performance#458
Conversation
Migrates GitHub Actions Windows runners from windows-latest to blacksmith-2vcpu-windows-2025 across all reusable workflows. Benefits: - ~50% cost reduction for Windows CI/CD - ~2x performance improvement (gaming CPUs with higher single-thread performance) - Rapid provisioning (< 3 seconds boot time) - 400MB/s cache throughput (4x GitHub's cache performance) Changes: - os-extension-test.yml: Updated default OS and matrix fallback - pro-extension-test.yml: Updated os and os-test defaults, matrix fallback, and artifact name - pro-extension-build-for-liquibase.yml: Updated OS default and artifact download name - extension-attach-artifact-release.yml: Updated OS default and artifact download name - cleanup-individual-artifacts.yml: Updated matrix OS list - publish-for-liquibase.yml: Updated OS list passed to build workflow DAT-21557 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughUpdates GitHub Actions workflows to migrate Windows runners from Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
.github/workflows/pro-extension-test.yml (2)
516-516: Update outdated comment.The comment states "macOS and Windows are always *-latest", but line 536 now uses
blacksmith-2vcpu-windows-2025for Windows artifacts. This contradicts the implementation.📝 Proposed fix
- # Blacksmith only supports Ubuntu/Linux, so macOS and Windows are always *-latest + # Extract Ubuntu runner name (could be ubuntu-latest or blacksmith-2vcpu-ubuntu-2404) + # macOS uses macos-latest; Windows uses blacksmith-2vcpu-windows-2025
1-645: Change job IDcombineJarstocombine-jarsto comply with naming guidelines.Job and step IDs in workflows must use lower-kebab-case. The
combineJarsjob at line 484 uses camelCase and should be renamed tocombine-jars. Update all references to this job accordingly (including theneedsdependencies in downstream jobs).
🧹 Nitpick comments (1)
.github/workflows/pro-extension-test.yml (1)
533-537: Consider dynamic Windows OS parsing for consistency.Unlike Ubuntu (lines 509-524), the Windows artifact name is hardcoded to
blacksmith-2vcpu-windows-2025. If callers override theosinput to use a different Windows runner (e.g., for rollback as mentioned in the PR), thecombineJarsjob will fail to download the correct artifacts.For consistency and flexibility, consider adding similar parsing logic for Windows:
# Extract Windows runner name WINDOWS_OS=$(echo "${OS_INPUT}" | jq -r '.[] | select(contains("windows"))' | head -n1) echo "windows_os=${WINDOWS_OS}" >> $GITHUB_OUTPUTThen use
${{ steps.parse-os.outputs.windows_os }}on line 536.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (6)
.github/workflows/cleanup-individual-artifacts.yml.github/workflows/extension-attach-artifact-release.yml.github/workflows/os-extension-test.yml.github/workflows/pro-extension-build-for-liquibase.yml.github/workflows/pro-extension-test.yml.github/workflows/publish-for-liquibase.yml
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/*.yml
📄 CodeRabbit inference engine (CLAUDE.md)
.github/workflows/*.yml: Validate GitHub Actions workflow syntax using actionlint for all workflow files
Update self-references from@mainto@new-versionin all workflow files when releasing a new version of build-logic
Use GitHub App Tokens (with LIQUIBASE_GITHUB_APP_ID and LIQUIBASE_GITHUB_APP_PRIVATE_KEY) for cross-repo operations instead of GITHUB_TOKEN
Use AWS Secrets Manager via OIDC with roleLIQUIBASE_VAULT_OIDC_ROLE_ARNand regionus-east-1for accessing/vault/liquibasesecrets
.github/workflows/*.yml: Use two-space indentation in YAML workflow files
Job and step ids in workflows must use lower-kebab-case
Environment variables must use UPPER_SNAKE_CASE in workflows
Keep workflow inputs descriptive and defaulted; document new inputs at the top of each workflow file
Files:
.github/workflows/cleanup-individual-artifacts.yml.github/workflows/extension-attach-artifact-release.yml.github/workflows/pro-extension-build-for-liquibase.yml.github/workflows/os-extension-test.yml.github/workflows/pro-extension-test.yml.github/workflows/publish-for-liquibase.yml
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T16:18:36.824Z
Learning: Applies to .github/workflows/*.yml : Update self-references from `main` to `new-version` in all workflow files when releasing a new version of build-logic
📚 Learning: 2025-12-01T16:18:36.824Z
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T16:18:36.824Z
Learning: Applies to .github/workflows/*.yml : Update self-references from `main` to `new-version` in all workflow files when releasing a new version of build-logic
Applied to files:
.github/workflows/extension-attach-artifact-release.yml.github/workflows/pro-extension-build-for-liquibase.yml.github/workflows/pro-extension-test.yml.github/workflows/publish-for-liquibase.yml
📚 Learning: 2025-12-01T16:18:36.824Z
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T16:18:36.824Z
Learning: Use reusable workflows stored in `.github/workflows/` with DRY (Don't Repeat Yourself) approach for CI/CD logic across Liquibase extensions
Applied to files:
.github/workflows/pro-extension-build-for-liquibase.yml.github/workflows/publish-for-liquibase.yml
📚 Learning: 2025-12-01T16:18:50.027Z
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-01T16:18:50.027Z
Learning: For packaging changes, dry-run against `src/liquibase` assets and verify generated artifacts remain in expected paths
Applied to files:
.github/workflows/pro-extension-build-for-liquibase.yml.github/workflows/publish-for-liquibase.yml
📚 Learning: 2025-12-01T16:18:50.027Z
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-01T16:18:50.027Z
Learning: Use `act -W .github/workflows/os-extension-test.yml` with mocked secrets in `.secrets` for local smoke tests
Applied to files:
.github/workflows/os-extension-test.yml.github/workflows/pro-extension-test.yml.github/workflows/publish-for-liquibase.yml
📚 Learning: 2025-12-01T16:18:36.824Z
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T16:18:36.824Z
Learning: Applies to .github/workflows/*.yml : Use AWS Secrets Manager via OIDC with role `LIQUIBASE_VAULT_OIDC_ROLE_ARN` and region `us-east-1` for accessing `/vault/liquibase` secrets
Applied to files:
.github/workflows/publish-for-liquibase.yml
📚 Learning: 2025-12-01T16:18:36.824Z
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T16:18:36.824Z
Learning: Applies to .github/workflows/*.yml : Use GitHub App Tokens (with LIQUIBASE_GITHUB_APP_ID and LIQUIBASE_GITHUB_APP_PRIVATE_KEY) for cross-repo operations instead of GITHUB_TOKEN
Applied to files:
.github/workflows/publish-for-liquibase.yml
🔇 Additional comments (9)
.github/workflows/cleanup-individual-artifacts.yml (1)
23-23: LGTM: Windows runner updated consistently.The matrix OS update to
blacksmith-2vcpu-windows-2025is correct and will automatically flow through to the artifact deletion step on line 28..github/workflows/publish-for-liquibase.yml (1)
37-37: LGTM: Windows runner migration applied correctly.The OS array now includes
blacksmith-2vcpu-windows-2025and maintains all three platforms (Ubuntu, macOS, Windows) required for the multiplatform artifact build..github/workflows/pro-extension-build-for-liquibase.yml (2)
14-14: LGTM: Default OS input updated consistently.The default OS array now uses
blacksmith-2vcpu-windows-2025. Note that whencombineJars: true, callers should ensure all three platforms (Ubuntu, macOS, Windows) are included in theosinput, as the combineJars job expects artifacts from all three platforms.
295-295: LGTM: Artifact download name updated consistently.The Windows artifact download name correctly references
blacksmith-2vcpu-windows-2025, matching the artifact name pattern generated during upload (line 230) whenmatrix.osis set to the new runner..github/workflows/extension-attach-artifact-release.yml (2)
31-31: LGTM: Default OS updated to Blacksmith runner.The default OS input correctly includes
blacksmith-2vcpu-windows-2025. Callers can override this input if needed, maintaining backward compatibility.
246-246: LGTM: Windows artifact download name aligned with new runner.The artifact name correctly matches the upload pattern from line 216 when the matrix uses
blacksmith-2vcpu-windows-2025..github/workflows/os-extension-test.yml (1)
19-19: OS defaults and matrix fallback correctly use consistent runner name.The
blacksmith-2vcpu-windows-2025runner reference is consistent across both the default input (line 19) and matrix fallback (line 186). The workflow file complies with syntax and naming conventions (2-space indentation, proper YAML structure)..github/workflows/pro-extension-test.yml (2)
14-19: LGTM! Windows runner migration in input defaults.The defaults for
osandos-testinputs have been correctly updated to use the Blacksmith Windows runner, maintaining the JSON array format and backward compatibility through input overrides.
301-301: LGTM! Matrix fallback correctly updated.The fallback value for the test matrix matches the updated default on line 19, ensuring consistency when
os-testinput is not provided.
Fixes a bug where hardcoded Windows artifact names would cause failures when callers override the `os` input parameter. Now dynamically parses both Ubuntu and Windows OS names from the input to ensure artifact names match between build and combineJars jobs. This enables the rollback strategy documented in the PR to work correctly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code Review Fix AppliedDuring review, I identified a critical issue where hardcoded Windows artifact names in the IssueThe artifact download steps had hardcoded
FixAdded dynamic OS name parsing in
The fix extracts the actual OS names from the Rollback Strategy Now WorksWith this fix, the documented rollback approach will work correctly: with:
os: '["ubuntu-latest", "windows-latest"]' |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/pro-extension-build-for-liquibase.yml (1)
280-293: Consider adding validation for empty OS parsing results.The parsing logic is correct per the established pattern. However, if a caller provides an OS array that doesn't include "ubuntu" or "windows" (e.g., only macOS), the respective output will be empty, causing artifact download failures.
♻️ Optional: Add validation to fail fast with a clear error
WINDOWS_OS=$(echo "${OS_INPUT}" | jq -r '.[] | select(contains("windows"))' | head -n1) echo "windows_os=${WINDOWS_OS}" >> $GITHUB_OUTPUT echo "Parsed Windows OS: ${WINDOWS_OS}" + # Validate required OS values + if [ -z "${UBUNTU_OS}" ]; then + echo "::warning::No Ubuntu OS found in inputs - Ubuntu artifact download will fail" + fi + if [ -z "${WINDOWS_OS}" ]; then + echo "::warning::No Windows OS found in inputs - Windows artifact download will fail" + fi.github/workflows/extension-attach-artifact-release.yml (1)
231-244: Consider extracting OS parsing into a reusable composite action.This parsing logic is duplicated across multiple workflow files (also in
pro-extension-build-for-liquibase.ymland likely others in this PR). Based on learnings, extending composite setup actions in.github/actions/is preferred over duplicating boilerplate in workflows.This could be a small composite action like
.github/actions/parse-os-inputs/action.ymlthat accepts the OS JSON array and outputsubuntu_osandwindows_os. This would centralize the logic and make future changes easier.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
.github/workflows/extension-attach-artifact-release.yml.github/workflows/pro-extension-build-for-liquibase.yml.github/workflows/pro-extension-test.yml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/pro-extension-test.yml
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/*.yml
📄 CodeRabbit inference engine (CLAUDE.md)
.github/workflows/*.yml: Validate GitHub Actions workflow syntax using actionlint for all workflow files
Update self-references from@mainto@new-versionin all workflow files when releasing a new version of build-logic
Use GitHub App Tokens (with LIQUIBASE_GITHUB_APP_ID and LIQUIBASE_GITHUB_APP_PRIVATE_KEY) for cross-repo operations instead of GITHUB_TOKEN
Use AWS Secrets Manager via OIDC with roleLIQUIBASE_VAULT_OIDC_ROLE_ARNand regionus-east-1for accessing/vault/liquibasesecrets
.github/workflows/*.yml: Use two-space indentation in YAML workflow files
Job and step ids in workflows must use lower-kebab-case
Environment variables must use UPPER_SNAKE_CASE in workflows
Keep workflow inputs descriptive and defaulted; document new inputs at the top of each workflow file
Files:
.github/workflows/pro-extension-build-for-liquibase.yml.github/workflows/extension-attach-artifact-release.yml
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T16:18:36.824Z
Learning: Applies to .github/workflows/*.yml : Update self-references from `main` to `new-version` in all workflow files when releasing a new version of build-logic
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-01T16:18:50.027Z
Learning: Extend composite setup actions in `.github/actions/` rather than duplicating boilerplate in workflows
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-01T16:18:50.027Z
Learning: Treat every workflow change as production code: run `actionlint`, execute representative `act` scenarios, and capture logs from a consuming repository
📚 Learning: 2025-12-01T16:18:36.824Z
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T16:18:36.824Z
Learning: Use reusable workflows stored in `.github/workflows/` with DRY (Don't Repeat Yourself) approach for CI/CD logic across Liquibase extensions
Applied to files:
.github/workflows/pro-extension-build-for-liquibase.yml
📚 Learning: 2025-12-01T16:18:36.824Z
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T16:18:36.824Z
Learning: Applies to .github/workflows/*.yml : Update self-references from `main` to `new-version` in all workflow files when releasing a new version of build-logic
Applied to files:
.github/workflows/pro-extension-build-for-liquibase.yml.github/workflows/extension-attach-artifact-release.yml
📚 Learning: 2025-12-01T16:18:50.027Z
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-01T16:18:50.027Z
Learning: For packaging changes, dry-run against `src/liquibase` assets and verify generated artifacts remain in expected paths
Applied to files:
.github/workflows/pro-extension-build-for-liquibase.yml
📚 Learning: 2025-11-20T17:40:30.649Z
Learnt from: jnewton03
Repo: liquibase/build-logic PR: 441
File: .github/workflows/pro-extension-test.yml:524-524
Timestamp: 2025-11-20T17:40:30.649Z
Learning: In GitHub Actions workflows, the jq command `echo "$INPUT" | jq -r '.[] | select(contains("ubuntu"))' | head -n1` correctly extracts the first Ubuntu runner name from a JSON array. The `.[]` unpacks array elements (one per line), `select()` filters matches, `-r` outputs raw strings (not JSON), and `head -n1` takes the first result.
Applied to files:
.github/workflows/pro-extension-build-for-liquibase.yml.github/workflows/extension-attach-artifact-release.yml
📚 Learning: 2025-12-01T16:18:50.027Z
Learnt from: CR
Repo: liquibase/build-logic PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-01T16:18:50.027Z
Learning: Applies to .github/workflows/*.yml : Keep workflow inputs descriptive and defaulted; document new inputs at the top of each workflow file
Applied to files:
.github/workflows/extension-attach-artifact-release.yml
🔇 Additional comments (5)
.github/workflows/pro-extension-build-for-liquibase.yml (2)
14-14: LGTM - Windows runner updated to Blacksmith.The default OS input correctly includes the new
blacksmith-2vcpu-windows-2025runner alongsideubuntu-latest, aligning with the PR objective for cost and performance improvements.
295-311: LGTM - Dynamic artifact naming supports rollback flexibility.The artifact download steps now correctly use the parsed OS names, ensuring consistency between the build and combineJars jobs regardless of whether callers use default or overridden OS values.
.github/workflows/extension-attach-artifact-release.yml (3)
31-31: LGTM - Default OS updated consistently.The default OS input is updated to use
blacksmith-2vcpu-windows-2025, matching the pattern established in other workflows in this PR.
246-262: LGTM - Artifact downloads correctly use parsed OS values.The dynamic artifact naming ensures that the combineJars job can correctly download artifacts regardless of which runner names are used (default Blacksmith or overridden to
windows-latestfor rollback).
73-73: Minor: Matrix fallback differs from default OS input.The matrix fallback
'["ubuntu-latest"]'only includes Ubuntu, while the default input at line 31 includes both Ubuntu and Windows. Ifinputs.osis somehow empty/falsy, the build would only run on Ubuntu, which may be intentional for a minimal fallback but could cause artifact download failures in the combineJars job if it expects Windows artifacts.This appears to be a pre-existing pattern. Please verify this fallback behavior is intentional for edge cases where
inputs.osmight be empty.
|
@jandroav is this still relevant? |
Summary
windows-latesttoblacksmith-2vcpu-windows-2025Benefits
Changes
os-extension-test.ymlpro-extension-test.ymlosandos-testdefaults, matrix fallback, artifact namepro-extension-build-for-liquibase.ymlextension-attach-artifact-release.ymlcleanup-individual-artifacts.ymlpublish-for-liquibase.ymlTest plan
osparameterosparameterRollback
If issues arise, override the
osparameter in calling workflows:DAT-21557
🤖 Generated with Claude Code