feat(warming): runner metadata, health checks + status surfaces on aspect ci warming#1299
Merged
Conversation
✨ Aspect Workflows Tasks📅 Sun Jun 28 08:15:18 UTC 2026
|
There was a problem hiding this comment.
💡 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".
…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>
8795a36 to
f14d5c1
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings
aspect ci warmingin 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-baseflag, and emitted no status check or annotation. This PR: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 theHealthCheckTraithealth checks before building. The bespoke--output-baseflag 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.build_start/bazel_attempt_end/build_endBazelTrait hooks (sandbox-state repair, runner-unhealthy signaling) that warming never invoked.warming_resultskind that extendsbazel_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-flagdescriptions across build / test / format / lint / run / gazelle / cache-diff / warming behind a sharedbazel_flag_args(<noun>)helper (mirroringannounce_bazel_args).deliverykeeps its task-specific wording.Changes are visible to end-users: yes
docs/cli/migration/warming.mdxin the site repo — removes the--output-basemention and thesetup-aspectplugin registration from the warming CI examples)--output-basewarming flag was for targeting a specific Bazel server; the runner metadata now supplies it)Suggested release notes
aspect ci warmingnow 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-baseflag is removed — the output base comes from the runner metadata.Test plan
test-warming-template-snapshotssnapshot suite (8 scenarios) plus twowarming_resultsscenarios in the BK-annotation snapshot suite.aspect tests axl(860 unit tests) and all template-snapshot suites pass; flag-helper consistency verified via each task's--help.