Commit Graph

23 Commits

Author SHA1 Message Date
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
Nicolas De Loof b3792dd258 progress for resource can be restarted after more Working event comes
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-15 22:05:46 +02:00
Nicolas De Loof d8ee474e09 Revert "Stop the resource timer after last expected event"
This reverts commit a4ddbcb6b2.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-15 22:05:46 +02:00
Milas Bowman db4ed89528
feat(desktop): synchronized file share integration (#11614) 2024-03-20 14:41:24 -04:00
Nicolas De Loof 3c4593f2ad Stop the resource timer after last expected event
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-01-16 22:18:42 +01:00
Milas Bowman 80856eacaf
progress: minor correctness fixes (#10871)
* When waiting for dependencies, `select` on the context as well
  as the ticker
* Write multiple progress events "transactionally" (i.e. hold the
  lock for the duration to avoid other events being interleaved)
* Do not change "finished" steps back to "in progress" to prevent
  flickering

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-08-03 15:14:17 -04:00
Guillaume Lours 03f4c0e631
progress: make title configurable (#10507)
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-05-02 14:15:35 -04:00
Nicolas De loof d762f5f473
better support NO_COLOR by disabling colors, not ANSI TUI (#10434)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-04-04 17:00:10 -04:00
Nicolas De Loof 6a0398d786 pad can be negative on small terminal
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-09 10:27:43 +00:00
Nicolas De Loof 24ff098252 compact TUI to monitor layers download progress
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-16 17:55:59 +01:00
Guillaume Lours 2336d9fe35 support dry-run for cp command
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-02-03 22:44:26 +01:00
Guillaume Lours 790712fa92 update tty and plain text writers to support dry run mode
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-30 09:27:17 +01:00
Nicolas De Loof aa31387355 cleanup TUI lines after switching to "compact" mode
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-26 07:56:49 +01:00
Laura Brehm 9daf41892f
Adjust terminal height calc
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-01-12 11:20:05 +01:00
Laura Brehm 69a09624c9 Skip child events when printer events > terminal height
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-01-12 09:52:25 +01:00
Risky Feryansyah d05f5f5fa7
pull: improve output for services with both image+build (#9829)
When an image pull fails but the service has a `build` section, it
will be built, so it's not an unrecoverable error. It's now logged as
a warning - in situations where the image will _never_ exist in a
registry, `pull_policy: never` can & should be used, which will
prevent the error and avoid unnecessary pull attempts.

Signed-off-by: Risky Feryansyah Pribadi <riskypribadi24@gmail.com>
2022-09-13 14:38:13 +01:00
Milas Bowman 27227a8824
lint: add `nolintlint` and clean up `nolint` directives (#9738)
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-08-09 16:43:58 -04:00
Ulysses Souza fc723acb3b Fix nolint issues
Reference -> https://golangci-lint.run/usage/false-positives/#nolint-directive

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-07-13 19:33:06 +02:00
Maxime CLEMENT 48b150beff fix: prevent flickering prompt when pulling same image from N services
Signed-off-by: Maxime CLEMENT <maxime.clement@docker.com>
2022-05-18 08:58:06 +02:00
Nikhil Benesch ee586e7f1e Introduce ergonomic API for handling multiple container events
Signed-off-by: Nikhil Benesch <nikhil.benesch@gmail.com>
2022-01-07 21:22:57 +01:00
Matthias Dötsch 7e6af46af0 stop time.Ticker after use
Signed-off-by: Matthias Dötsch <matthias.doetsch@innogames.com>
2021-09-30 17:09:49 +02:00
Nicolas De Loof 1ae9b3cb5d
move compose-cli code into docker/compose/v2
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-31 19:09:19 +02:00
Nicolas De Loof 49e7f2d45d Move compose v2 implementation under pkg/compose with dependencies
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-15 15:52:48 +02:00