Skip to content

feat(warming): runner metadata, health checks + status surfaces on aspect ci warming#1299

Merged
gregmagolan merged 2 commits into
mainfrom
warming-status-surfaces
Jun 28, 2026
Merged

feat(warming): runner metadata, health checks + status surfaces on aspect ci warming#1299
gregmagolan merged 2 commits into
mainfrom
warming-status-surfaces

Conversation

@gregmagolan

Copy link
Copy Markdown
Member

Brings aspect ci warming in line with every other Bazel-calling task and gives it a proper CI status surface.

Previously warming hand-rolled its flag resolution, declared only BazelTrait, took a bespoke --output-base flag, and emitted no status check or annotation. This PR:

  • Routes flag resolution through setup_phase / setup_bazel_command, which folds in the Workflows runner metadata (per-runner --output_base, --output_user_root, repository cache, identity header) and runs the HealthCheckTrait health checks before building. The bespoke --output-base flag is removed — the output base now comes from the runner metadata, and the health check's output-base assertion is satisfied via the active run command.
  • Fires the build_start / bazel_attempt_end / build_end BazelTrait hooks (sandbox-state repair, runner-unhealthy signaling) that warming never invoked.
  • Surfaces the whole run (🧹 clean → 🔨 populate → 📦 archive) as a single GitHub status check / Buildkite annotation via a new warming_results kind that extends bazel_results, so it inherits the shared Targets / Build Metrics / Invocation / Runner-metadata / Task-timing sections. A failed populate or archive fails the check; off a Workflows runner the archive step is reported as skipped and the task still passes.

It also unifies the --bazel-flag / --bazel-startup-flag descriptions across build / test / format / lint / run / gazelle / cache-diff / warming behind a shared bazel_flag_args(<noun>) helper (mirroring announce_bazel_args). delivery keeps its task-specific wording.


Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: yes (companion PR updates docs/cli/migration/warming.mdx in the site repo — removes the --output-base mention and the setup-aspect plugin registration from the warming CI examples)
  • Breaking change (forces users to change their own code or config): no (the removed --output-base warming flag was for targeting a specific Bazel server; the runner metadata now supplies it)
  • Suggested release notes appear below: yes

Suggested release notes

  • aspect ci warming now renders a GitHub status check / Buildkite annotation for the whole run (clean → populate → archive), runs the standard runner health checks, and picks up the Workflows runner metadata automatically. The --output-base flag is removed — the output base comes from the runner metadata.

Test plan

  • New test cases added — test-warming-template-snapshots snapshot suite (8 scenarios) plus two warming_results scenarios in the BK-annotation snapshot suite.
  • Covered by existing test cases — aspect tests axl (860 unit tests) and all template-snapshot suites pass; flag-helper consistency verified via each task's --help.

@aspect-workflows

aspect-workflows Bot commented Jun 28, 2026

Copy link
Copy Markdown

✨ Aspect Workflows Tasks

📅 Sun Jun 28 08:15:18 UTC 2026

⚠️ 2 flagged tasks

  • ⚠️ delivery-gha-debug [delivery] · ⏱ 24.4s · ✨ Aspect · 🐙 GitHub Actions · ☑️ Check
    💬 Delivery complete (1 delivered · 2 warn · 3 skipped)
  • ⚠️ delivery-gha [delivery] · ⏱ 28.1s · ✨ Aspect · 🐙 GitHub Actions · ☑️ Check
    💬 Delivery complete (1 delivered · 2 warn · 3 skipped)

