Skip to content

Refactor example CI setup.#437

Open
katre wants to merge 9 commits into
mainfrom
split-up-ci
Open

Refactor example CI setup.#437
katre wants to merge 9 commits into
mainfrom
split-up-ci

Conversation

@katre

@katre katre commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

This change:

  • Adds many more build_test targets to ensure non-tests will still be built and checked.
    • Some of these are not working and are currently disabled.
  • Splits each top-level package into a separate CI action so that it's easier to spot failures and ensure other tests continue
  • Adds a new tag-based way to disable tests:
    • no-ci will skip the test in CI entirely
    • no-remote-ci and no-local-ci will skip based on remote execution
    • no-linux-ci and no-macos-ci will skip based on the OS

This change:
- Adds many more `build_test` targets to ensure non-tests will still be
  built and checked.
  - Some of these are not working and are currently disabled.
- Splits each top-level package into a separate CI action so that it's
  easier to spot failures and ensure other tests continue
- Adds a new tag-based way to disable tests:
  - `no-ci` will skip the test in CI entirely
  - `no-remote-ci` and `no-local-ci` will skip based on remote execution
  - `no-linux-ci` and `no-macos-ci` will skip based on the OS
@katre katre requested a review from mbland July 8, 2026 01:19
@katre katre marked this pull request as ready for review July 8, 2026 01:19

@mbland mbland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, though I have a few questions and suggestions to consider before merging. Nothing ultimately blocking.

Comment thread docker/network/BUILD
srcs = ["DockerNetworkTest.java"],
tags = ["manual"],
tags = [
"no-ci", # Consistent NPE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the benefit of no-ci vs. the 'manual' tag here? Does CI not skip it already? Would it hurt to keep both tags for the sake of local runs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As you note, the manual tag stops target pattern expansion. This is being used in the README file for the examples to make them more useful, and is also being used to keep targets from being tested in CI. I wanted to add a new tag to split these two meanings out (which works because the tests query filter does not filter out manual targets).

I've re-added the manual tags I removed: we can later go back and decide which were "don't expand as part of running the examples" and which were "don't expand in tests".

},
tags = ["manual"],
tags = [
"no-local-ci",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

no-local-ci is just slightly confusing since I normally don't think of CI jobs running locally on my workstation. Would it be better to toggle using no-remote-ci and remote-ci or some similar nomenclature?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wanted to make all of the tags negative (it's easier to express the logic that way in the filtering step). Using positive tags would mean that every test needs a linux-ci, macos-ci, remote-ci and local-ci tag (so the default is that the test appears nowhere), whereas using negative tags means the default is to run the test and the tag explains where not to.

If you have a suggestion for replacing no-local-ci I am very willing to entertain it: I was hoping that the -ci part was clear enough that this is "local as respects whereever CI runs".

Comment thread .github/workflows/main.yml Outdated
- scala
- swift
- typescript
remote_execution: [true, false]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion, not a blocker: It would be nice to use more descriptive strings for values instead of true and false, so that the GitHub Checks job titles look more descriptive than:

CI / linux-test-matrix (cpp, false, false)
CI / linux-test-matrix (cpp, true, false)
CI / linux-test-matrix (cpp, true, true)

It would make boolean expressions a little more verbose, but would make the UI a lot easier to follow.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

os_version: "14"
revision: 4edc10aa8f8ca239699aaf1078832208fb3b7efe
remote_execution: 'true'
test_package:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not loving the duplication of this list. Isn't there a way to define a YAML list once and reuse it?

Following the examples from https://stackoverflow.com/questions/9254178/is-there-yaml-syntax-for-sharing-part-of-a-list-or-map, something like:

test_packages: &test_packages
- cpp
- csharp
# And so on...

matrix:
  test_package: *test_packages

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I hate that syntax. My original plan was to allow different lists per platform, they just ended up being the same.

I'm going to leave as-is and then we can revisit later if it's a problem.

Comment thread infra/test-all.py Outdated
Comment thread infra/test-all.py Outdated
@katre katre requested a review from mbland July 8, 2026 15:00
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