Commit Graph

308 Commits

Author SHA1 Message Date
Guillaume Lours 34bcd03a76 add --pull to run command
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-12-18 12:20:02 +01:00
Sebastiaan van Stijn 446e00520c format code with gofumpt
Format the code  with gofumpt to prevent my IDE from reformatting
every time I open a file. gofumpt provides a superset of gofmt,
so should not impact users that are not using gofumpt.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-17 16:50:14 +01:00
Nicolas De Loof c01c9c29f4 e2e test to prevent future regression
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-16 15:46:47 +01:00
Nicolas De Loof a20b69ac5b e2e test for recreate volume
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-13 09:52:22 +01:00
Joana Hrotko 332311358e Recreate container on volume configuration change
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-12 19:11:00 +01:00
Nicolas De Loof fc566509d5 fix support for service.mac_address
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-10 15:59:26 +01:00
Nicolas De loof a1729c52de Update pkg/e2e/watch_test.go
Co-authored-by: Guillaume Lours <705411+glours@users.noreply.github.com>
Signed-off-by: Nicolas De loof <nicolas.deloof@gmail.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-06 16:46:42 +01:00
Nicolas De Loof 0861e68450 fix
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-06 16:46:42 +01:00
Nicolas De Loof 32a22c1f4f introduce sync+exec watch action
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-06 16:46:42 +01:00
Guillaume Lours cbff0e5559 be sure everything has been cleanup at the end of each tests
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-12-04 15:28:16 +01:00
Guillaume Lours e4222bff53 add local config.json to test configuration dir if exists
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-12-04 15:28:16 +01:00
Nicolas De Loof 25197fe6dd disable failing TestBuildSSH test
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-04 15:14:56 +01:00
Nicolas De Loof 85cdaf9ddf fix build with bake
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-03 12:05:40 +01:00
Nicolas De Loof 8e497a1289 disable TestNetworkConfigChanged which is unstable on CI
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-11-27 09:51:07 +01:00
MohammadHasan Akbari 1ff9b758d2 fix: commit tests
Signed-off-by: MohammadHasan Akbari <jarqvi.jarqvi@gmail.com>
2024-11-27 07:39:46 +01:00
MohammadHasan Akbari 9eaba55973 feat: add commit command
Signed-off-by: MohammadHasan Akbari <jarqvi.jarqvi@gmail.com>
2024-11-27 07:39:46 +01:00
Nicolas De Loof a85f8a40a9 run build tests against bake
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-11-26 15:20:50 +01:00
Nicolas De Loof c21d4cfb40 detect network config changes and recreate if needed
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-11-15 15:35:49 +01:00
Guillaume Lours 2bb67f2700 remove ddev e2e tests
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-11-13 12:52:48 +01:00
Matthieu MOREL 11e9621da5 ci: enable testifylint linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-11-12 11:12:32 +01:00
Nicolas De Loof 2f65ace2aa remove obsolete containers first on scale down
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-11-12 09:47:36 +01:00
Joana Hrotko eececb9add Add profile e2e test case to document in compose
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-10-30 16:00:41 +01:00
Nicolas De Loof aa1ec4524c connect to external networks by name
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-25 16:42:28 +02:00
Nicolas De Loof fa24ab8e25 one-off container are not indexed, and must be ignored by exec --index command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-22 15:29:12 +02:00
Nicolas De Loof 0aad9595a5 don't use progress to render restart, which hides logs
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-22 15:28:55 +02:00
Nicolas De Loof 15bd0b0c5f add support for raw env_file format
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-08 18:33:54 +02:00
MohammadHasan Akbari bf0418bac1 fix: lint
Signed-off-by: MohammadHasan Akbari <116190942+jarqvi@users.noreply.github.com>
Signed-off-by: MohammadHasan Akbari <jarqvi.jarqvi@gmail.com>
2024-10-02 21:15:59 +02:00
MohammadHasan Akbari b9d0c77cde feat: add export command
Signed-off-by: MohammadHasan Akbari <jarqvi.jarqvi@gmail.com>
2024-10-02 21:15:59 +02:00
Nicolas De Loof 1076f1d9a5 stop dependent containers before recreating diverged service
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-09-16 10:14:54 +02:00
Sebastiaan van Stijn d445ebba3f fix linting issues with golangci-lint 1.60.2
pkg/watch/watcher_darwin.go:96:16: Error return value of `d.stream.Start` is not checked (errcheck)
        d.stream.Start()
                      ^
    pkg/prompt/prompt.go:97:12: Error return value of `fmt.Fprint` is not checked (errcheck)
        fmt.Fprint(u.stdout, message)
                  ^
    pkg/prompt/prompt.go:99:12: Error return value of `fmt.Scanln` is not checked (errcheck)
        fmt.Scanln(&answer)
                  ^
    cmd/formatter/logs.go:118:15: Error return value of `fmt.Fprintf` is not checked (errcheck)
                fmt.Fprintf(w, "%s%s%s\n", p.prefix, timestamp, line)
                           ^
    cmd/formatter/logs.go:120:15: Error return value of `fmt.Fprintf` is not checked (errcheck)
                fmt.Fprintf(w, "%s%s\n", p.prefix, line)
                           ^
    pkg/progress/json.go:67:15: Error return value of `fmt.Fprintln` is not checked (errcheck)
            fmt.Fprintln(p.out, string(marshal))
                        ^
    pkg/progress/json.go:87:15: Error return value of `fmt.Fprintln` is not checked (errcheck)
            fmt.Fprintln(p.out, string(marshal))
                        ^
    pkg/progress/plain.go:47:14: Error return value of `fmt.Fprintln` is not checked (errcheck)
        fmt.Fprintln(p.out, prefix, e.ID, e.Text, e.StatusText)
                    ^
    pkg/progress/tty.go:162:12: Error return value of `fmt.Fprint` is not checked (errcheck)
        fmt.Fprint(w.out, b.Column(0).ANSI)
                  ^
    pkg/progress/tty.go:165:12: Error return value of `fmt.Fprint` is not checked (errcheck)
        fmt.Fprint(w.out, aec.Hide)
                  ^
    pkg/compose/attach.go:53:13: Error return value of `fmt.Fprintf` is not checked (errcheck)
        fmt.Fprintf(s.stdout(), "Attaching to %s\n", strings.Join(names, ", "))
                   ^
    pkg/compose/compose.go:194:6: emptyStringTest: replace `len(dependencies) > 0` with `dependencies != ""` (gocritic)
            if len(dependencies) > 0 {
               ^
    pkg/compose/convergence.go:461:2: builtinShadow: shadowing of predeclared identifier: max (gocritic)
        max := 0
        ^
    pkg/compose/run.go:127:5: emptyStringTest: replace `len(opts.User) > 0` with `opts.User != ""` (gocritic)
        if len(opts.User) > 0 {
           ^
    pkg/compose/run.go:139:5: emptyStringTest: replace `len(opts.WorkingDir) > 0` with `opts.WorkingDir != ""` (gocritic)
        if len(opts.WorkingDir) > 0 {
           ^
    pkg/compose/viz.go:91:8: emptyStringTest: replace `len(portConfig.HostIP) > 0` with `portConfig.HostIP != ""` (gocritic)
                    if len(portConfig.HostIP) > 0 {
                       ^
    cmd/compatibility/convert.go:66:6: emptyStringTest: replace `len(arg) > 0` with `arg != ""` (gocritic)
            if len(arg) > 0 && arg[0] != '-' {
               ^
    pkg/e2e/watch_test.go:208:25: printf: non-constant format string in call to gotest.tools/v3/poll.Continue (govet)
                return poll.Continue(res.Combined())
                                     ^
    pkg/e2e/watch_test.go:290:25: printf: non-constant format string in call to gotest.tools/v3/poll.Continue (govet)
                return poll.Continue(r.Combined())
                                     ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-11 13:56:25 +02:00
Nathan Baulch 524a97e553 Fix typos
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-11 11:21:24 +02:00
Joana Hrotko ea4ccf639d Fix stop on file chane for sync-restart action
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-07-25 16:28:47 +02:00
Nicolas De Loof d3d378b92a restore setEnvWithDotEnv
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-07-11 10:25:04 +02:00
Nicolas De Loof 163cdfd31d empty env variable with no value must be unset in container
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-07-10 14:23:34 +02:00
Nicolas De Loof 25f85938bb exclude unnecessary resources after services have been selected
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-07-09 15:12:27 +02:00
Joana Hrotko da434013e3 Remove COMPOSE_MENU env from e2e tests
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-07-01 16:31:12 +01:00
Nicolas De Loof 10531f6302 Fix dot env file to define COMPOSE_* variables
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-06-08 14:55:36 +02:00
Nicolas De Loof 495a087fb5 COMPOSE_PROFILES can be set by .env file
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-05-30 07:40:01 +02:00
Nicolas De Loof 9e8c8caa2b allow a local .env file to override compose.yaml sibling .env
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-05-21 16:01:29 +02:00
Milas Bowman 36bf0c458b chore(e2e): fix flaky cascade failure test
This was racy with the sleep, so the Compose file has been
tweaked to make it pass reliably.

Now, there's 3 services:
 * `running` - sleeps forever
 * `exit` - exits _successfully_ immediately
   * depends on `running` started
 * `fail` - exits _with error_ immediately
   * depends on `exit` succeeding

Now, the test can ensure that the containers are all run/
started in the expected order the assertions will be reliable.

Before, it was possible for `fail` to run & exit before `exit`,
for example. The `running` service also ensures there's always
at least one other "running" container when we do an abort.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2024-04-24 11:03:27 +02:00
Nicolas De Loof d239f0f318 check container_name is not in use by another service we will create
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-16 17:26:50 +02:00
Nicolas De Loof 1d32592056
Introduce support for build.entitlements
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-10 12:27:49 +02:00
Nicolas De Loof b4280fb561 e2e test for --all-resources
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-09 15:30:42 +02:00
Nicolas De Loof 29692b5921 Introduce --abort-on-container-failure
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-08 15:40:54 +02:00
Nicolas De Loof 3b541b071c Bump docker v26.0.0
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-03-22 14:33:56 +01:00
Nicolas De Loof 897d239fcb Bump compose-go to v2.0.2
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-03-22 11:21:14 +01:00
Nicolas De Loof bc5fc6ba7e
fix `compose config --format json`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-03-18 08:09:54 +01:00
Nicolas De Loof b2d4c1b865 fix TestBuildPlatformsWithCorrectBuildxConfig
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-03-15 10:38:03 +01:00
Nicolas De Loof 5a1ba0efcf only use ToModel when --no-interpolate is set
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-03-13 06:48:24 +01:00
Nicolas De Loof 1680f9a874 restore support for `config --no-interpolate`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-02-28 18:54:43 +01:00