-
Notifications
You must be signed in to change notification settings - Fork 652
ci: add WSL2 CI #1883
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
ci: add WSL2 CI #1883
Conversation
See a weird |
Well, I found out why the error wasn't being logged, fixed in 88ce268. The wsl command (or subcommand wslpath command) was returning an error that implemented I also added some quotes to wrap the input of the temp file path when calling wslpath. Now it seems like the output of wslpath is just... wrong for some reason, outputting:
From my local testing, double backslashes seem to work. Adding a change to convert \ to \\ |
In WSL2, all folders are shared under C drive ?? I could see script is under |
Yeah, the entire C drive is shared by default. I'm pretty sure the files exist, but the |
If this still doesn't work, we can compute the wslpath ourself (/mnt prefix and slashes changed accordingly) I hope this should surely work without these glitches |
I don't understand why this is necessary: bootFileWSLPath := strconv.Quote(limaBootFilePathOnWindows) Isn't
You can't really, in general, as even the mount prefix is configurable. |
I used it to convert the slashes from From my testing, the command only works as intended when going through Seems like WSL still might have an issue with the The short file name in question is the user directory: |
I think the short names should just work, even from WSL. You can convert them with PowerShell, but that has a high startup cost. But if you only do it once, then it doesn't matter: C:\>powershell "(Get-Item -LiteralPath 'C:\PROGRA~1').FullName"
C:\Program Files |
The problem is that Windows doesn't have the concept of passing
|
We have liftoff :) |
Yeah you're right, the short path actually does work with |
Seems green now 💚 Please rebase, add back macOS CI, and ping me when this is ready to merge |
1359538
to
914a5ac
Compare
@AkihiroSuda, I think it's good now. Let me know if you want me to make any more changes |
# otherwise `wsl --list --verbose` (called from Lima) fails: | ||
# https://github.com/lima-vm/lima/pull/1826#issuecomment-1729993334 | ||
# The distro image itself is not consumed by Lima. | ||
# ------------------------------------------------------------------ |
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.
I’d like to see this resolved. Can be another PR though.
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.
I'll keep looking into this separately. Maybe there's something we can do with conditionally calling wsl --import
/ wsl --install
based on the status returned from wsl --list -v
pkg/hostagent/hostagent.go
Outdated
@@ -378,6 +380,7 @@ func (a *HostAgent) Run(ctx context.Context) error { | |||
}() | |||
return a.driver.RunGUI() | |||
} | |||
logrus.Infof("Running startRoutinesAndWait") |
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.
Should be Debugf, or just removed
pkg/hostagent/hostagent.go
Outdated
// WSL instance SSH address isn't known until after VM start | ||
if *a.y.VMType == limayaml.WSL2 { | ||
sshAddr, err := store.GetSSHAddress(a.instName) | ||
logrus.Infof("sshAddress: %s", sshAddr) |
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.
Debugf or remove
pkg/hostagent/hostagent.go
Outdated
@@ -316,9 +316,11 @@ func (a *HostAgent) Run(ctx context.Context) error { | |||
return err | |||
} | |||
|
|||
logrus.Infof("After driver.Start()") |
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.
Debugf or remove
Signed-off-by: Akihiro Suda <[email protected]> Signed-off-by: Justin Alvarez <[email protected]> Co-authored-by: Akihiro Suda <[email protected]>
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.
Thanks 💚
Picking up where #1826 left off
According to these docs, Windows runners should have Git for Windows pre-installed, meaning
tar.exe
andgzip.exe
should be in the path already.Let's see if just changing the rootfs from zstd to gz compression gets us any further, and iterate from there.
Closes #1781.