Uh oh!
There was an error while loading. Please reload this page.
test(ci): fail when a CI-path extractor stops matching - #1162
Merged
Conversation
The guards collect workflow paths that do not resolve and assert the set is empty, so an extractor that stops matching finds nothing to check and the assertion holds. Renaming the test_path: pattern left all three tests in this file green -- nothing went red at all. This file exists because CI path rot has shipped twice: #960 moving paths, and coverage.yml globbing in a shell step while its non-blocking nightly run sat red for days. Assert both extractors still find what they parse. The floors sit under the current counts: 18 test_path: keys, and 3 distinct tests/ references once the workflows are deduplicated -- fewer than it looks, because most jobs share the same paths. Verified against two mutations: a broken test_path: pattern, and a workflow directory that does not exist. Closes#1161
The new guard failed on Alpine, and the reason is the bug it was written to find: BusyBox grep does not honour --include, so `grep -r ... --include='*.yml'` produced nothing there and 'every tests/ path a workflow names resolves' had been passing on Alpine by having no paths to check. The workflows directory is flat, so an explicit glob is equivalent on GNU grep and works on BusyBox. Verified in an alpine:3 container: 0 paths before, 3 after, matching macOS.
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 freeto 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.
🤔 Background
Related #1161
The guards collect workflow paths that do not resolve on disk and assert
that set is empty, so an extractor that stops matching finds nothing to check
and the assertion holds. Renaming the
test_path:pattern leaves all threetests green — nothing goes red at all.
This file exists because CI path rot has shipped twice: #960 moving paths, and
coverage.ymlglobbing in a shell step while its non-blocking nightly run satred for days.
💡 Changes
test_path:keys, and 3 distincttests/references once the workflows are deduplicated — fewer than it looks, because most jobs share the same pathstest_path:pattern, and a workflow directory that does not exist