Commit Graph

4031 Commits

Author SHA1 Message Date
Nick Santos e62993a854 test: enable unused check, remove dead code () 2023-02-02 14:59:30 +01:00
Nick Santos 28251e8be5 watch: improve error messages when you run out of inotify instances () 2023-02-02 14:59:30 +01:00
Nick Santos c7ba7d9de5 dockerignore: convert ignore patterns to absolute paths [ch9237] ()
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 () 2023-02-02 14:59:30 +01:00
Nick Santos b3615d64e2 watch: increase the windows watch i/o buffer ()
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 () 2023-02-02 14:59:30 +01:00
Nick Santos fd3e0bbe2b watch: use the recursive watcher on windows () 2023-02-02 14:59:30 +01:00
Nick Santos d2d4d05264 Revert "watch: fix inotify tests on windows" ()
This reverts commit 74ac7997b1c8f497babbbd499ff1f047563d699a.
2023-02-02 14:59:30 +01:00
Nick Santos dda0362b6e watch: fix inotify tests on windows () 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 () 2023-02-02 14:59:30 +01:00
Matt Landis 92c6a65a03 tilt: enable errcheck on tests () 2023-02-02 14:59:30 +01:00
Dan Miller 00b3caecbb ci: enable staticcheck, fix problems that were surfaced () 2023-02-02 14:59:30 +01:00
Dan Miller 17087447e9 logger: move to pkg () 2023-02-02 14:59:30 +01:00
Nick Santos ec781687fd watch: add retry counts to fsync () 2023-02-02 14:59:30 +01:00
Nick Santos b22dde9f18 dockerignore: improve MatchesEntireDir () 2023-02-02 14:59:30 +01:00
Nick Santos a31350ede1 watch: move more of the directory-skipping logic into the interface () 2023-02-02 14:59:30 +01:00
Nick Santos d744c97f13 watch: add a simple check when there are no exclusions () 2023-02-02 14:59:30 +01:00
Nick Santos 37647bc600 watch: skip setup if nothing is being watched () 2023-02-02 14:59:30 +01:00
Nick Santos 21e5d564af watch: FileEvents must always be absolute ()
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 () 2023-02-02 14:59:30 +01:00
Nick Santos 7f6e189dbc watch: change the watcher interface to better match how we actually use it () 2023-02-02 14:59:30 +01:00
Dan Miller b5ccea7b0e watch: record num watches in expvars () 2023-02-02 14:59:30 +01:00
Matt Landis 47551895f3 makefile: fix goimports -local () 2023-02-02 14:59:30 +01:00
Nick Santos 5e0f1eec16 watch: fix spurious errors while watching () 2023-02-02 14:59:30 +01:00
Dan Bentley f82e2de57e watch: don't watch each individual file () 2023-02-02 14:59:30 +01:00
Matt Landis 9c7f7bc0fa live_update: error if syncing from outside of docker context () 2023-02-02 14:59:30 +01:00
Nick Santos 6defe7cac6 watch: tfw you have a test that asserts broken file-watch behavior 😢 () 2023-02-02 14:59:30 +01:00
Dan Miller 0482f9276a watch: add watch function that traverses up directory structure recursively () 2023-02-02 14:59:30 +01:00
Nick Santos e8a34c8d1e watch: remove inotify-specific bits of watcher_linux ()
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 () 2023-02-02 14:59:30 +01:00
Nick Santos 1fd7ca5440 testing: update internal/watch to use the tempdir fixture () 2023-02-02 14:59:30 +01:00
Maia McCormick 139edc403f cleanup: wrap errors properly ()
* 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 ()
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 () 2023-02-02 14:59:30 +01:00
Nick Santos c8a358a455 watch: try a slightly different ignore strategy () 2023-02-02 14:59:30 +01:00
Nick Santos a6701652d2 watch: fix more data races on darwin () 2023-02-02 14:59:30 +01:00
Nick Santos 4562b0bf95 watch: a new strategy for handling spurious events, hoping to fix race conditions () 2023-02-02 14:59:30 +01:00
Nick Santos 4801d2b1a4 watch: fix a flaky test by ignoring spurious events correctly () 2023-02-02 14:59:30 +01:00
Nick Santos 3850a34114 watch: fix a segfault on linux () 2023-02-02 14:59:30 +01:00
Nick Santos 664e6f6f23 watch: stop skipping tests () 2023-02-02 14:59:30 +01:00
Nick Santos d4f074b32f watch: simplify the fileEvent interface to only contain paths () 2023-02-02 14:59:30 +01:00
Dan Miller a3b012d89f add errcheck () 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 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 a54d488303
Merge pull request from docker/dependabot/go_modules/go.opentelemetry.io/otel-1.12.0
build(deps): bump go.opentelemetry.io/otel from 1.11.2 to 1.12.0
2023-01-30 16:03:43 +01:00
dependabot[bot] c0b4dd8606 build(deps): bump go.opentelemetry.io/otel from 1.11.2 to 1.12.0
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.11.2 to 1.12.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.11.2...v1.12.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-30 15:52:18 +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 a93f09efac
Merge pull request from glours/dry-run-kill-support
Dry run kill support
2023-01-30 10:35:33 +01:00