Conversation
172fb05 to
4fe16b7
Compare
Test Results - Alternative Providers770 tests 362 ✅ 20m 40s ⏱️ Results for commit 67778c7. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 2h 39m 56s ⏱️ For more details on these failures, see this check. Results for commit afdec93. ♻️ This comment has been updated with latest results. |
4d75d90 to
af7f473
Compare
af7f473 to
cd97a14
Compare
alexrashed
left a comment
There was a problem hiding this comment.
Nice! Really cool feature for the dev script!
The general upgrade of the lock file contains a lot of different stuff. With pip-tools it's a bit tedious right now to only add a single dependency, but it would be possible to do so with
pip-compile --strip-extras --upgrade-package "<package>==<version>" --extra <extra> -o requirements-<extra>.txt pyproject.toml
|
|
||
| rule = Rule(f"Interactive session with {container_id[:12]} 💻") | ||
| console.print(rule) | ||
| live_reload_event = None |
There was a problem hiding this comment.
nit: Maybe rename this event to indicate that it is used to stop the watch thread? I was a bit confused by the handling in finally initially before reading the watcher.py...
thrau
left a comment
There was a problem hiding this comment.
great stuff! love the watcher implementation using watchdog and the fairly simple reload mechanism.
maybe the only thing to mention somewhere explicitly (even if obvious to us) is that state is lost on every reload. i guess persistence could be a way around this :-)
…on source changes Watches host-side mounted source directories for .py file changes and sends SIGUSR1 to PID 1 inside the container, triggering the supervisor to restart the runtime without requiring a full container restart.
cd97a14 to
7c5a36b
Compare
|
The failing test is unrelated |
# Motivation In #13718 we added live reload support to the `localstack.dev.run` script, however the additional dependency added (`watchdog`) was added to the `dev` extras section. This section is not installed with our Pro setup make targets, or at least not everyone installs _this_ repo with the `dev` target, meaning that people who were using `localstack.dev.run` got an import error. # Changes Defer import of the module that itself imports `watchdog` so it is only required for people who actually want to use the `--live-reload` flag. This at least means a fewer number of people will be directly affected, and it is clearer what the issue is in this case. In addition, a PR to the Pro repo will correct the packaging process so `localstack[dev]` is installed with our `test` dependencies, which is a very common install target for developers.
Motivation
While using the
localstack.dev.runcommand, it is quite frustrating to have to restart LocalStack on code changes. Even by sending an external signal to the container is slow. A lot of projects include a live reload mode, where filesystem changes trigger a restart of the application server. What if LocalStack had this feature?!Changes
--live-reloadflagwatchdogpackage (cross platform for file system change events) that monitors files to dev dependencies (not shipped in the container)*.pyfiles, restart the PID1 inside the localstack container which re-reads file contents from the file systemNotes
Unfortunately I was not able to simply run
make upgrade-pinned-dependenciessince I got the error:There seems to be a mismatch with pip versions (26 is not yet supported by pip-compile it seems, see #13674) however this PR only pins
pipto!=26but26.0.1has been released.Also the version of
ruffgets updated after runningmake upgrade-pinned-dependencies. This change does not belong in this PR so I have reverted the version of ruff in the requirements files back to its current value (0.14.14)