-
Notifications
You must be signed in to change notification settings - Fork 48
ci: add windows to test matrix #173
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
Ok so a bunch of tests look to fail on Windows runner: https://github.com/tonistiigi/fsutil/actions/runs/7642673575/job/20822858671?pr=173#step:4:21 I'm more worried about:
|
c595ae6
to
9de1b78
Compare
This comment was marked as resolved.
This comment was marked as resolved.
root = filepath.FromSlash(filepath.Clean(root)) | ||
if root == string(filepath.Separator) || root == "." { |
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.
It changes the behavior introduced in #174 related to docker/buildx#2207 to be aligned with os separator. cc @gabriel-samfira.
Hi @crazy-max Will have a look today. I had a couple of old PRs that tried to do this a while back 😄. Glad to see this happening. Apologies for the delay. |
No worries! I will carry your commit from #148 and add back my few changes so you can have a better look. 🙏 |
cb02be4
to
b7a2e86
Compare
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.
Looks good. Just one tiny comment. Changes are mostly mechanic and deal with path separators.
@@ -138,7 +139,7 @@ func doubleWalkDiff(ctx context.Context, changeFn ChangeFunc, a, b walkerFn, fil | |||
return err | |||
} | |||
if f1.stat.IsDir() && !f2copy.stat.IsDir() { | |||
rmdir = f1.path + string(os.PathSeparator) | |||
rmdir = f1.path + string(filepath.Separator) |
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.
(Just picked a random line); is all code always executed in the "native" environment, or are there also code-paths executed on non-matching platforms (client-side code running on Linux/mac on behalf of a daemon running on Windows, and vice-versa?)
Also note that /
is accepted in various situations on Windows, so users may use /
to specify paths on Windows, so in some cases both /
and \
may have to be taken into account (if not normalised)
which was taken from https://github.com/golang/go/blob/1d0e94b1e13d5e8a323a63cd1cc1ef95290c9c36/src/path/filepath/path_windows.go#L12-L65
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.
Looks like freebsd has actual test failures
This is not related to changes here I think but #172 (comment). Looks flaky. |
Should be good now if you want to merge this one first: #172 |
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@@ -96,7 +96,7 @@ func NewFilterFS(fs FS, opt *FilterOpt) (FS, error) { | |||
} | |||
|
|||
patternChars := "*[]?^" | |||
if os.PathSeparator != '\\' { | |||
if filepath.Separator != '\\' { |
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.
Not sure if this can be easily fixed but FS
should not be platform-specific, so these filters should also not depend on the current os.
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.
Hum I think this is based on user input if I'm not mistaken (cc @jedevc)
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.
We can leave this for follow-up
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.
This seems to come from #121.
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.