-
Notifications
You must be signed in to change notification settings - Fork 367
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
Validate manifest file extension and kind field #191
Validate manifest file extension and kind field #191
Conversation
Meta-comment: Next time if you can keep the PRs scoped to what’s discussed (in this case, just the file extension validation) it would make the code review more focused as we wouldn't deliberate on other things. |
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.
Mostly LGTM, thanks for doing the cleanup.
Yeah, sorry about that. I badly wanted to add tests and one thing led to another. Also, please don't hesitate to ask for splitting up a PR. But I'll also try to be more consistent. 🙏 |
Ensure that `testutil.NewTempDir()` is used in favor of `ioutil.Tempdir` Ignore error from grep due to no matches grep exits with error code 1 if no matches are found. This makes it tricky when `set -eo pipefail` is set. Therefore specifically ignore error code 123, which results from xargs when a subcommand failed.
c390efd
to
934c2e6
Compare
Codecov Report
@@ Coverage Diff @@
## master #191 +/- ##
==========================================
+ Coverage 50.91% 53.77% +2.85%
==========================================
Files 13 13
Lines 711 716 +5
==========================================
+ Hits 362 385 +23
+ Misses 297 279 -18
Partials 52 52
Continue to review full report at Codecov.
|
kind: Plugin
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahmetb, corneliusweig 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 |
Adding corneliusweig to owners. He has been consistently helping both with krew and krew-index repositories in terms of: - developing plugins himself - taking a stab at krew machinery with large scale code refactors - adding integration test suite to the project - adding more validation and test cases - increasing developer documentation Some of his notable work: - kubernetes-sigs#195 - kubernetes-sigs#183 - kubernetes-sigs#191 - kubernetes-sigs#201 - kubernetes-sigs#202 - kubernetes-sigs#203 - kubernetes-sigs#208 He is familiar with the codebase enough to officially review and approve code. Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
Adding corneliusweig to owners. He has been consistently helping both with krew and krew-index repositories in terms of: - developing plugins himself - taking a stab at krew machinery with large scale code refactors - adding integration test suite to the project - adding more validation and test cases - increasing developer documentation Some of his notable work: - #195 - #183 - #191 - #201 - #202 - #203 - #208 He is familiar with the codebase enough to officially review and approve code. Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This PR now validates the file extension in the krew manifest validator.
Also, krew now expects
kind: Plugin
, which was not validated at all.Last, it adds a test util to create and cleanup temporary directories. Some uses of vanilla
ioutil.TempDir
were updated with the new utility.Fix #190