-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 Lint on Windows and enable the job #21747
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mheon 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 |
Yeah, I don't know if this is going to work as a cross-build |
cmd/podman-wslkerninst/main.go
Outdated
fmt.Fprintf(os.Stderr, "Error configuring logging: %v", err) | ||
// Don't exit, it's just a logging issue |
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.
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.
yeah where this is ran its not actually visible (no console attached when ran from the installer), so it would only be visible for manual execution. If it were me I would just toss the error.
Re the issue. It's pretty atypical for Windows Logging to be not running since its an essential service (granted we shouldn't fail if its not running for exceptional reasons)
In this particular case we don't need CGO. (Golang builds for windows embed a special cross compile facility that is portable). There are only a few special cases where you need it (building DLLs, or using it it compile inline c code). |
Looks like the hack/golangci-lint.sh needs to be updated to mirror the podman-remote task a little closer:
|
@@ -40,10 +40,12 @@ func (e *ExitCodeError) Error() string { | |||
return fmt.Sprintf("Process failed with exit code: %d", e.code) | |||
} | |||
|
|||
//nolint:unused |
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.
@n1hility Can you take a look at this file and tell me if any of these are safe to remove? I kept them around assuming they might be used later.
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.
some of these will be needed for the port cleanup logic, so if you could leave them around a bit. I can clean them up as part of that work. thanks!
Ephemeral COPR build failed. @containers/packit-build please check. |
796909d
to
10a7bd8
Compare
[NO NEW TESTS NEEDED] Purely refactoring Signed-off-by: Matt Heon <[email protected]>
|
Windows cross passed, which includes lint, so this is ready now |
Fourth rerun of HyperV tests. Different failures last two times. Timeouts on Podman commands, but different ones both times. |
LGTM |
/lgtm |
Fix lint on Windows.
This may not pass CI initially, I don't know if we can make this work as cross-compile; we need CGo.
Does this PR introduce a user-facing change?