refresh Maintainers list
Signed-off-by: Guillaume Lours 705411+glours@users.noreply.github.com
Signed-off-by: Guillaume Lours 705411+glours@users.noreply.github.com
What I did Update the maintainers list, in alphabetical order, to reflect recent changes.
Related issue N/A
(not mandatory) A picture of a cute animal, if possible in relation to what you did
@rborn-tx thanks, nice feedback. I'll try to convert those examples into e2e tests so we have better coverage for this feature
Support for docker compose build --push when using multiple platforms
Signed-off-by: maxcleme maxime.clement@docker.com
Merge pull request #10148 from maxcleme/feat/support_multiarch_push
Support for docker compose build --push
use containers we expect to start for wait condition
Signed-off-by: Nicolas De Loof nicolas.deloof@gmail.com
wait on service containers as dependencies to be deterministic
Signed-off-by: Nicolas De Loof nicolas.deloof@gmail.com
wait on service containers as dependencies to be deterministic
Signed-off-by: Nicolas De Loof nicolas.deloof@gmail.com
wait on service containers as dependencies to be deterministic
Signed-off-by: Nicolas De Loof nicolas.deloof@gmail.com
alias -n for --tail to align with docker CLI
Signed-off-by: Nicolas De Loof nicolas.deloof@gmail.com
Fix: remove the infinite goroutine
Signed-off-by: AhmedGrati ahmedgrati1999@gmail.com
Remove unecessary files
Signed-off-by: AhmedGrati ahmedgrati1999@gmail.com
Fix: remove the infinite goroutine
Signed-off-by: AhmedGrati ahmedgrati1999@gmail.com
Remove unecessary files
Signed-off-by: AhmedGrati ahmedgrati1999@gmail.com
Fix: Handle concurrent threads using mutex on the rainbowColor function
Signed-off-by: AhmedGrati ahmedgrati1999@gmail.com
Merge pull request #10207 from ndeloof/tail_n
alias -n for --tail to align with docker CLI
use containers we expect to start for wait condition
Signed-off-by: Nicolas De Loof nicolas.deloof@gmail.com
wait on service containers as dependencies to be deterministic
Signed-off-by: Nicolas De Loof nicolas.deloof@gmail.com
thanks to @laurazard diagnostic, I've proposed https://github.com/docker/compose/pull/10209
as we check dependency service is running/healthy, use containers we created for the service so that we can detect failure to start, and not wait with no end for a dead service to become healthy.
Related issue closes https://github.com/docker/compose/issues/10200
(not mandatory) A picture of a cute animal, if possible in relation to what you did
indeed, trying to make logs command a background task fails. But it works when running the CLI plugin directly
$ ~/.docker/cli-plugins/docker-compose logs -f
...
truc-test-1 | 2023-01-26 12:34:52.249+0000 [id=49] INFO hudson.util.Retrier#start: Performed the action check updates server successfully at the attempt #1
^Z
[2]+ Stopped ~/.docker/cli-plugins/docker-compose logs -f
Same using the raw Docker CLI:
$ com.docker.cli compose logs -f
truc-test-1 | *************************************************************
truc-test-1 |
^Z
[2]+ Stopped com.docker.cli compose logs -f
So, this is a Cloud integration CLI issue 😅
alias -n for --tail to align with docker CLI
Signed-off-by: Nicolas De Loof nicolas.deloof@gmail.com
LGTM. Regarding https://github.com/docker/compose/issues/10204, I guess resource consumption happens on start, not create. Then, use of --parallel is an alternative to avoid starting all containers at once.
Fix: remove the infinite goroutine
Signed-off-by: AhmedGrati ahmedgrati1999@gmail.com
Remove unecessary files
Signed-off-by: AhmedGrati ahmedgrati1999@gmail.com
Fix: remove the infinite goroutine
Signed-off-by: AhmedGrati ahmedgrati1999@gmail.com
Remove unecessary files
Signed-off-by: AhmedGrati ahmedgrati1999@gmail.com
Fix: Handle concurrent threads using mutex on the rainbowColor function
Signed-off-by: AhmedGrati ahmedgrati1999@gmail.com
Trying to build something that depends on github.com/docker/compose/v2
, then ran into this issue, because all of our tests checks for goroutine leaks at the end of running.
Run following test
package main
import (
"testing"
_ "github.com/docker/compose/v2/cmd/formatter"
"go.uber.org/goleak"
)
func TestLeak(t *testing.T) {
defer goleak.VerifyNone(t)
}
Output:
$ go test
--- FAIL: TestLeak (0.45s)
main_test.go:12: found unexpected goroutines:
[Goroutine 19 in state chan send, with github.com/docker/compose/v2/cmd/formatter.init.0.func1 on top of the stack:
goroutine 19 [chan send]:
github.com/docker/compose/v2/cmd/formatter.init.0.func1()
/home/wxh/go/pkg/mod/github.com/docker/compose/v2@v2.14.2/cmd/formatter/colors.go:120 +0x1de
created by github.com/docker/compose/v2/cmd/formatter.init.0
/home/wxh/go/pkg/mod/github.com/docker/compose/v2@v2.14.2/cmd/formatter/colors.go:104 +0x8b
]
FAIL
exit status 1
FAIL tt 0.451s
This is because there is a non-terminating goroutine in the init()
:
go func() {
i := 0
rainbow := []colorFunc{
colors["cyan"],
colors["yellow"],
colors["green"],
colors["magenta"],
colors["blue"],
colors["intense_cyan"],
colors["intense_yellow"],
colors["intense_green"],
colors["intense_magenta"],
colors["intense_blue"],
}
for {
loop <- rainbow[i]
i = (i + 1) % len(rainbow)
}
}()
Not a best practice to bypass questionable func, but...
defer goleak.VerifyNone(t, goleak.IgnoreTopFunction("github.com/docker/compose/v2/cmd/formatter.init.0.func1"))
https://github.com/docker/compose/blob/v2.14.2/cmd/formatter/colors.go
No response
No response
What I did
Fixed the goroutine leak, by removing the infinite goroutine that will send colors to the channel, and then refactored the rainbowColor()
function inside the colors.go
, to replace the logic of the infinite goroutine.
Related issue
Fixes #10157.
Screenshots of testing
makes perfect sense, PR created to support this
What I did
created -n
alias for compose logs --tail
to align with docker logs
UX
Related issue closes https://github.com/docker/compose/issues/10199
(not mandatory) A picture of a cute animal, if possible in relation to what you did
cleanup TUI lines after switching to "compact" mode
Signed-off-by: Nicolas De Loof nicolas.deloof@gmail.com
After a large amount of lines have been reported on terminal, compose switch to a "limited output" in respect to terminal height, but leaves dead lines see https://github.com/docker/compose/issues/10194#issuecomment-1402849814
What I did cleanup stale lines after switching to "compact" mode (skip child events)
Related issue closes https://github.com/docker/compose/issues/10201