Skip to content
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

Validation fails for files with only --- #109

Closed
fuji8 opened this issue Apr 2, 2024 · 4 comments · Fixed by #113
Closed

Validation fails for files with only --- #109

fuji8 opened this issue Apr 2, 2024 · 4 comments · Fixed by #113
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.

Comments

@fuji8
Copy link

fuji8 commented Apr 2, 2024

What happened?

Validating a file containing only --- will cause validation to fail.

kubectl-validate has3hyphen.yaml 

has3hyphen.yaml...ERROR
GVK cannot be empty
Error: validation failed

What did you expect to happen?

This file is essentially an empty file, and I expect the validation to succeed as well as a file containing only comments.

How can we reproduce it (as minimally and precisely as possible)?

has3hyphen.yaml

---

Validate the above file.

kubectl-validate has3hyphen.yaml 

has3hyphen.yaml...ERROR
GVK cannot be empty
Error: validation failed

Anything else we need to know?

No response

Kubernetes version

kubectl version
Client Version: v1.28.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.2
@fuji8 fuji8 added the kind/bug Categorizes issue or PR as related to a bug. label Apr 2, 2024
@alexzielenski
Copy link
Contributor

I agree this is a bug. Lots of files by convention contain empty doccuments. We should ignore them

/label good-first-issue
/assign

@k8s-ci-robot
Copy link
Contributor

@alexzielenski: The label(s) /label good-first-issue cannot be applied. These labels are supported: api-review, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, team/katacoda, refactor. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to this:

I agree this is a bug. Lots of files by convention contain empty doccuments. We should ignore them

/label good-first-issue
/assign

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@alexzielenski alexzielenski added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Apr 10, 2024
@ah8ad3
Copy link
Contributor

ah8ad3 commented Apr 14, 2024

Hi @alexzielenski, i would like to take a look at this if its ok?

@alexzielenski
Copy link
Contributor

/assign @ah8ad3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants