-
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 debug
for Helm on Windows
#4872
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4872 +/- ##
==========================================
+ Coverage 71.86% 71.88% +0.02%
==========================================
Files 356 356
Lines 12218 12218
==========================================
+ Hits 8780 8783 +3
+ Misses 2786 2785 -1
+ Partials 652 650 -2
Continue to review full report at Codecov.
|
If it helps, I can build it locally and test it on Windows. |
Please do @aurelien-baumann-lacapitale! |
@briandealwis it works! Thank you 🎉👌 |
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.
Looks good 👍🏼
@aurelien-baumann-lacapitale - this is a long shot, but how did you build on windows ? I'd like to also test this fix (to see if this fix's cloud code in intellij not attaching), but hopefully to be able to provide some future fixes too. I'm a Go newbie, and it's been 20 years since i wrote Makefiles so my attempts to build skaffold in powershell and cmd.exe are failing miserably.... What target did you execute ? One word answers are fine ! :-) For anyone else that finds this i managed to cross compile in WSL, producing a binary for windows by following this guide - https://www.digitalocean.com/community/tutorials/how-to-build-go-executables-for-multiple-platforms-on-ubuntu-16-04.
Then renamed the binary skaffold.exe and copied into an appropriate location. Tested that the fix worked, cloud code attached successfully, and now see this has been merged and released in 1.16. |
Hey @alisters you seem to have cracked it alright. Sorry for my non-reactivity on that one 🤭 |
Fixes: #4862
Related to: #4732
Description
To support
debug
in our Helm deployer, we create a Skaffold command-line that we encode in theSKAFFOLD_CMDLINE
environment variable, something like:We're just using
strings.Join()
to build up this command-line:skaffold/pkg/skaffold/deploy/helm/helm.go
Line 399 in da65fa5
But in Windows, the
buildfile
has backslashes in the name. And we parse our this command-line usingshell.Split()
which interprets backslashes:skaffold/cmd/skaffold/app/skaffold.go
Line 39 in da65fa5
And so the directory separators are being stripped out and the path name is not found.