Repository navigation
fix(ci): close the scope map silent gaps and ratchet it shut - #3852
Merged
Merged
Conversation
Measured: 128 build inputs selected NO lane, so a change to e.g.
cmake/Modules/ObsHelpers.cmake (a module every target includes) or
libobs-opengl/CMakeLists.txt left CI green on a tree it never rebuilt.
- Add TREE_PLATFORMS for trees whose paths carry no OS token: libobs-metal
(macos), libobs-winrt and libobs-d3d11 (windows), libobs-opengl
(linux+windows), cmake/{linux,macos,windows}.
- Treat top-level cmake modules/config as shared AND tier2: every target
includes them. plugins/CMakeLists.txt joins SHARED_FILES.
- Add ci/test_scope_completeness.py: every tracked build input must select
at least one lane, with a shrink-only ci/scope_exemptions.txt for the
packaging scripts that have their own workflows.
After: build inputs with no lane 128 -> 0 (32 are explicitly exempted:
AppImage/Flatpak/Steam packaging, which appimage.yaml and the flatpak and
steam workflows exercise).
…red file The first cut imported pytest and edited sys.path, which ci/test_ci_tests_stdlib_only.py and ci/test_no_sys_path_edits.py both forbid (the gate runs these with plain ). Rewritten as stdlib unittest, importing ci_scope by name the way test_ci_scope.py does. plugins/CMakeLists.txt joins the shared-build registry with a reason, which ci/test_shared_build_files.py requires.
The tree/cmake rules pushed scope() to complexity 12 (limit 10). Moved them into tree_lanes(), which returns the (macos, windows, tier2) delta. Behaviour is unchanged: scope_completeness + ci_scope tests pass.
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.
The scope map had a silent hole: 128 build inputs selected no CI lane at all, so touching them could leave CI green on a tree it never rebuilt.
Measured, not assumed
Running
ci_scope.scope([path])over all 11,184 tracked files:cmake/Modules/ObsHelpers.cmake(a module every target includes),libobs-opengl/CMakeLists.txt, every Metal Swift source, every WinRT headercmake/Modules/*.cmakechanging selected nothing - not Linux, not macOS, not Windows.What this does
TREE_PLATFORMS- trees whose paths carry no OS token, so the name classifier returnsNone:cmake/**is shared and tier2 - every target includes those modules, so a change must rebuild Linux Tier 2 plus both native lanes.plugins/CMakeLists.txtjoinsSHARED_FILES.ci/test_scope_completeness.py- a ratchet: every tracked file under a build-input root must select at least one lane. Exemptions live inci/scope_exemptions.txtand may only shrink (two tests enforce that: no stale pattern, and no exemption that a rule now covers).Result
The exempted trees are covered by their own workflows (
appimage.yamlbuilds and runs the AppImage in distro containers; the flatpak and steam jobs consume the manifests), so this is not a testing regression - it is the map telling the truth about who owns what.Cost
More lanes now run for changes that previously ran none:
cmake/**,libobs-opengl/**,libobs-metal/**,libobs-winrt/**. That is the point - those changes do affect those builds. The comparison to the old behaviour is a CI-time increase on precisely the PRs that used to skip everything.Not done here
build-cache: true/ S3 enablement - still gated onzccache#1943(stale replay,safe: false).