Skip to content

fix(ci): harden v1.0.0 workflows for self-hosted runners - #38

Merged
AnuragVasanwala merged 1 commit into
mainfrom
v1.0.0/fix/self-hosted-runner-gaps
Oct 1, 2026
Merged

AnuragVasanwala merged 1 commit into
mainfrom
v1.0.0/fix/self-hosted-runner-gaps

Conversation

@Adi-ty

@Adi-ty Adi-ty commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

PR #37 moved every job to runs-on: [self-hosted], but the ARC runner pods are a minimal
Ubuntu 24.04 image with no AWS CLI, no yq and no pip — so the deploy and self-check jobs
could not run at all, and wp-cd.yml merged after the sweep still carried ubuntu-latest.
This makes every workflow actually work on those runners, and makes the runner rules and two
silent-failure bugs enforceable instead of documented.

Changes

  • wp-cd: run validate-inputs on [self-hosted]; it merged after the
    runner enforcement pass (fix: enforce self-hosted runners in workflows #37) and was the only job left on
    ubuntu-latest.
  • check-workflows: go back to mikefarah/yq. The PyYAML loader from fix: enforce self-hosted runners in workflows #37
    turned every boolean into a string, so required == true never
    matched and the required-input check found 0 of 18.
  • check-workflows: fail on any runs-on label outside the org runner
    policy allow-list, so a GitHub-hosted label can't slip in again.
  • self-check: install a pinned, checksum-verified yq (the self-hosted
    runners ship none) and pin actions/setup-python to its v5.6.0 SHA.
  • cd-s3: install a pinned, checksum-verified AWS CLI when the runner
    has none; the self-hosted runners do not ship one.
  • detect-changes: fetch an explicit base-ref before diffing, and fail
    when the diff cannot run instead of reporting zero changes and
    skipping every job green.
  • test-build-artifact: pin wp-cli/doctor-command to 2.3.1; @stable
    resolved to v3.0.0, which needs wp-cli ^3.0 and fails on wp-env's 2.12.
  • docs: self-hosted runner notes in AGENTS.md and README.md; CHANGELOG
    dated 2026-09-30 with the fixes above.

@Adi-ty
Adi-ty force-pushed the v1.0.0/fix/self-hosted-runner-gaps branch from fbc90f1 to dca93d2 Compare September 30, 2026 13:35
@Adi-ty

Adi-ty commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Reverted check-workflows.sh to yq. The PyYAML loader turned required: true into "true", so the required-input check stopped matching and found 0 of 18 required inputs while CI stayed green. Self Check now installs mikefarah/yq with a checksum check, and all 18 are detected again.

cc: @AnuragVasanwala @iamimmanuelraj @dipankardas011

@Adi-ty

Adi-ty commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Hi @dipankardas011 @iamimmanuelraj following up on #37. We're tagging v1 of these shared workflows and making this repo public today. While testing the workflows on the self-hosted runners we hit a few questions

  • Docker / wp-env: jobs that start wp-env (ci-test-php with wp-env, ci-test-a11y, ci-test-build-artifact) fail on ARC at docker compose with exit 125. The same jobs pass on GitHub-hosted runners. How is Docker provided on the runners (a dind sidecar?), and can workspace paths be bind-mounted into containers? Is there a setup you recommend for docker compose?
  • Platform: In our tests, [self-hosted] reached three ARC runner pools, arc-medium-onprem-2pc and arc-medium-tr-rt-gw, all Ubuntu 24.04 x64. Is every runner behind plain self-hosted guaranteed to be Linux x64? The allow-list includes macOS and self-hosted-arm64: do those runners also carry the self-hosted label? Our pinned binaries are x86_64 only.

cc: @AnuragVasanwala

@AnuragVasanwala AnuragVasanwala left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@iamimmanuelraj @dipankardas011

I am approving and merging this PR. Nothing in it blocks the merge. If anything needs an update, please open a follow-up PR and tag us for review.

Notes:

  1. Required-input check: The PyYAML loader from #37 read required: true as text, so bin/check-workflows.sh passed even when an example left out required inputs. This PR restores the check with a pinned, checksum-verified yq.

  2. Runner expression: Next, we will add a runs-on: ${{ ... }} expression, so private callers get self-hosted and public callers get ubuntu-latest. The runner scanner flags ${{ in private repos, so we will make this repo public before that change merges.

  3. Other orgs: The ARC runners are registered to the rtCamp org only. Callers in other orgs, such as VIP, will need runner: ubuntu-latest.

  4. Runner image: If feasible you please add these to the ARC image?

    • Docker Compose v2: wp-env needs it, and a client project's CI currently installs it inside the job.
    • svn: cd-wp-org needs it for WordPress.org deploys, and #38's runner notes list it as missing.
  5. Reviews: For future changes on this repo, could you please add <@AnuragVasanwala> and <@adi-tya> as reviewers?

@AnuragVasanwala
AnuragVasanwala merged commit 1afaadf into main Oct 1, 2026
2 checks passed
@AnuragVasanwala
AnuragVasanwala deleted the v1.0.0/fix/self-hosted-runner-gaps branch October 1, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants