Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ time. A newer automatic run still supersedes an older one on the same PR.
`inputs` (or build mzbuild images) take part in a PR-triggered nightly. A
command-only step without inputs is trimmed out and will not run, so labeling a
PR to exercise such a step has no effect.
* `ci-no-nightly`: don't trigger Nightly, neither the automatic run for changed
Nightly test code nor the `ci-nightly` run. Every push reruns the automatic
Nightly steps, so this saves the rerun once they passed on an earlier push.
The PR stays mergeable, so only set it when Nightly coverage is not needed.
* `ci-antithesis`: also build the x86_64 images that the `test/antithesis`
harness runs, instrumented for Antithesis, and push them to its registry.
* `ci-no-trim`: disable input-based trimming, so the full test pipeline runs.
Expand All @@ -57,10 +61,10 @@ not for landing changes. The reduced pipeline is still uploaded before the
failure, so any steps that do run give feedback.

When labels conflict, `ci-no-build` wins and skips everything, including any
Nightly trigger. `ci-no-test` leaves the asynchronous Nightly trigger in place,
so combining it with `ci-nightly` still fires Nightly even though the test steps
are skipped. `ci-no-trim` applies only to the test pipeline. A `ci-nightly` run
is always trimmed regardless.
Nightly trigger. `ci-no-nightly` wins over `ci-nightly`. `ci-no-test` leaves the
asynchronous Nightly trigger in place, so combining it with `ci-nightly` still
fires Nightly even though the test steps are skipped. `ci-no-trim` applies only
to the test pipeline. A `ci-nightly` run is always trimmed regardless.

## Build agents

Expand Down
13 changes: 10 additions & 3 deletions ci/mkpipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@ def enable_nightly_for_labeled_pr(
pipeline: Any, pipeline_name: str, labels: set[str]
) -> bool:
"""Activate the test pipeline's Nightly trigger step on a PR carrying the
`ci-nightly` label. Returns whether it was activated."""
`ci-nightly` label but not `ci-no-nightly`. Returns whether it was
activated."""
if pipeline_name != "test" or not ui.env_is_truthy("BUILDKITE_PULL_REQUEST"):
return False
if "ci-nightly" not in labels:
if "ci-nightly" not in labels or "ci-no-nightly" in labels:
return False
for step in steps(pipeline):
if step.get("id") == "nightly":
Expand Down Expand Up @@ -424,7 +425,7 @@ def fetch_hashes() -> None:
and not os.getenv("CI_TEST_SELECTION")
and not args.coverage
and args.sanitizer == Sanitizer.none
and not {"ci-no-build", "ci-no-test"} & pr_labels
and not {"ci-no-build", "ci-no-test", "ci-no-nightly"} & pr_labels
# The trigger targets this repository's Nightly pipeline.
and git.get_github_repo().lower() == git.DEFAULT_GITHUB_REPO.lower()
):
Expand Down Expand Up @@ -505,6 +506,12 @@ def fetch_hashes() -> None:
"Test code changed, also triggering and waiting for Nightly: "
+ ", ".join(nightly_selection),
)
elif "ci-no-nightly" in pr_labels and fail_build_reason is None:
annotate(
"warning",
"ci-nightly",
"**`ci-no-nightly`** GitHub label: not triggering Nightly",
)

trim_for_pr_nightly = args.pipeline == "nightly" and ui.env_is_truthy(
"CI_TRIM_PIPELINE"
Expand Down