-
Notifications
You must be signed in to change notification settings - Fork 1.7k
skaffold render
exits normally when no inputs are found
#4979
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
Comments
@ekupershlak It does make sense to error out in this case. We had a bunch of discussion here #4172 to change that default. We could error out when kubectl deployer does not end up finding any manifests in the default location. |
I think the error when no deployer is specified is a bit different - something like:
I agree that this should probably be an error ( I think that I'm describing a slightly different case - I'm proposing treating any case where no manifests are found as an error. Consider the following
It specifies a deployer, but the manifests pattern doesn't match anything. |
yeah this seems like something we could just validate at runtime. feels like if files are specified in the skaffold.yaml that don't exist we should give an error saying so. |
Can somewhere here verify that the suggested solution - adding a runtime validation on listed files, is acceptable? Additionally if someone does glob matching on a directory - |
Talked w/ @nkubala offline, adding notes here: we do some pre-run config validation, mostly related to modules e.g. making sure all configs have unique names, etc. most of this lives in https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/parser/config.go [...] probably start here to find the entrypoints where you could add more validation around inputs, etc. and for globs i think it would be reasonable to make sure at least one file matches the glob pattern passed. e.g. if a user passes k8s/*.yaml and there's either no k8s directory or it's empty, then error out |
Expected behavior
Running
skaffold render --digest-source=none
using a skaffold.yaml that has no inputs exits with a non-zero 0.Actual behavior
skaffold exits with a code of 0.
Information
Steps to reproduce the behavior
cd examples/getting-started; rm k8s-pod.yaml
skaffold render --digest-source=none
The text was updated successfully, but these errors were encountered: