Skip to content

Commit 897d239

Browse files
committed
Bump compose-go to v2.0.2
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent c5a760c commit 897d239

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/AlecAivazis/survey/v2 v2.3.7
77
github.com/Microsoft/go-winio v0.6.1
88
github.com/buger/goterm v1.0.4
9-
github.com/compose-spec/compose-go/v2 v2.0.0
9+
github.com/compose-spec/compose-go/v2 v2.0.2
1010
github.com/containerd/console v1.0.3
1111
github.com/containerd/containerd v1.7.12
1212
github.com/davecgh/go-spew v1.1.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+g
8686
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
8787
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE=
8888
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb/go.mod h1:ZjrT6AXHbDs86ZSdt/osfBi5qfexBrKUdONk989Wnk4=
89-
github.com/compose-spec/compose-go/v2 v2.0.0 h1:RLI8GmNxRLg759CzZITh/kGYZTYhEak121FaVYdXTC8=
90-
github.com/compose-spec/compose-go/v2 v2.0.0/go.mod h1:bEPizBkIojlQ20pi2vNluBa58tevvj0Y18oUSHPyfdc=
89+
github.com/compose-spec/compose-go/v2 v2.0.2 h1:zhXMV7VWI00Su0LdKt8/sxeXxcjLWhmGmpEyw+ZYznI=
90+
github.com/compose-spec/compose-go/v2 v2.0.2/go.mod h1:bEPizBkIojlQ20pi2vNluBa58tevvj0Y18oUSHPyfdc=
9191
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
9292
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=
9393
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=

pkg/compose/create.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -711,10 +711,8 @@ func setLimits(limits *types.Resource, resources *container.Resources) {
711711
if limits.MemoryBytes != 0 {
712712
resources.Memory = int64(limits.MemoryBytes)
713713
}
714-
if limits.NanoCPUs != "" {
715-
if f, err := strconv.ParseFloat(limits.NanoCPUs, 64); err == nil {
716-
resources.NanoCPUs = int64(f * 1e9)
717-
}
714+
if limits.NanoCPUs != 0 {
715+
resources.NanoCPUs = int64(limits.NanoCPUs * 1e9)
718716
}
719717
if limits.Pids > 0 {
720718
resources.PidsLimit = &limits.Pids

pkg/e2e/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func TestLocalComposeConfig(t *testing.T) {
3939

4040
t.Run("json", func(t *testing.T) {
4141
res := c.RunDockerComposeCmd(t, "-f", "./fixtures/config/compose.yaml", "--project-name", projectName, "config", "--format", "json")
42-
res.Assert(t, icmd.Expected{Out: `ports":[{"mode":"ingress","target":80,"published":"8080","protocol":"tcp"}]`})
42+
res.Assert(t, icmd.Expected{Out: `"published": "8080"`})
4343
})
4444

4545
t.Run("--no-interpolate", func(t *testing.T) {

0 commit comments

Comments
 (0)