Skip to content
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

vendor: update compose-go to v2.0.0-rc.3 #2205

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

crazy-max
Copy link
Member

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

full diff: compose-spec/compose-go@v1.20.0...v2.0.0-rc.3

Also revert non-deterministic compose context path changes introduced in #2014 but is fixed with compose-go v2.

Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM

@crazy-max
Copy link
Member Author

Context path has changed (again) and tests don't expect anymore an absolute path: https://github.com/docker/buildx/actions/runs/7640052586/job/20814449787?pr=2205#step:6:161

=== RUN   TestParseCompose
    compose_test.go:68: 
        	Error Trace:	/src/bake/compose_test.go:68
        	Error:      	Not equal: 
        	            	expected: "/src/bake/db"
        	            	actual  : "db"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-/src/bake/db
        	            	+db
        	Test:       	TestParseCompose

This has been changed in #2014 but looks like we need to revert this now with compose-go v2 since it goes to the original and proper behavior.

@crazy-max
Copy link
Member Author

crazy-max commented Jan 24, 2024

Unit tests don't run on Windows on CI (will fix that) but running them on a local Windows machine returns a bunch of test failures related also to context path changes in compose-go v2 which has the opposite behavior of Linux one so seems to be a bug in compose-go:

=== RUN   TestParseCompose
    compose_test.go:68: 
        	Error Trace:	X:/buildx/bake/compose_test.go:68
        	Error:      	Not equal: 
        	            	expected: "X:\\buildx\\bake\\db"
        	            	actual  : "db"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-X:\buildx\bake\db
        	            	+db
        	Test:       	TestParseCompose
--- FAIL: TestParseCompose (0.00s)

@crazy-max
Copy link
Member Author

Unit tests don't run on Windows on CI (will fix that)

done #2206

@crazy-max
Copy link
Member Author

Ok so on unix we have:

=== Failed
=== FAIL: bake TestParseCompose (0.01s)
    compose_test.go:68: 
        	Error Trace:	/home/runner/work/buildx/buildx/bake/compose_test.go:68
        	Error:      	Not equal: 
        	            	expected: "/home/runner/work/buildx/buildx/bake/db"
        	            	actual  : "db"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-/home/runner/work/buildx/buildx/bake/db
        	            	+db
        	Test:       	TestParseCompose

=== FAIL: bake TestReadEmptyTargets (0.13s)
    bake_test.go:599: 
        	Error Trace:	/home/runner/work/buildx/buildx/bake/bake_test.go:599
        	Error:      	Not equal: 
        	            	expected: "/home/runner/work/buildx/buildx/bake"
        	            	actual  : "."
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-/home/runner/work/buildx/buildx/bake
        	            	+.
        	Test:       	TestReadEmptyTargets

=== FAIL: bake TestReadTargetsCompose (0.16s)
    bake_test.go:311: 
        	Error Trace:	/home/runner/work/buildx/buildx/bake/bake_test.go:311
        	Error:      	Not equal: 
        	            	expected: "/home/runner/work/buildx/buildx/bake"
        	            	actual  : "."
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-/home/runner/work/buildx/buildx/bake
        	            	+.
        	Test:       	TestReadTargetsCompose

=== FAIL: bake TestReadTargetsWithDotCompose (0.16s)
    bake_test.go:375: 
        	Error Trace:	/home/runner/work/buildx/buildx/bake/bake_test.go:375
        	Error:      	Not equal: 
        	            	expected: "/home/runner/work/buildx/buildx/bake"
        	            	actual  : "."
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-/home/runner/work/buildx/buildx/bake
        	            	+.
        	Test:       	TestReadTargetsWithDotCompose

DONE 345 tests, 1 skipped, 4 failures in 73.830s

on windows:

=== Failed
=== FAIL: bake TestParseCompose (0.01s)
    compose_test.go:68: 
        	Error Trace:	D:/a/buildx/buildx/bake/compose_test.go:68
        	Error:      	Not equal: 
        	            	expected: "D:\\a\\buildx\\buildx\\bake\\db"
        	            	actual  : "db"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-D:\a\buildx\buildx\bake\db
        	            	+db
        	Test:       	TestParseCompose

=== FAIL: bake TestReadEmptyTargets (0.02s)
    bake_test.go:599: 
        	Error Trace:	D:/a/buildx/buildx/bake/bake_test.go:599
        	Error:      	Not equal: 
        	            	expected: "D:\\a\\buildx\\buildx\\bake"
        	            	actual  : "."
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-D:\a\buildx\buildx\bake
        	            	+.
        	Test:       	TestReadEmptyTargets

=== FAIL: bake TestReadTargetsCompose (0.11s)
    bake_test.go:311: 
        	Error Trace:	D:/a/buildx/buildx/bake/bake_test.go:311
        	Error:      	Not equal: 
        	            	expected: "D:\\a\\buildx\\buildx\\bake"
        	            	actual  : "."
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-D:\a\buildx\buildx\bake
        	            	+.
        	Test:       	TestReadTargetsCompose

=== FAIL: bake TestReadTargetsWithDotCompose (0.09s)
    bake_test.go:375: 
        	Error Trace:	D:/a/buildx/buildx/bake/bake_test.go:375
        	Error:      	Not equal: 
        	            	expected: "D:\\a\\buildx\\buildx\\bake"
        	            	actual  : "."
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-D:\a\buildx\buildx\bake
        	            	+.
        	Test:       	TestReadTargetsWithDotCompose

DONE 344 tests, 1 skipped, 4 failures in 154.523s

@crazy-max crazy-max force-pushed the bump-compose-go branch 3 times, most recently from 91ebb0f to 97269be Compare January 26, 2024 13:56
@crazy-max crazy-max marked this pull request as ready for review January 26, 2024 14:01
Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LTGM, we just need to use v2.0.0-rc.3 version of compose-go before merging

go.mod Outdated Show resolved Hide resolved
crazy-max and others added 2 commits January 31, 2024 14:15
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max changed the title vendor: update compose-go to v2.0.0-rc.2 vendor: update compose-go to v2.0.0-rc.3 Jan 31, 2024
@crazy-max crazy-max merged commit 4b408c7 into docker:master Jan 31, 2024
63 checks passed
@crazy-max crazy-max deleted the bump-compose-go branch January 31, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants