Repository navigation
Cover wildcard directory patterns in the confinement test table - #7313
Merged
ChrisJBurns merged 1 commit intoNov 25, 2026
Merged
Conversation
Wildcard directory patterns now match through filepath.Glob, but their interaction with overlay mount confinement is untested. Extend TestGetOverlayMountsConfinedToMount with cases pinning that a wildcard directory pattern skips same-prefix files, follows a symlink whose target is a directory inside the mount, excludes a symlink whose target leaves the mount, and matches nothing beyond the mount. Test-only change. This fixes stacklok#7304
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7313 +/- ##
==========================================
+ Coverage 81.96% 82.07% +0.10%
==========================================
Files 922 928 +6
Lines 93393 94127 +734
==========================================
+ Hits 76551 77256 +705
- Misses 16837 16866 +29
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ChrisJBurns
approved these changes
Nov 25, 2026
1 task
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.
Summary
secrets-*/,*.egg-info/) now match throughfilepath.Glob(Match .thvignore wildcard directory patterns #7258), but their interaction with overlay mount confinement inGetOverlayMountsis untested — the invariant that wildcard matches must not reach paths outside the mount.TestGetOverlayMountsConfinedToMountas table cases (test-only, no production code changes), as originally requested in the Match wildcard .thvignore directory patterns #7195 review.Fixes #7304
Type of change
Test plan
task test)go test -race ./pkg/ignore/...passes. The four new cases pin:s*/) is skipped (directory-only semantics), while thesubdirectory matches;../out*/) matches nothing.API Compatibility
v1beta1API, OR theapi-break-allowedlabel is applied and the migration guidance is described above.Does this introduce a user-facing change?
No