Skip to main content
A feature is behavior that applies across tasks rather than belonging to one: status checks, artifact upload, the remote cache connection. The built-in @aspect module registers the features on this page, and every one is enabled by default. Most act only where they apply, such as BuildkiteAnnotations on Buildkite, and the upload features upload nothing until you choose what. Run aspect feature to list the features active in your repository, and aspect feature <name> to print one feature’s flags.

Setting a feature’s options

Every option has a command-line flag, --<feature>:<option>, that applies to one invocation:
Set it for every invocation in .aspect/config.axl through ctx.features, using the option’s underscore name:
.aspect/config.axl
Turn a feature off with --<feature>:enabled=false, or ctx.features[<Feature>].enabled = False in config.axl. Each feature loads from @aspect//feature/<file>.axl:

ArtifactUpload

Uploads build outputs to your CI provider’s artifact storage: GitHub Actions, Buildkite, CircleCI or GitLab. Everything is off by default, because artifacts are visible to anyone with access to the repository’s CI. See Artifact upload for what each artifact is for.

BazelFlags

Removes flags that Aspect would otherwise add to a task’s Bazel call. It never touches flags you pass yourself. Endpoints, credentials and the runner’s output paths can’t be omitted. The rc that aspect setup bazelrc writes has its own --omit-bazel-flag.

BuildkiteAnnotations

Posts each task’s live status as a Buildkite annotation.

CircleCITestResults

Uploads Bazel’s JUnit results to CircleCI’s Tests tab. Acts only on CircleCI, and uploads nothing until you choose which results.

Deployment

Connects a task to a deployment’s remote cache, build event service and remote execution. Its flags carry no prefix. On an Aspect Workflows runner the Workflows feature connects the runner’s own endpoints, and an explicit --remote is refused.

GithubLintComments

Posts aspect lint findings as GitHub pull request review comments, with fix suggestions where the linter provides them. Needs the Aspect Workflows GitHub App.

GithubStatusChecks

Reports each task’s live status as a GitHub check run. Needs the Aspect Workflows GitHub App.

GithubStatusComments

Keeps one comment on the pull request with every task’s live status.

GitlabCommitStatuses

Reports each task’s live status as a GitLab commit status on merge request pipelines. Needs the Aspect Workflows GitLab App.

GitlabLintComments

Posts aspect lint findings as discussions on the merge request diff. Needs the Aspect Workflows GitLab App.

GitlabStatusComments

Keeps one note on the merge request with every task’s live status.

Telemetry

Exports the CLI’s traces and metrics over OTLP. For per-signal routing or resource attributes, call ctx.telemetry.exporters.add() from config.axl.

Tips

Collects and shows short, non-fatal suggestions on each task. See Add and customize tips.

Workflows

Configures Bazel for an Aspect Workflows runner: the runner’s cache, build event service, output paths and health checks. Off a runner it connects the endpoints an ASPECT_WORKFLOWS_* environment names, if any. On a runner it injects, among others:
  • --remote_cache pointing at the runner’s local cache daemon, and the deployment’s build event service.
  • --repository_cache on the runner’s shared external-repository cache.
  • --output_base / --output_user_root on the runner’s NVMe storage, namespaced per repository so concurrent checkouts don’t collide. With runner warming configured, --output_user_root starts pre-warmed.
  • --disk_cache=, turning off any disk cache an rc sets, since the runner’s cache covers it.
aspect setup bazelrc writes the same flags to an rc, so vanilla bazel on the runner picks them up too. See Keep incompatible tasks off each other’s analysis cache for when to set runner_output_base_suffix.

Opting in to remote execution

Which flag turns on remote execution depends on where the call runs: