-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: Allow apply of manifests without file name restrictions (#6871) #6914
Conversation
Jsut signed the CLA ! |
Thanks @smaftoul for taking a stab at this! The underlying problem is that skaffold/pkg/skaffold/schema/versions.go Lines 186 to 196 in 24180d9
|
@briandealwis Thanks for the clever explanation ! I've removed the test on the filename and removed the extension check in Should I squash my commit that fixes Now that I have fixed this the function IsKubernetesManifest looks a lot like IsSkaffoldConfig, should this be improved ? In another PR ? Does this PR needs to add a test to show it works on non yaml / json files ? |
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.
We're good to go here: we squash on commit. Thanks for your help!
Codecov Report
@@ Coverage Diff @@
## main #6914 +/- ##
==========================================
- Coverage 70.48% 68.79% -1.69%
==========================================
Files 515 554 +39
Lines 23150 25868 +2718
==========================================
+ Hits 16317 17796 +1479
- Misses 5776 6865 +1089
- Partials 1057 1207 +150
Continue to review full report at Codecov.
|
@briandealwis I don't really understand why the integration tests cannot find this |
@smaftoul looks like the integration test is failing Please refer to the docs here https://github.com/GoogleContainerTools/skaffold/blob/main/DEVELOPMENT.md#integration-tests to run integration tests. |
@tejal29 I fail to reproduce the error running local integration tests in kind. Any idea what I am doing wrong ? |
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.
kok
This comment was marked as spam.
This comment was marked as spam.
hey @smaftoul , could you try rebasing this and pushing to get these integration tests to rerun ? I'll look into this issue and see what we can do |
@MarlonGamez as you can see, I rebased the PR and pushed, but the test didn't ran again. I guess the PR needs to be added the |
@MarlonGamez Thanks, with Now, that I can reproduce the issue, I have not much idea why this Any idea of next steps to understand what is going on ? |
hey @smaftoul , thanks for being patient with this. This failure is pretty baffling, I can't think of what's going wrong. I'll clone this and see if I can reproduce this to see what we can do |
hey @smaftoul, sorry I haven't had much time to get to this, but I poked around the code a bit and I think I've figured out what the issue is. I can take over this PR from here and try to get it into a working state |
@MarlonGamez thank you very much ! |
@smaftoul I looked for code paths that were using the modified functions and found that the only other thing that could be affected was the code related to |
Thanks for the explanantion 😊 |
Fixes: #6871
Description
We don't check anymore if the extension of files are yaml or json.
User facing changes (remove if N/A)
Before:
You could only
skaffold apply file.{json,yml,yaml}
After:
Yo can
skaffold apply file
, with any filename butskaffold.yaml.out
.Follow-up Work
I think allowing any filename but
skaffold.yaml.out
is not the intended behaviour, but I don't know if it's reasonable.Doing so is because tests creates files with this filename and not matching this filename as a kubernetes manifest allows all tests to pass.
Maybe updating testdata is a better option.
Also, there is maybe a test missing for the use case ?