Skip to content

Commit

Permalink
Bump compose-go to v2.0.2
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
  • Loading branch information
ndeloof committed Mar 22, 2024
1 parent c5a760c commit 897d239
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/Microsoft/go-winio v0.6.1
github.com/buger/goterm v1.0.4
github.com/compose-spec/compose-go/v2 v2.0.0
github.com/compose-spec/compose-go/v2 v2.0.2
github.com/containerd/console v1.0.3
github.com/containerd/containerd v1.7.12
github.com/davecgh/go-spew v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+g
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE=
github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb/go.mod h1:ZjrT6AXHbDs86ZSdt/osfBi5qfexBrKUdONk989Wnk4=
github.com/compose-spec/compose-go/v2 v2.0.0 h1:RLI8GmNxRLg759CzZITh/kGYZTYhEak121FaVYdXTC8=
github.com/compose-spec/compose-go/v2 v2.0.0/go.mod h1:bEPizBkIojlQ20pi2vNluBa58tevvj0Y18oUSHPyfdc=
github.com/compose-spec/compose-go/v2 v2.0.2 h1:zhXMV7VWI00Su0LdKt8/sxeXxcjLWhmGmpEyw+ZYznI=
github.com/compose-spec/compose-go/v2 v2.0.2/go.mod h1:bEPizBkIojlQ20pi2vNluBa58tevvj0Y18oUSHPyfdc=
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
Expand Down
6 changes: 2 additions & 4 deletions pkg/compose/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,10 +711,8 @@ func setLimits(limits *types.Resource, resources *container.Resources) {
if limits.MemoryBytes != 0 {
resources.Memory = int64(limits.MemoryBytes)
}
if limits.NanoCPUs != "" {
if f, err := strconv.ParseFloat(limits.NanoCPUs, 64); err == nil {
resources.NanoCPUs = int64(f * 1e9)
}
if limits.NanoCPUs != 0 {
resources.NanoCPUs = int64(limits.NanoCPUs * 1e9)
}
if limits.Pids > 0 {
resources.PidsLimit = &limits.Pids
Expand Down
2 changes: 1 addition & 1 deletion pkg/e2e/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestLocalComposeConfig(t *testing.T) {

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

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

0 comments on commit 897d239

Please sign in to comment.