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

Fix locale issues with WSL version detection #20240

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

n1hility
Copy link
Member

@n1hility n1hility commented Oct 3, 2023

Fixes #20209

Since wsl --version triggers help, which triggers an error code, use that instead of text detection.

Fix an issue on non-English locales of Windows where machine installs using user-mode networking were rejected due to erroneous version detection

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: n1hility

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 3, 2023
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM
Needs the magic [NO NEW TESTS NEEDED] to pass CI

@@ -50,20 +50,13 @@ func IsWSLInstalled() bool {

func IsWSLStoreVersionInstalled() bool {
cmd := SilentExecCmd("wsl", "--version")
out, err := cmd.StdoutPipe()
cmd.Stdout = nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking nit: consider using a bytes.Buffer for stdout and stderr and write that to logrus.Debugf.

Since wsl --version triggers help, which triggers an error code,
use that instead of text detection.

[NO NEW TESTS NEEDED]

Signed-off-by: Jason T. Greene <[email protected]>
@n1hility n1hility force-pushed the fix-wsl-version-detection branch from e86858c to cbca395 Compare October 3, 2023 13:37
@baude
Copy link
Member

baude commented Oct 3, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 3, 2023
@baude
Copy link
Member

baude commented Oct 3, 2023

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 3, 2023
@openshift-ci openshift-ci bot merged commit 2457c25 into containers:main Oct 3, 2023
4 of 97 checks passed
@baude
Copy link
Member

baude commented Oct 3, 2023

well that was fun, so much for computers thinking ...

@baude
Copy link
Member

baude commented Oct 3, 2023

/cherry-pick v4.7

@openshift-cherrypick-robot
Copy link
Collaborator

@baude: new pull request created: #20243

In response to this:

/cherry-pick v4.7

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.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Jan 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't create machine with user-mode-networking
4 participants