Skip to content

bump compose-go to version v2.14.0 - #13983

Merged
glours merged 1 commit into
docker:mainfrom
glours:bump-compose-go-v2.14.0
Jul 30, 2026
Merged

bump compose-go to version v2.14.0#13983
glours merged 1 commit into
docker:mainfrom
glours:bump-compose-go-v2.14.0

Conversation

@glours

@glours glours commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What I did
Bump compose-go to version v2.14.0

Related issue
N/A

(not mandatory) A picture of a cute animal, if possible in relation to what you did
image

@glours
glours requested review from a team as code owners July 30, 2026 08:39
@glours
glours requested a review from ndeloof July 30, 2026 08:39
@glours glours self-assigned this Jul 30, 2026
Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
@glours
glours force-pushed the bump-compose-go-v2.14.0 branch from 257ccd9 to d448e1f Compare July 30, 2026 08:41

@docker-agent docker-agent left a comment

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.

Assessment: 🟢 APPROVE

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@thaJeztah

Copy link
Copy Markdown
Member

@thaJeztah

Copy link
Copy Markdown
Member

Not a blocker, but perhaps that joinErrors should match errors.Join; it currently ignores empty slices, but does not check for nil-errors (which errors.Join does), so it could panic if the slice of errors would contain a nil error;

func joinErrors(errs []error) error {
	if len(errs) == 0 {
		return nil
	}
	slices.SortStableFunc(errs, func(a, b error) int {
		return slices.Compare(errorPath(a), errorPath(b))
	})
	return errors.Join(errs...)
}

This would panic (err.Error());

func errorPath(err error) []string {
	var pe pathError
	if errors.As(err, &pe) {
		return pe.path.Parts()
	}
	return []string{err.Error()}
}

(possibly the pathError error-type could also provide a Cmp helper for the sorting); wondering though if we should look at an exported error-type (I think BuildKit has something for the Dockerfile parsing errors), that could point to the path and line the error occurred in the compose-file (or are these different)?

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@thaJeztah

thaJeztah commented Jul 30, 2026

Copy link
Copy Markdown
Member

(possibly the pathError error-type could also provide a Cmp helper for the sorting)

Mostly thinking here to keep sorting and joining separate. The joinErrors makes it feel too much like a generic utility, but it should only be used for these specific cases, so making it transparent "sort path errors before joining" also makes it more transparent that we're doing something special;

func sortPathErrors(errs []error) {
	slices.SortStableFunc(errs, func(a, b error) int {
		return slices.Compare(errorPath(a), errorPath(b))
	})
}

☝️ should have some guards for empty slices and nil errors.

Then sort before joining;

sortPathErrors(errs)
return out, errors.Join(errs...)

@glours
glours merged commit 970e583 into docker:main Jul 30, 2026
42 checks passed
@glours
glours deleted the bump-compose-go-v2.14.0 branch July 30, 2026 10:06
Sign up for free to 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.

4 participants