ci: gate every compile job from one change filter - #648
Draft
TarikGul wants to merge 2 commits into
Draft
Conversation
The iOS change filter becomes a general `changes` job publishing one output per gated area, `sdk_swift` and `sdk_kotlin`, and the Android compile gate moves out of its own workflow into a job that reads it. That job's steps are carried over unchanged, codegen and all. Living in a separate workflow left the Android gate with two problems. Its `paths` trigger meant it reported nothing at all on a pull request that touched other areas, so it could never satisfy a required status check; as a job in this workflow it reports skipped, which `ci-status` already counts as a pass. It also had no `merge_group` trigger, so the Kotlin shell was never compiled on a merge queue run. The Kotlin filter now also names `rust/crates/truapi`, which it did not before, for the same reason the Swift filter names it: the bindings are generated rather than committed, so a protocol change there leaves no `android/` diff to key on. Both filters name this workflow, so editing a filter exercises the jobs the filter gates.
Records where the compile gates are computed and which check is worth requiring, now that a filtered job reports skipped rather than not reporting.
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.
Warning
Do not merge while R2 is in flight. This is parked deliberately, not
waiting on review. Nothing depends on it yet: the host imports it prepares
for do not start until after the release, so merging it now buys nothing
this month and puts a CI change into a release window.
Two things must happen before it merges:
ci-android / buildandiOS change filterare notrequired status checks. This branch removes the first and renames the
second, and a required check that no longer reports blocks every merge.
CI Statusis the check to require.Summary
ci.ymlcomputes every path gate in one place. Achangesjob publishessdk_swiftandsdk_kotlin, and each gated job reads the output it caresabout.
ci-statusaggregates every job in the workflow and counts a jobskipped by its filter as a pass, which makes it the single check worth
requiring.
This is the gating spine the host imports build on: adding a host means adding
one output and one consumer, not another workflow with its own trigger.
Why the Android compile gate lives here
In its own workflow with a
pathstrigger it reported nothing at all on a pullrequest touching other areas, so it could never satisfy a required status
check. It also had no
merge_grouptrigger, so the Kotlin shell wentuncompiled on merge queue runs. As a gated job it reports skipped when it does
not apply, and it runs on the merge queue with everything else.
Its steps are carried over unchanged, including the codegen step that the
gitignored generated modules require.
Filter behaviour
sdk_swiftsdk_kotlindocs/onlyplayground/onlyios/android/js/container/rust/crates/truapi-provider/rust/crates/uniffi-bindgen-cli/rust/crates/truapi/rust/crates/truapi-server/Makefile.github/workflows/ci.ymlThe Kotlin filter names
rust/crates/truapifor the same reason the Swiftfilter does: neither binding set is committed, so a protocol change there
leaves no
android/diff to key on.Both filters name this workflow, so this pull request exercises both gates.
Known cost
The Kotlin gate now also evaluates on
rust/crates/truapiandMakefilechanges, and on merge queue runs. That job runs
npm ci, codegen, a Rust buildand a Gradle build, so it adds merge queue latency. The old filter already
covered
rust/crates/truapi-server/**, which most protocol changes touch, sothe widening is smaller than the table suggests.
rel: #636