-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat(file): Allows to use file pattern in the file/files key #1738
Conversation
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
While the idea remain the same, the broken e2e highlight that the current implementation is wrong. It doesn't handle scm |
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
I updated the e2e tests to cover the additional scenarios |
Signed-off-by: Olblak <me@olblak.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- First of all, the use case looks really legit and it is a good idea!
- Code is LGTM
- No regression with the binary I've tested from this PR (tried with jenkins-infra/jenkins.io updatecli manifests)
- The "opt in" behavior with addition field is really good
- Only missing element is: what "kind" of pattern. (Said differently: "as a user where can I find example of the pattern matching?)
=> Approving, but don't forget to add a documentation update even after merging/releasing the feature ;)
Fix #1453
This pullrequest allows to use common file path pattern with the plugin "file"
Test
To test this pull request, you can run the following commands:
Additional Information
Tradeoff
Instead of reading a specific file, the change introduce in this pullrequest will try to locate ALL files matching pattern which obviously has performance consequence...
I could think of two options to mitigate this:
But I find this approach a bit cumbersome
But this would imply more code to write and maintain as I'll need to handle the different combination of
file,files,filepath, filespath
I don't think the performance impact is that critical but I am open for suggestion
edit
I decided to implement the flag approach using
searchpattern
instead offilepattern
Potential improvement
Implement similar pullrequest for