Skip to content

deps: bump github.com/compose-spec/compose-go/v2 from 2.14.0 to 2.16.2 - #142

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/compose-spec/compose-go/v2-2.16.2
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/compose-spec/compose-go/v2-2.16.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Bumps github.com/compose-spec/compose-go/v2 from 2.14.0 to 2.16.2.

Release notes

Sourced from github.com/compose-spec/compose-go/v2's releases.

v2.16.2

What's Changed

Full Changelog: compose-spec/compose-go@v2.16.1...v2.16.2

v2.16.1

What's Changed

Full Changelog: compose-spec/compose-go@v2.16.0...v2.16.1

v2.16.0

⚠️ Breaking change (Go API)

types.ServiceConfig now embeds types.ContainerSpec and types.WorkloadSpec, shared with the new jobs element and pre_start init containers. Field access is unchanged (svc.Image), but struct literals must now set moved fields through the embedded structs, and code walking ServiceConfig with reflection will see these two embedded structs instead of a flat list of fields:

types.ServiceConfig{Name: "web", ContainerSpec: types.ContainerSpec{Image: "nginx"}}

ServiceConfig.PreStart is now a []types.PreStartHook (was []types.ServiceHook), which embeds a full ContainerSpec; Image and PerReplica are no longer fields of ServiceHook.

The order of keys in the YAML and JSON produced for a service also changes (service-level keys first, then container-level, then workload-level ones). The content is the same, but expected files compared as text need to be regenerated.

What's Changed

New Contributors

Full Changelog: compose-spec/compose-go@v2.15.0...v2.16.0

v2.15.0

What's Changed

... (truncated)

Commits
  • ddbe099 feat: add the umask service attribute
  • 5515644 types: add ServiceNameAliasEnabled helper on ServiceNetworkConfig
  • 3aaa230 types: add use_service_name_alias to service networks
  • 79c7069 chore(deps): bump actions/upload-artifact from 7.0.1 to 7.0.2
  • 08a1af1 chore(deps): bump actions/download-artifact from 8.0.1 to 8.0.2
  • bd828ea types: resolve the labels of pre_start hooks
  • c53b350 types: resolve the environment of pre_start hooks
  • 32d8d5d override: share the by-key compaction and reject null ipam config items
  • 7ed4d72 override: pin the merge of KEY=VALUE entries that are not interpolated
  • be0aa2f override: compact repeated keys and keep empty lists in KEY=VALUE merge
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Oct 26, 2026
Bumps [github.com/compose-spec/compose-go/v2](https://github.com/compose-spec/compose-go) from 2.14.0 to 2.16.2.
- [Release notes](https://github.com/compose-spec/compose-go/releases)
- [Commits](compose-spec/compose-go@v2.14.0...v2.16.2)

---
updated-dependencies:
- dependency-name: github.com/compose-spec/compose-go/v2
  dependency-version: 2.16.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/go_modules/github.com/compose-spec/compose-go/v2-2.16.2 branch from 4541662 to 16dead2 Compare November 5, 2026 14:52

@dap-code-review-by-crunchloop dap-code-review-by-crunchloop Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review — 16dead2 · BLOCKING

The compose-go API bump introduces a compile-time incompatibility in the native compose package, blocking builds of the project and downstream consumers.

Finding Anchor
🟠 HIGH The compose-go bump leaves the native compose package uncompilable
core/version-compatibility
go.mod:6
What I reviewed

Coverage: Reviewed commit 16dead2303f5cc73ae2e43632b7e13f02f71624b (1 commit; 2 files: go.mod, go.sum) against the repository engineering guidance at base SHA a4e72d2a108d81ab72539c17fcd8483acb384d7e; .dap/code-review.yml is absent. Checked the changed dependency API against native compose consumers and the old dependency declaration. The dependency-only scope otherwise has no additional surfaced behavior to assess; broader runtime and integration behavior was not reached. version-compatibility, interface-contract, and correctness were applicable; lifecycle, state-integrity, security, and other unrelated mechanisms were not in scope.


BLOCKING — at least one finding is at or above this repository's blocking severity. Reply in a finding's own thread to argue it. On the pull request I answer @dap-code-review-by-crunchloop review, pause and resume.

Comment thread go.mod

require (
github.com/compose-spec/compose-go/v2 v2.14.0
github.com/compose-spec/compose-go/v2 v2.16.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 HIGH · core/version-compatibility

The compose-go bump leaves the native compose package uncompilable

compose/plan.go:213-215 consumes the changed ServiceConfig.PreStart field by assigning it to hooks []composetypes.ServiceHook; the updated compose-go definition at /tmp/compose-go-v2.16.2/types/types.go:157 makes those slice types incompatible. The same stale assignment occurs in pre_start test fixtures.

Fix — Update pre_start handling and fixtures to use compose-go's PreStartHook type, or handle pre_start separately while preserving validation of all three hook fields.

Witness

Commands and raw output:

git show HEAD:compose/plan.go | sed -n '209,218p'
func unsupportedHooks(service string, svc composetypes.ServiceConfig) []UnsupportedField {
	var out []UnsupportedField
	for _, h := range []struct {
		field string
		hooks []composetypes.ServiceHook
	}{
		{"pre_start", svc.PreStart},
		{"post_start", svc.PostStart},
		{"pre_stop", svc.PreStop},
sed -n '157,159p' /tmp/compose-go-v2.16.2/types/types.go
	PreStart      []PreStartHook         `yaml:"pre_start,omitempty" json:"pre_start,omitempty"`
	PostStart     []ServiceHook          `yaml:"post_start,omitempty" json:"post_start,omitempty"`
	PreStop       []ServiceHook          `yaml:"pre_stop,omitempty" json:"pre_stop,omitempty"`
grep -nE 'PreStart|ServiceHook' /tmp/compose-go-v2.14.0/types/types.go
141:	PreStart        []ServiceHook                    `yaml:"pre_start,omitempty" json:"pre_start,omitempty"`
142:	PostStart       []ServiceHook                    `yaml:"post_start,omitempty" json:"post_start,omitempty"`
143:	PreStop         []ServiceHook                    `yaml:"pre_stop,omitempty" json:"pre_stop,omitempty"`

The new dependency changes ServiceConfig.PreStart from []ServiceHook to []PreStartHook, but unsupportedHooks still places it into a []ServiceHook field. Go rejects this assignment, so the package (and consumers building it) cannot compile after this dependency bump. The related tests also construct PreStart with []ServiceHook (for example compose/plan_test.go:207 and compose/orchestrator_test.go:1324), independently breaking test compilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants