GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ci: test-unit job matrix for win/macos/ubuntu by crazy-max · Pull Request #2206 · docker/buildx

Conversation

@crazy-max

@crazy-max crazy-max commented Jan 24, 2024

Copy link
Copy Markdown
Member

follow-up #2205 (comment)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@crazy-max crazy-max added kind/tests area/ci labels Jan 24, 2024
@crazy-max
crazy-max force-pushed the test-os branch from c3a5358 to 1936d07 Compare January 24, 2024 13:00
@crazy-max

crazy-max commented Jan 24, 2024

Copy link
Copy Markdown
Member Author

Some tests look to fail on windows runner: https://github.com/docker/buildx/actions/runs/7640538748/job/20815891223#step:5:419

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@crazy-max crazy-max changed the title ci: run unit tests on windows ci: test-os job for unit tests Jan 25, 2024
@crazy-max
crazy-max force-pushed the test-os branch 4 times, most recently from 61852c8 to 173a44d Compare January 25, 2024 08:45
@crazy-max crazy-max changed the title ci: test-os job for unit tests ci: test-unit job matrix for win/macos/ubuntu Jan 25, 2024
@crazy-max
crazy-max force-pushed the test-os branch 3 times, most recently from 5137a6c to 947498a Compare January 25, 2024 09:20
@crazy-max

crazy-max commented Jan 25, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

This one is interesting when running tests on macOS runner when temp dir is the default one: https://github.com/docker/buildx/actions/runs/7652363539/job/20851977017?pr=2206#step:6:863

=== Failed
=== FAIL: controller/pb TestResolvePaths/contextpath (0.00s)
    path_test.go:244: expected pb.BuildOptions{ContextPath:"/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/testresolvepaths759994391/test", DockerfileName:"", PrintFunc:(*pb.PrintFunc)(nil), NamedContexts:map[string]string(nil), Allow:[]string(nil), Attests:[]*pb.Attest(nil), BuildArgs:map[string]string(nil), CacheFrom:[]*pb.CacheOptionsEntry(nil), CacheTo:[]*pb.CacheOptionsEntry(nil), CgroupParent:"", Exports:[]*pb.ExportEntry(nil), ExtraHosts:[]string(nil), Labels:map[string]string(nil), NetworkMode:"", NoCacheFilter:[]string(nil), Platforms:[]string(nil), Secrets:[]*pb.Secret(nil), ShmSize:0, SSH:[]*pb.SSH(nil), Tags:[]string(nil), Target:"", Ulimits:(*pb.UlimitOpt)(nil), Builder:"", NoCache:false, Pull:false, ExportPush:false, ExportLoad:false, SourcePolicy:(*moby_buildkit_v1_sourcepolicy.Policy)(nil), Ref:"", GroupRef:"", Annotations:[]string(nil), XXX_NoUnkeyedLiteral:struct {}{}, XXX_unrecognized:[]uint8(nil), XXX_sizecache:0}, got pb.BuildOptions{ContextPath:"/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/testresolvepaths759994391/test", DockerfileName:"", PrintFunc:(*pb.PrintFunc)(nil), NamedContexts:map[string]string(nil), Allow:[]string(nil), Attests:[]*pb.Attest(nil), BuildArgs:map[string]string(nil), CacheFrom:[]*pb.CacheOptionsEntry(nil), CacheTo:[]*pb.CacheOptionsEntry(nil), CgroupParent:"", Exports:[]*pb.ExportEntry(nil), ExtraHosts:[]string(nil), Labels:map[string]string(nil), NetworkMode:"", NoCacheFilter:[]string(nil), Platforms:[]string(nil), Secrets:[]*pb.Secret(nil), ShmSize:0, SSH:[]*pb.SSH(nil), Tags:[]string(nil), Target:"", Ulimits:(*pb.UlimitOpt)(nil), Builder:"", NoCache:false, Pull:false, ExportPush:false, ExportLoad:false, SourcePolicy:(*moby_buildkit_v1_sourcepolicy.Policy)(nil), Ref:"", GroupRef:"", Annotations:[]string(nil), XXX_NoUnkeyedLiteral:struct {}{}, XXX_unrecognized:[]uint8(nil), XXX_sizecache:0}
    --- FAIL: TestResolvePaths/contextpath (0.00s)

Note the diff with ContextPath:

/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/testresolvepaths759994391/test
vs
/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/testresolvepaths759994391/test

cc @tonistiigi @jedevc

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@crazy-max
crazy-max force-pushed the test-os branch 3 times, most recently from f3c264e to b04b304 Compare January 25, 2024 09:39
@crazy-max
ci: test-unit job matrix for win/macos/ubuntu
eabbee7
Signed-off-by: CrazyMax <[email protected]>
@crazy-max
crazy-max force-pushed the test-os branch from 8d6b2a8 to eabbee7 Compare January 25, 2024 09:53
crazy-max
crazy-max commented Jan 25, 2024
View reviewed changes
Comment thread build/git_windows.go
Comment on lines +5 to +26
// getLongPathName converts Windows short pathnames to full pathnames.
// For example C:\Users\ADMIN~1 --> C:\Users\Administrator.
func getLongPathName(path string) (string, error) {
// See https://groups.google.com/forum/#!topic/golang-dev/1tufzkruoTg
p, err := windows.UTF16FromString(path)
if err != nil {
return "", err
}
b := p // GetLongPathName says we can reuse buffer
n, err := windows.GetLongPathName(&p[0], &b[0], uint32(len(b)))
if err != nil {
return "", err
}
if n > uint32(len(b)) {
b = make([]uint16, n)
_, err = windows.GetLongPathName(&p[0], &b[0], uint32(len(b)))
if err != nil {
return "", err
}
}
return windows.UTF16ToString(b), nil
}

@crazy-max crazy-max Jan 25, 2024

Copy link
Copy Markdown
Member Author

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.

Logic is the same as moby one https://github.com/moby/moby/blob/e8346c53d93d2cddf3d09910e166cdd8874070b3/integration-cli/utils_windows_test.go#L5-L27

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
crazy-max
crazy-max commented Jan 25, 2024
View reviewed changes
Comment thread util/gitutil/path_windows_test.go
Comment on lines +11 to +14
expected := "C:\\Users\\foobar"
if isGitBash() {
expected = "C:/Users/foobar"
}

@crazy-max crazy-max Jan 25, 2024

Copy link
Copy Markdown
Member Author

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.

As we are using Git bash on ci to run tests, the behavior is not the same.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
crazy-max and others added 2 commits January 25, 2024 15:06
@crazy-max
build: resolve 8.3 filename format to long one on Windows
fb2c62a
Signed-off-by: CrazyMax <[email protected]>
@crazy-max
gitutil: check git bash env when testing
703c765
Signed-off-by: CrazyMax <[email protected]>
@crazy-max
crazy-max force-pushed the test-os branch from 8f7dfde to 703c765 Compare January 25, 2024 14:06
@crazy-max
crazy-max requested review from daghack, jedevc, jsternberg and tonistiigi January 25, 2024 14:18
@crazy-max
crazy-max marked this pull request as ready for review January 25, 2024 14:18
@crazy-max

crazy-max commented Jan 25, 2024

Copy link
Copy Markdown
Member Author

Second commit is a bug on Windows. Let me know if you want this in a dedicated PR. Should be backported as well.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

crazy-max
crazy-max commented Jan 25, 2024
View reviewed changes
Comment thread build/git_windows.go
@@ -0,0 +1,26 @@
package build

@crazy-max crazy-max Jan 25, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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 we should put this in this package or util one. Maybe on buildkit as it might be useful for Windows support (cc @TBBle @gabriel-samfira)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@crazy-max crazy-max added the area/windows label Jan 25, 2024
crazy-max
crazy-max commented Jan 25, 2024
View reviewed changes
Comment thread .github/workflows/build.yml
Comment on lines -74 to -76
include:
- pkg: ./...
skip-integration-tests: 1

@crazy-max crazy-max Jan 25, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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.

@jedevc I removed this one as it's already handled in test-unit job through ubuntu-latest otherwise we have dup testing. Let me know if that sounds good.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
crazy-max
crazy-max commented Jan 25, 2024
View reviewed changes
Comment thread .github/workflows/build.yml
uses: codecov/codecov-action@v3
with:
directory: ./bin/testreports
flags: integration

@crazy-max crazy-max Jan 25, 2024

Copy link
Copy Markdown
Member Author

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.

Added some flags for codecov so we have a clear distinction between unit and integration tests

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
This was referenced Jan 25, 2024
Use Cobra's command.Context(), cancel execution when CLI is signalled #2184
Merged
build: resolve 8.3 filename format to long one on Windows #2209
Closed
tonistiigi
tonistiigi approved these changes Jan 26, 2024
View reviewed changes
@crazy-max crazy-max added the needs-cherry-pick/v0.12 label Jan 26, 2024
@crazy-max
crazy-max merged commit 8276224 into docker:master Jan 26, 2024
@crazy-max
crazy-max deleted the test-os branch January 26, 2024 08:11
@crazy-max crazy-max added this to the v0.13.0 milestone Jan 26, 2024
This was referenced Jan 26, 2024
vendor: update compose-go to v2.0.0-rc.3 #2205
Merged
vendor: github.com/spf13/cobra v1.8.0 #2215
Merged
@crazy-max crazy-max added the status/needs-follow-up label Jan 26, 2024
@crazy-max

crazy-max commented Jan 26, 2024

Copy link
Copy Markdown
Member Author

Needs follow-up for client-side integration tests on windows/macos

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@crazy-max crazy-max mentioned this pull request Feb 1, 2024
[v0.12] cherry-picks for v0.12.2 #2233
Closed
@crazy-max crazy-max removed the needs-cherry-pick/v0.12 label Feb 1, 2024
@crazy-max crazy-max mentioned this pull request Feb 2, 2024
vendor: github.com/containerd/console 8f6c4e4 #2238
Merged
@crazy-max crazy-max mentioned this pull request Feb 10, 2024
retrieve root path from FS instances tonistiigi/fsutil#179
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tonistiigi tonistiigi tonistiigi approved these changes
@jsternberg jsternberg Awaiting requested review from jsternberg
@daghack daghack Awaiting requested review from daghack
@jedevc jedevc Awaiting requested review from jedevc

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

area/ci area/windows kind/tests status/needs-follow-up

Projects

None yet

Milestone

v0.13.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@crazy-max @tonistiigi
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.