Skip to content

Conversation

mbland
Copy link
Collaborator

@mbland mbland commented Sep 3, 2025

Description

Updates the test_rules_scala_linux_last_green and the matrixed bcr_presubmit jobs to use soft_fail. Upgrades rules_python from 1.6.0-rc0 to 1.6.0.

Also adds the {bcr_bazel} value to matrixed bcr_presubmit job names.

Motivation

It occurred to me that we don't want failing bcr_presubmit jobs for Bazel 8.x, rolling, or last_green to potentially block pull requests. Breakages under these versions could be due to unrelated upstream Bazel changes, addressable in a separate pull request.

Also, the test_rules_scala_linux_last_green build step using buildkite-agent annotate doesn't fit the bcr_presubmit jobs well. These annotations were also somewhat easy to miss, leading to the test_rules_scala_linux_last_green job occasionally remaining broken for some time.

Today I learned about the soft_fail attribute of Buildkite commands, discovering it by skimming the bazelbuild/continuous-integration source. soft_failing jobs clearly show as broken in the UI, while the build as a whole remains passing.

Regarding the rules_python update, it was just released a day after opening and merging #1767.

Adding {bcr_bazel} to the matrixed bcr_presubmit job names makes each job more easily distinguishable in the Buildkite UI. Each job's output clearly shows its corresponding Bazel version, but it's nice to see the version in the job name directly.

Updates the `test_rules_scala_linux_last_green` and the matrixed
`bcr_presubmit` jobs to use `soft_fail`. Upgrades `rules_python` from
1.6.0-rc0 to 1.6.0.

Also adds the `${{ bcr_bazel }}` value to matrixed `bcr_presubmit` job
names.

---

It occurred to me that we don't want failing `bcr_presubmit` jobs for
Bazel `8.x`, `rolling`, or `last_green` to potentially block pull
requests. Breakages under these versions could be due to unrelated
upstream Bazel changes, addressable in a separate pull request.

Also, the `test_rules_scala_linux_last_green` build step using
`buildkite-agent annotate` doesn't fit the `bcr_presubmit` jobs well.
These annotations were also somewhat easy to miss, leading to the
`test_rules_scala_linux_last_green` job occasionally remaining broken
for some time.

Today I learned about the `soft_fail` attribute of Buildkite commands,
discovering it by skimming the `bazelbuild/continuous-integration`
source. `soft_fail`ing jobs clearly show as broken in the UI, while the
build as a whole remains passing.

- https://github.com/bazelbuild/continuous-integration/blob/3021432ab2403d7a660229d3ef4e1cf5c0e5c64c/buildkite/bazelci.py#L2905
- https://buildkite.com/docs/pipelines/configure/step-types/command-step#soft-fail-attributes
- https://buildkite.com/resources/changelog/56-command-steps-can-now-be-made-to-soft-fail/

Regarding the `rules_python` update, it was just released a day after
opening and merging bazel-contrib#1767.

Adding `${{ bcr_bazel }}` to the matrixed `bcr_presubmit` job names
should make each job more easily distinguishable in the Buildkite UI.
Each job's output clearly showed its corresponding Bazel version, but
it will be nice to see the version in the job name directly.
Enclosing the `name:` attribute in quotes apparently broke the
interpolation of `${{ bcr_bazel }}`:

- https://buildkite.com/organizations/bazel/pipelines/rules-scala-scala/builds/5768/jobs/0199112d-063f-4387-8790-2e7f66319435/log#105-857

```txt
buildkite-agent: fatal: pipeline interpolation of "(stdin)" failed:
interpolating label: Expected identifier to start with a letter, got
```

That's the end of the message. It doesn't say what it got.
Today I learned that:

- bazelbuild/continuous-integration's global `matrix` configuration is
  totally separate from Buildkite's `matrix`.

- bazelbuild/continuous-integration will interpolate global `matrix`
  attribute values into the `name` attribute using Python `str.format()`.
  It passes the `{name: value}` dict of the current combination of
  matrix values to the `format()` method of the task name.

  - https://github.com/bazelbuild/continuous-integration/blob/3021432ab2403d7a660229d3ef4e1cf5c0e5c64c/buildkite/bazelci.py#L897
  - https://docs.python.org/3/library/string.html#format-string-syntax
@mbland mbland merged commit 72ee942 into bazel-contrib:master Sep 3, 2025
1 check passed
@mbland mbland deleted the soft-fail-ci-tasks-and-rules-python-1.6.0 branch September 3, 2025 22: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.

2 participants