Skip to content

Update LookPath in go-runhcs to account for changes in go 1.19+ - #1556

Closed
Kathryn Baldauf (katiewasnothere) wants to merge 1 commit into
mainfrom
kabaldau/fix_runhcs_lookpath_test
Closed

Update LookPath in go-runhcs to account for changes in go 1.19+#1556
Kathryn Baldauf (katiewasnothere) wants to merge 1 commit into
mainfrom
kabaldau/fix_runhcs_lookpath_test

Conversation

@katiewasnothere

Copy link
Copy Markdown

Signed-off-by: Kathryn Baldauf kabaldau@microsoft.com

Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
@katiewasnothere

Kathryn Baldauf (katiewasnothere) commented Oct 31, 2022

Copy link
Copy Markdown
Author

Address CI build break that was revealed in #1554

@helsaawy

Copy link
Copy Markdown
Contributor

ErrDot was introduced in 1.19, so this will fail to build for versions prior, right?
we could disable the new behavior with the env variable GODEBUG=execerrdot=0 in our build pipelines, or (probably easier), use https://pkg.go.dev/golang.org/x/sys/execabs#LookPath for the preceding linepath, err := exec.LookPath(command), and if that fails, use ./runhcs.exe instead...

import (
"bytes"
"context"
"errors"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is this package even used for anymore? I thought runhcs was dead? Arent we only using shim for containerd these days?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Looks like it's mostly used in tests for runhcs, which we still use to create scratch disks unfortunately :/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OMG. Create-scratch. What's LCOW 🙄 ? LOL. Ok fine

@katiewasnothere

Copy link
Copy Markdown
Author

Hamza El-Saawy (@helsaawy) I think I'll just close this PR for now until we move to build with 1.19. Thoughts?

@jterry75

Copy link
Copy Markdown
Contributor

LGTM

@helsaawy

Copy link
Copy Markdown
Contributor

Hamza El-Saawy (@helsaawy) I think I'll just close this PR for now until we move to build with 1.19. Thoughts?

Fine by me; hopefully we dont run into the same issue elsewhere

@katiewasnothere

Copy link
Copy Markdown
Author

Closing for now

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@katiewasnothere@helsaawy@jterry75