Guillaume Lours
b83edbd039
add dry-run support to create command
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-03-30 10:25:56 +02:00
Nicolas De Loof
c5317496ac
workaround race condition in ContainerList
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-28 12:28:41 +02:00
Guillaume Lours
72a61c0602
add dry-run support to run command
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-03-27 18:57:11 +02:00
Milas Bowman
d818bf6f34
Merge pull request #10401 from milas/deps-update
...
ci: upgrade to Go 1.20.2 & bump deps
2023-03-24 11:05:53 -04:00
Milas Bowman
cd17c8a950
test: update error message
...
Validation got improved in `compose-go` so the error message is
slightly different.
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-03-24 10:42:43 -04:00
Milas Bowman
36625ed229
test: fix race in e2e build test
...
This was running two tests in parallel that would build/delete the
same images. Run in serial instead since that's not safe.
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-03-24 10:32:55 -04:00
Nicolas De Loof
d637cc3ade
watch involves up --build after change has been detected
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-24 10:49:27 +01:00
Milas Bowman
16d5354d70
watch: add note about goroutine-safety & test
...
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-03-23 11:33:03 -04:00
Milas Bowman
7aaea283ca
watch: data race / segfault fixes
...
Was getting segfaults with multiple services using
`x-develop` and `watch` at the same time. Turns out
the Moby path matcher lazily initializes the regex
pattern internally the first time it's used, so it's
not goroutine-safe.
Change here is to not use a global instance for the
ephemeral path matcher, but a per-watcher instance.
Additionally, the data race detector caught a couple
other issues that were easy enough to fix:
* Use the lock that's used elsewhere for convergence
before manipulating
* Eliminate concurrent map access when triggering
rebuilds
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-03-22 18:05:56 -04:00
Nicolas De Loof
a11515e038
introduce `ignore` attribute for watch triggers
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-21 18:29:49 +01:00
Nicolas De Loof
6c1f06e420
Run classic builder with BuildConfig, not buildx.Options
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-21 15:37:55 +01:00
Nicolas De Loof
88b0d17ff8
use `build` as common API for build scenarios
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-21 15:37:55 +01:00
Nicolas De Loof
9e19bc8441
use progress to show copy status
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-21 14:40:52 +01:00
Milas Bowman
105a7c5b70
watch: add file delete/rename handling
...
This approach mimics Tilt's behavior[^1]:
1. At sync time, `stat` the path on host
2. If the path does not exist -> `rm` from container
3. If the path exists -> sync to container
By handling things this way, we're always syncing based on the true
state, regardless of what's happened in the interim. For example, a
common pattern in POSIX tools is to create a file and then rename it
over an existing file. Based on timing, this could be a sync, delete,
sync (every file gets seen & processed) OR a delete, sync (by the
the time we process the event, the "temp" file is already gone, so
we just delete it from the container, where it never existed, but
that's fine since we deletes are idempotent thanks to the `-f` flag
on `rm`).
Additionally, when syncing, if the `stat` call shows it's for a
directory, we ignore it. Otherwise, duplicate, nested copies of the
entire path could get synced in. (On some OSes, an event for the
directory gets dispatched when a file inside of it is modified. In
practice, I think we might want this pushed further down in the
watching code, but since we're already `stat`ing the paths here now,
it's a good place to handle it.)
Lastly, there's some very light changes to the text when it does a
full rebuild that will list out the (merged) set of paths that
triggered it. We can continue to improve the output, but this is
really helpful for understanding why it's rebuilding.
[^1]: db7f887b06/internal/controllers/core/liveupdate/reconciler.go (L911)
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-03-21 08:37:18 -04:00
Luis Rascao
bfeb1dc277
Fix concurrent map read/write when recreating containers
...
Signed-off-by: Luis Rascao <luis.rascao@gmail.com>
2023-03-19 21:56:06 +01:00
Laura Brehm
200f47e5be
Add support for `additional_contexts` in `build` service config
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-03-15 14:00:51 +01:00
Nicolas De Loof
e0aaccf430
introduce dockerfile_inline
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-15 10:19:04 +01:00
Nicolas De Loof
754c06886f
one off container name use configured Separator for naming
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-15 09:47:43 +01:00
Nicolas De Loof
e492330dd5
collect built image IDs
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-15 09:47:32 +01:00
Nicolas De Loof
bbe1b77a67
progress writer uses dockercli.Err stream
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-15 09:47:13 +01:00
Nicolas De Loof
85ddfde5d6
use go 1.20 -cover support
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-10 16:54:39 +00: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
Guillaume Lours
4434cea535
add dry-run support for push command
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-03-08 14:23:57 +00:00
Guillaume Lours
3f7d3c2661
add dry-run support for pull command
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-03-05 22:04:32 +01:00
Guillaume Lours
167c6a89b1
add dry-run support to restart command
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-03-02 10:14:59 +01:00
Guillaume Lours
3cfbac6624
restart only needed services by checking depends_on relations
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-03-01 18:22:40 +01:00
Nicolas De Loof
4ea44797f5
only consider containers with config_hash labels (i.e, created by compose)
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-03-01 15:46:50 +01:00
Milas Bowman
e31b95c16d
test: tweak pause test to try and prevent failures in Windows CI
...
This test keeps failing with a timeout in Windows. I don't actually
think it should take that long to bring up an nginx container, so
I'm guessing that there's something else going on that's causing
trouble.
Increase the verbosity when running Compose commands: I think this
will generally make E2E test failures easier to diagnose by always
logging the full command that's going to be run and also capturing
stdout.
Add a health check and use `--wait` when launching the fixture for
the pause test. Combined with the verbosity increase, this should
make it easier to understand what's going on here.
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-27 14:20:20 -05:00
Milas Bowman
da1ca578b5
watch: ignore ephemeral files & minor output tweaks
...
Big change here is to import the ephemeral ignore set from Tilt.
The `.git` directory is also ignored for now: this restriction
should probably be lifted and made configurable in the future,
but it's not generally important to watch and triggers a LOT of
events (e.g. Git creates `index.lock` files that will appear and
disappear rapidly as terminals/IDEs/etc interact with Git, even
for read-only operations).
The Tilt-provided ephemeral file set has been slowly devised over
time based on temporary files that can cause trouble. We can also
look at a more robust/configurable solution here in the future,
but thse provide a reasonable out-of-the-box configuration for
the moment.
There's also some small tweaks to the output to add missing
newlines in a few edge cases and such.
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-02-24 14:34:51 -05:00
Josh Wilson
6fae6a41f9
Update emacs ignore patterns ( #5903 )
...
Currently the emacs ignore patterns include `**/.#*` (lock files), but
doesn't include `**/#*#` (autosave files;
https://www.emacswiki.org/emacs/AutoSave , not to be confused with
`**/*~` backup files which are ignored.)
Add autosave files.
2022-07-26 08:57:40 -05:00
Milas Bowman
dd5ea044bb
ignore: add Go umask files to ephemeral set ( #5740 )
...
When creating files in Go, the stdlib will create (and then rapidly
delete) files ending with `-go-tmp-umask` to determine the umask
to use for permission purposes.
This can cause trouble with Live Update because the files tend to
vanish underneath it, for example.
Fixes #5117 .
2022-04-27 16:42:51 -04:00
Milas Bowman
12de97b8d1
filewatch: use apiserver FileWatch model in EngineState ( #4277 )
...
This follows the "action-first" approach to use the apiserver model
for `FileWatch` and dispatch simple create/update/delete actions.
2021-03-09 13:05:32 -05:00
Iggy Jackson
62b5f78fd9
Add .kate-swp files to ignore pattern ( #3380 )
...
KDE's text editor, kate, uses a file similar to Vim's .swp files. Ignore
these files so we don't rebuild on every keypress.
Fixes #3378
2020-05-27 07:36:06 -07:00
Nick Santos
3f526c5c7b
change org name from windmilleng to tilt-dev ( #3346 )
2020-05-15 10:34:39 -04:00
Matt Landis
12916b75a2
tilt: ignore a few more vim swap files ( #2190 )
2019-09-12 11:57:39 -04:00
Maia McCormick
e3948f6bae
ignore: auto-ignore jetbrains .idea file ( #2065 )
2019-08-15 14:38:44 -04:00
Dan Miller
91a2bdd6de
model: move to pkg ( #2024 )
2019-08-09 12:52:31 -04:00
Nick Santos
ce61e7bf18
ignore: improve the ephemeral temp file patterns [ch2663] ( #1925 )
2019-07-29 11:18:22 -04:00
Nicolas De Loof
e831ea826b
add support for `restart` for `depends_on`
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-18 12:55:29 +01:00
Milas Bowman
762cf9d998
Merge pull request #10252 from glours/dry-run-exec-support
...
support dry-run for exec command
2023-02-17 10:05:31 -05: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
Nicolas De Loof
313b82e94c
ignore services without a build section
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-14 15:18:44 +01:00
Nicolas De Loof
9ac0392baf
introduce --timeout on `up`
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-14 12:16:41 +01:00
Nicolas De Loof
92e0cd4047
also restart dependent services after a service has been restarted
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-14 11:30:15 +01:00
Nicolas De Loof
256ec49974
exclude unstable labels from config hash
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-13 17:02:28 +01:00
Nicolas De Loof
9765f171cd
store exec details to offer better dry-run status on ExecStart
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-13 11:59:01 +01:00
Nicolas De Loof
b19df5c96c
add support for `excludes` and `rebuild`
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-10 17:24:48 +01:00
Nicolas De Loof
7a42ba7eec
use CGO to enable fsevent on OSX
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-10 17:24:48 +01:00
Guillaume Lours
eb1c798912
support dry-run for rm command
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-02-09 17:34:10 +01:00
Guillaume Lours
78b9404767
support dry-run for stop command
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-02-09 17:34:10 +01:00
Guillaume Lours
25be264ed8
support dry-run for exec command
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-02-08 11:21:47 +01:00
Guillaume Lours
70ab9f8f33
bump docker engine and cli version to 23.0.0 with buildkit(v0.11.2) and buildx (v0.10.2)
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-02-08 10:11:50 +01:00
Nicolas De Loof
93bffd9a7f
prevent assignment to entry in nil map
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-07 20:50:15 +01:00
Nicolas De Loof
52478f0c6e
wait on service containers as dependencies to be deterministic
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-07 16:36:45 +01:00
Nicolas De Loof
b5f0a4eefa
use containers we expect to start for wait condition
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-07 16:36:45 +01:00
Nicolas De Loof
0f5b5ccbd0
detect replacement container is created and inform printer so it attach and don't stop
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-06 11:23:13 +01:00
Guillaume Lours
fdc1738143
add log when copying files/directories between host and containers (both way)
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-02-03 22:44:26 +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
Milas Bowman
bf0ed9a4d4
Merge pull request #10226 from benmoss/add-remote-builder
...
Add remote buildx driver
2023-02-03 15:03:49 -05:00
Nicolas De Loof
1640f155e9
initial support for `sync`
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-02 14:59:30 +01:00
Nicolas De Loof
e63cbfba0e
use tilt watcher to track filesystem changes
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-02 14:59:30 +01:00
Nicolas De Loof
25576289c8
adjust code and dependencies
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-02 14:59:30 +01:00
Nick Santos
7d6ee74e62
cleanup deprecated ioutil functions ( #5919 )
...
Signed-off-by: Nick Santos <nick.santos@docker.com>
Signed-off-by: Nick Santos <nick.santos@docker.com>
2023-02-02 14:59:30 +01:00
Nick Santos
c08e07714a
watch: optimization to help avoid inotify nodes for large file trees ( #5769 )
...
fixes https://github.com/tilt-dev/tilt/issues/5764
2023-02-02 14:59:30 +01:00
Matt Landis
cf31462398
tests: make test fixtures responsible for tearing themselves down ( #5512 )
2023-02-02 14:59:30 +01:00
Ken Sipe
1b71e3efb3
lint: fix local-prefixes for goimports ( #5453 )
...
Fix local-prefixes on linters imports then resolved imports to be as expected
Signed-off-by: Ken Sipe <kensipe@gmail.com>
2023-02-02 14:59:30 +01:00
Milas Bowman
4d822676ce
ci: add exportloopref linter and upgrade to golangci-lint v1.43.0 ( #5281 )
...
`exportloopref` - detects captures of loop variable without
re-assignment
NOTE: There can be false negatives with this linter to avoid being
overly strict and annoying!
Also upgraded `golangci-lint` to latest (v1.43.0 published 2021-11-03).
2023-02-02 14:59:30 +01:00
Milas Bowman
6fc0b6ff27
build: ensure file handles properly closed ( #5298 )
...
I've been running the test suite (`./internal/engine` in particular)
with `-count X` a lot recently to catch timing-related test failures.
After running enough times, the tests start failing due to too many
open files, so I did an audit and found a few places where files or
readers weren't always being closed.
2023-02-02 14:59:30 +01:00
Nick Sieger
ab84b6ac5b
Fix local go_lintfix errors ( #5191 )
...
* lint: add make lintfix and run it
Fixes all errors like:
```
File is not `goimports`-ed with -local github.com/tilt-dev/tilt (goimports)
```
* git: change to use TrimSuffix
* build: remove unnecessary cast
2023-02-02 14:59:30 +01:00
Milas Bowman
7161778ccf
watch: use WalkDir to speed up file listing ( #4684 )
...
`WalkDir` is new in Go 1.16 and avoids calling `os.Lstat` on
every visited file and directory. In most cases, we don't need
that info, so this will help reduce I/O when listing files,
which can be helpful for particularly big monorepos.
2023-02-02 14:59:30 +01:00
Nick Santos
1f5bfe8882
test: clean up test loggers a bit ( #4580 )
2023-02-02 14:59:30 +01:00
Milas Bowman
f79c75ab10
test: fix lint errors on Darwin (macOS) ( #4247 )
...
Unused code linter isn't particularly smart about platform build
tags, so since this func is only used by the "naive" (non-macOS)
file watcher, it needs to live with that or it gets flagged as
dead code when linting on macOS.
2023-02-02 14:59:30 +01:00
Nick Santos
e62993a854
test: enable unused check, remove dead code ( #4208 )
2023-02-02 14:59:30 +01:00
Nick Santos
28251e8be5
watch: improve error messages when you run out of inotify instances ( #3960 )
2023-02-02 14:59:30 +01:00
Nick Santos
c7ba7d9de5
dockerignore: convert ignore patterns to absolute paths [ch9237] ( #3743 )
...
In most places in Tilt, we try to use absolute paths everywhere.
So this makes things more consistent with the rest of Tilt, and lets us be
a bit more flexible in how we handle subdirs and parent dirs in ignores.
Fixes https://github.com/tilt-dev/tilt/issues/3740
2023-02-02 14:59:30 +01:00
Nick Santos
8b39322365
watch: fix a dumb errcheck ( #3622 )
2023-02-02 14:59:30 +01:00
Nick Santos
b3615d64e2
watch: increase the windows watch i/o buffer ( #3620 )
...
fixes https://github.com/tilt-dev/tilt/issues/3556
2023-02-02 14:59:30 +01:00
Nick Santos
1a1d1707ed
change org name from windmilleng to tilt-dev ( #3346 )
2023-02-02 14:59:30 +01:00
Nick Santos
fd3e0bbe2b
watch: use the recursive watcher on windows ( #3306 )
2023-02-02 14:59:30 +01:00
Nick Santos
d2d4d05264
Revert "watch: fix inotify tests on windows" ( #3147 )
...
This reverts commit 74ac7997b1c8f497babbbd499ff1f047563d699a.
2023-02-02 14:59:30 +01:00
Nick Santos
dda0362b6e
watch: fix inotify tests on windows ( #3140 )
2023-02-02 14:59:30 +01:00
Nick Santos
ddc88ec41b
circleci: run make shorttest on windows. flag off a large swath of broken tests ( #3132 )
2023-02-02 14:59:30 +01:00
Matt Landis
92c6a65a03
tilt: enable errcheck on tests ( #2877 )
2023-02-02 14:59:30 +01:00
Dan Miller
00b3caecbb
ci: enable staticcheck, fix problems that were surfaced ( #2809 )
2023-02-02 14:59:30 +01:00
Dan Miller
17087447e9
logger: move to pkg ( #2031 )
2023-02-02 14:59:30 +01:00
Nick Santos
ec781687fd
watch: add retry counts to fsync ( #2023 )
2023-02-02 14:59:30 +01:00
Nick Santos
b22dde9f18
dockerignore: improve MatchesEntireDir ( #1865 )
2023-02-02 14:59:30 +01:00
Nick Santos
a31350ede1
watch: move more of the directory-skipping logic into the interface ( #1864 )
2023-02-02 14:59:30 +01:00
Nick Santos
d744c97f13
watch: add a simple check when there are no exclusions ( #1863 )
2023-02-02 14:59:30 +01:00
Nick Santos
37647bc600
watch: skip setup if nothing is being watched ( #1861 )
2023-02-02 14:59:30 +01:00
Nick Santos
21e5d564af
watch: FileEvents must always be absolute ( #1841 )
...
there were a lot of confused tests that were using relative paths, then trying to workaround this
2023-02-02 14:59:30 +01:00
Nick Santos
390d5cf165
watch: add tests for ignores and number of watches ( #1838 )
2023-02-02 14:59:30 +01:00
Nick Santos
7f6e189dbc
watch: change the watcher interface to better match how we actually use it ( #1835 )
2023-02-02 14:59:30 +01:00
Dan Miller
b5ccea7b0e
watch: record num watches in expvars ( #1795 )
2023-02-02 14:59:30 +01:00
Matt Landis
47551895f3
makefile: fix goimports -local ( #1763 )
2023-02-02 14:59:30 +01:00
Nick Santos
5e0f1eec16
watch: fix spurious errors while watching ( #1726 )
2023-02-02 14:59:30 +01:00
Dan Bentley
f82e2de57e
watch: don't watch each individual file ( #1613 )
2023-02-02 14:59:30 +01:00
Matt Landis
9c7f7bc0fa
live_update: error if syncing from outside of docker context ( #1396 )
2023-02-02 14:59:30 +01:00
Nick Santos
6defe7cac6
watch: tfw you have a test that asserts broken file-watch behavior 😢 ( #1354 )
2023-02-02 14:59:30 +01:00
Dan Miller
0482f9276a
watch: add watch function that traverses up directory structure recursively ( #1013 )
2023-02-02 14:59:30 +01:00
Nick Santos
e8a34c8d1e
watch: remove inotify-specific bits of watcher_linux ( #890 )
...
the tests on windows don't pass yet, but at least it compiles
2023-02-02 14:59:30 +01:00
Nick Santos
9e261c18b3
watch: fix a bug when a file and its ancestor both have direct watches ( #863 )
2023-02-02 14:59:30 +01:00
Nick Santos
1fd7ca5440
testing: update internal/watch to use the tempdir fixture ( #862 )
2023-02-02 14:59:30 +01:00
Maia McCormick
139edc403f
cleanup: wrap errors properly ( #772 )
...
* cleanup: wrap errors properly
* fix build error
* asdfg linux
* fix test
2023-02-02 14:59:30 +01:00
Dan Miller
38b3f3b678
watch: use `sinceWhen` and `HistoryDone` to avoid spurious events ( #557 )
...
Here's our new watch strategy on Darwin in a nutshell:
1. Create an fsevents stream for events "since" the last event ID that
we saw globally.
2. Add a path that we want to watch
3. Add that path to a map of paths that we're watching _directly_.
4. Restart the event stream to pick up the new path.
5. Ignore all events for all watches until we've seen a `HistoryDone`
event.
6. Ignore the first `ItemCreated` event for paths we're watching that
are also directories
7. Otherwise, forward along all events.
2023-02-02 14:59:30 +01:00
Nick Santos
c5bce8bd42
watch: fix a spurious error ( #344 )
2023-02-02 14:59:30 +01:00
Nick Santos
c8a358a455
watch: try a slightly different ignore strategy ( #174 )
2023-02-02 14:59:30 +01:00
Nick Santos
a6701652d2
watch: fix more data races on darwin ( #166 )
2023-02-02 14:59:30 +01:00
Nick Santos
4562b0bf95
watch: a new strategy for handling spurious events, hoping to fix race conditions ( #163 )
2023-02-02 14:59:30 +01:00
Nick Santos
4801d2b1a4
watch: fix a flaky test by ignoring spurious events correctly ( #162 )
2023-02-02 14:59:30 +01:00
Nick Santos
3850a34114
watch: fix a segfault on linux ( #148 )
2023-02-02 14:59:30 +01:00
Nick Santos
664e6f6f23
watch: stop skipping tests ( #145 )
2023-02-02 14:59:30 +01:00
Nick Santos
d4f074b32f
watch: simplify the fileEvent interface to only contain paths ( #144 )
2023-02-02 14:59:30 +01:00
Dan Miller
a3b012d89f
add errcheck ( #93 )
2023-02-02 14:59:30 +01:00
Matt Landis
a755c84ea0
tilt: copy watch code from tesseract
2023-02-02 14:59:30 +01:00
Ben Moss
ef34a38ac0
Add remote buildx driver
...
Signed-off-by: Ben Moss <ben@mossity.com>
2023-02-01 10:30:07 -05:00
Guillaume Lours
f24d3458c6
Merge pull request #10217 from glours/dry-run-pause-support
...
Dry run pause support
2023-01-31 14:56:27 +01:00
Nicolas De Loof
41e056341b
rename `convert` to `config` to align with compose v1 UX
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-30 22:23:53 +01:00
Guillaume Lours
6754c6b68a
add dry-run support of pause and unpause commands
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-30 10:36:36 +01:00
Guillaume Lours
982a8ccb88
support dry-run for kill command
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-30 09:27:17 +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
maxcleme
634a7d2a7b
Support for docker compose build --push when using multiple platforms
...
Signed-off-by: maxcleme <maxime.clement@docker.com>
2023-01-26 16:54:41 +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
Guillaume Lours
d5d9f67547
Merge pull request #10173 from glours/dry-run
...
Skeleton for dry-run under alpha command
2023-01-20 15:37:52 +01:00
Laura Brehm
220626ec5e
Only account running containers for logs
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-01-20 13:30:05 +01:00
Nicolas De Loof
c15bf1955a
debounce refresh requests with quietperiod
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-18 22:12:54 +01:00
Laura Brehm
0b1c86726e
Add tests for filtering containers not created by Compose
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-01-17 19:00:02 +01:00
Laura Brehm
82ef998511
Ignore containers created outside compose
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-01-17 19:00:02 +01:00
Guillaume Lours
fb36f7fffd
directly embed the orignal APIClient in the DryRunClient
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-16 11:11:35 +01:00
Guillaume Lours
3fac506a30
identify functions which need to be ovorridden for dry run feature
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-16 11:11:35 +01:00
Guillaume Lours
eb59b0e265
add alpha command to test dry-run
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-16 11:11:35 +01:00
Guillaume Lours
5081ab0507
create custom CLI when dry-run mode active
...
update documentation
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-16 11:11:35 +01:00
Guillaume Lours
13ef440d6a
add DryRun API Client with delagation pattern
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-16 11:11:35 +01:00
Guillaume Lours
fbf845c5f8
add dry-run flag
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-16 11:11:35 +01:00
Guillaume Lours
5a2b7b83cd
use compose service methods when exist instead of directly service.dockerCli
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-13 21:02:00 +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
2aa88b5c9e
Merge pull request #10149 from TColl/typo-fix
...
fix typo
2023-01-12 10:56:28 +01:00
Nicolas De Loof
bb9cf32245
introduce experimental watch command (skeletton)
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-12 10:52:58 +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
Tom Collingwood
f2088bb917
fix typo
...
Signed-off-by: Tom Collingwood <tomcollingwood@yahoo.co.uk>
2023-01-11 19:07:29 +00:00
Nicolas De Loof
3e12a7cb23
pass proxy config as build args - same as docker/buildx#959
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-10 12:15:13 +01:00
Edward Muller
73ebbffb08
Don't share the options map
...
Without this I get an exception when building multiple images in a
compose run.
```
fatal error: concurrent map writes
goroutine 16 [running]:
github.com/docker/compose/v2/pkg/compose.(*composeService).build.func1({0x2cba4e0, 0xc00019b2c0}, {0xc000233150?, 0xd?})
github.com/docker/compose/v2/pkg/compose/build.go:95 +0x652
github.com/docker/compose/v2/pkg/compose.(*graphTraversal).run.func1()
github.com/docker/compose/v2/pkg/compose/dependencies.go:127 +0x63
golang.org/x/sync/errgroup.(*Group).Go.func1()
golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
golang.org/x/sync@v0.1.0/errgroup/errgroup.go:72 +0xa5
...
```
I'm not sure why the map is currently shared, but with this patch
applied my docker-compose build run works.
Signed-off-by: Edward Muller <emuller@fastly.com>
2023-01-09 12:01:57 +01:00
Nicolas De Loof
b326a9da1d
don't filter by services if no filter was set
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-09 11:49:08 +01:00
Nicolas De Loof
f1313f3a09
use a simpler prompt implementation when we lack a terminal
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-09 10:28:16 +01:00
Nicolas De Loof
96bbda98f8
add support for uts namespace
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-06 08:15:52 +01:00
Guillaume Lours
f6f29a4438
Merge pull request #10133 from ndeloof/build_concurrency
...
limit build concurrency according to --parallel
2023-01-05 09:57:13 +01:00
Nicolas De Loof
d5e4f00644
introduce --no-attach to ignore some service output
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-03 18:43:40 +01:00
Nicolas De Loof
8b4ac37f9c
introduce `--ignore-buildable` to ignore buildable images on pull
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-03 18:43:23 +01:00
Nicolas De Loof
b96e27e0e7
limit build concurrency according to --parallel
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-03 12:01:30 +01:00
Guillaume Tardif
37d15d7e6b
Ignore not only auto-removed containers but also "removal in progress" for orphan containers
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2023-01-03 11:09:41 +01:00