-
Notifications
You must be signed in to change notification settings - Fork 261
internal/declcfg: Avoid processing the .indexignore file when walking the root fs #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal/declcfg: Avoid processing the .indexignore file when walking the root fs #733
Conversation
… the root fs Update internal/declcfg/load.go and avoid processing any files that are named `.indexignore` when walking the declarative config index root filesystem. When validating declarative config directories, the .indexignore file was being processed and validated. Signed-off-by: timflannagan <timflannagan@gmail.com>
ff73170 to
8383667
Compare
Codecov Report
@@ Coverage Diff @@
## master #733 +/- ##
==========================================
- Coverage 50.05% 50.04% -0.02%
==========================================
Files 100 100
Lines 8530 8530
==========================================
- Hits 4270 4269 -1
- Misses 3437 3438 +1
Partials 823 823
Continue to review full report at Codecov.
|
|
This is probably reasonable, but another solution could be to ignore these files using a pattern in the The canonical example I use for **/*
!**/*.yaml
!**/*.json
**/objects/*
**/objects/*But I'm good with just hardcoding /lgtm |
|
We need a similar change in |
|
Yeah, I had the same thought locally and it wasn't immediately clear to me what the best UX is here. I'm under the impression that we should avoid validating the .indexignore file, as I don't think we need to be validating individual patterns outlined in that file, so misconfiguring the .indexignore file would fall under user-error. That said, I think you can make the argument that using a more general pattern (i.e. only validate YAML/JSON files and ignore everything else) is valid, but whether it's the best UX is another question. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ecordell, timflannagan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Update internal/declcfg/load.go implementation and avoid processing any files that are named
.indexignorewhen walking the declarative config index root filesystem. When validating declarative config directories, the .indexignore file was being processed and validated.Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1989398.