✅ 27 successful tasks

  • ✅ axl-smoke-gha-bootstrap [build] · ⏱ 36.8s · ✨ Aspect · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel build complete (1 built)
  • ✅ run-axl-smoke [run] · ⏱ 18s · 🐙 GitHub Actions · ☑️ Check
    💬 Ran //examples/deliverable:py_deliverable
  • ✅ run-axl-smoke-2 [run] · ⏱ 13s · 🐙 GitHub Actions · ☑️ Check
    💬 Ran //examples/deliverable:sh_deliverable
  • ✅ axl-tests-gha-bootstrap [build] · ⏱ 40.2s · ✨ Aspect · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel build complete (1 built)
  • ✅ build-gha-debug [build] · ⏱ 1m 26s · ✨ Aspect · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel build complete (166 built)
  • ✅ build-gha [build] · ⏱ 1m 24s · ✨ Aspect · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel build complete (166 built)
  • ✅ build-gha-ephemeral [build] · ⏱ 41.3s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel build complete (9 built)
  • ✅ buildifier-gha-debug [buildifier] · ⏱ 52.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ buildifier-gha [buildifier] · ⏱ 1m 32s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-gha-debug [format] · ⏱ 1m 37s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-format-repeat-task [format] · ⏱ 1m 19s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-format-repeat-task-2 [format] · ⏱ 17.1s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-format-repeat-task-3 [format] · ⏱ 15.1s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-format-repeat-task-4 [format] · ⏱ 14.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-gha [format] · ⏱ 1m 30s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ gazelle-gha-debug [gazelle] · ⏱ 54.2s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-from-source-gha-debug [gazelle] · ⏱ 1m 28s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-from-source-gha [gazelle] · ⏱ 2m 5s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-gha [gazelle] · ⏱ 48.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ init-shell [build] · ⏱ 36.2s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel build complete (10 built)
  • ✅ lint-gha-debug [lint] · ⏱ 1m 27s · 🐙 GitHub Actions · ☑️ Check
    💬 Lint complete (clean)
  • ✅ lint-gha [lint] · ⏱ 1m 24s · 🐙 GitHub Actions · ☑️ Check
    💬 Lint complete (clean)
  • ✅ test-gha-debug [test] · ⏱ 3m 33s · ✨ Aspect · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (26/26 passed · 26 cached)
  • ✅ test-gha-coverage [test] · ⏱ 22.4s · ✨ Aspect · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed · 1 cached)
  • ✅ test-gha-target-pattern-file [test] · ⏱ 14.5s · ✨ Aspect · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed · 1 cached)
  • ✅ test-gha [test] · ⏱ 1m 24s · ✨ Aspect · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (26/26 passed · 25 cached)
  • ✅ test-gha-ephemeral [test] · ⏱ 45.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed)

🔁 Reproduce

⚠️ delivery (delivery-gha-debug · delivery-gha)

# --mode=always --track-state=false for off-runner with no state backend.
aspect delivery \
  --commit-sha=935cc291a255309c425b543f73b2dbb70e49d2c8 \
  --mode=always \
  --track-state=false \
  --dry-run=true

Install aspect: aspect.build/docs/cli/install


⏱ Last updated Sun Jun 28 08:18:43 UTC 2026 · 📊 GitHub API quota 395/15,000 (3% used, resets in 50m)
🚀 Powered by Aspect CLI (v0.0.0-dev)  |  Aspect Build · X · LinkedIn · YouTube

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8795a36098

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread crates/aspect-cli/src/builtins/aspect/warming.axl
…spect ci warming`

Bring `aspect ci warming` in line with every other Bazel-calling task:

- Resolve flags through `setup_phase`/`setup_bazel_command`, which folds in the
  Workflows runner metadata (per-runner `--output_base`, repository cache,
  identity header) and runs the `HealthCheckTrait` health checks before
  building. Drops the bespoke `--output-base` flag — the output base now comes
  from the runner metadata.
- Fire the `build_start` / `bazel_attempt_end` / `build_end` BazelTrait hooks
  (sandbox-state repair, runner-unhealthy signaling) that the task previously
  never invoked.
- Surface the whole run (clean → populate → archive) as a single GitHub status
  check / Buildkite annotation via a new `warming_results` kind that extends
  `bazel_results`. Off a Workflows runner the archive step is reported skipped
  and the task still passes.

Also unify the `--bazel-flag` / `--bazel-startup-flag` descriptions across
build/test/format/lint/run/gazelle/cache-diff/warming behind a shared
`bazel_flag_args(<noun>)` helper (mirroring `announce_bazel_args`); delivery
keeps its task-specific wording.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gregmagolan gregmagolan force-pushed the warming-status-surfaces branch from 8795a36 to f14d5c1 Compare June 28, 2026 08:01
The Workflows `agent_health_check` (run inside `setup_phase`) calls
`ctx.bazel.health_check()`, which starts/uses the Bazel server in the runner
`--output_base` under the storage mount. The previous ordering ran the
prior-state cleanup *after* `setup_phase`, so it deleted `<mount>/output/*` out
from under that live server — poisoning it and risking a failed populate build.

Move the cleanup ahead of `setup_phase` (restoring the original order relative
to any Bazel interaction). It's best-effort and runs before the status surface
is open, so it's logged to the CLI and recorded in `data["warming"]["cleaned"]`
rather than rendered as its own surface phase.

Reported by Codex on the PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gregmagolan gregmagolan merged commit 57ddbf4 into main Jun 28, 2026
70 checks passed
@gregmagolan gregmagolan deleted the warming-status-surfaces branch June 28, 2026 08:18
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.

1 participant