-
Notifications
You must be signed in to change notification settings - Fork 609
bake: add wildcard to fs entitlements to allow any paths #2812
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
Conversation
|
Removed long path name handling in our tests 619fa8a but it fails: https://github.com/docker/buildx/actions/runs/11972131393/job/33378391055#step:6:1330 It makes sense as the expected paths don't match anymore like buildx/bake/entitlements_test.go Line 279 in 17eff25
So as Here is a repro of the behavior: https://github.com/crazy-max/go-longpath-win/blob/435f1ae22f324f213b7c7b49be7165aa9eafbd3d/main.go tmpDir := os.TempDir()
wd, _ := os.Getwd()
fmt.Printf("TempDir: %s\n", tmpDir)
fmt.Printf("WorkingDir: %s\n", wd)
tmpDirSym, _ := filepath.EvalSymlinks(tmpDir)
wdSym, _ := filepath.EvalSymlinks(wd)
fmt.Printf("TempDirEvalSymlinks: %s\n", tmpDirSym)
fmt.Printf("WorkingDirEvalSymlinks: %s\n", wdSym)Output on GHA: https://github.com/crazy-max/go-longpath-win/actions/runs/11972415653/job/33379286983#step:4:7 |
619fa8a to
36de6d0
Compare
| expected: EntitlementConf{ | ||
| FSRead: func() []string { | ||
| // on windows root (/) is only allowed if it is the same volume as wd | ||
| if filepath.VolumeName(wd) == filepath.VolumeName(escapeLink) { | ||
| return nil | ||
| } | ||
| // if not, then escapeLink is not allowed | ||
| p, err := evaluateToExistingPath(escapeLink) | ||
| require.NoError(t, err) | ||
| return []string{p} | ||
| }(), | ||
| }, |
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.
Revert the change to allow any volumes for / on windows and handle that case in our tests instead.
36de6d0 to
013d624
Compare
013d624 to
b43dfd0
Compare
b43dfd0 to
14a4f55
Compare
14a4f55 to
e526d54
Compare
Signed-off-by: CrazyMax <[email protected]>
e526d54 to
9c75071
Compare
follow-up #2796 (comment)