Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Prevent hot-reload of workflow definitions from disk #607

Open
dandavison opened this issue Aug 14, 2024 · 0 comments
Open

[Bug] Prevent hot-reload of workflow definitions from disk #607

dandavison opened this issue Aug 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dandavison
Copy link
Contributor

A Python worker reloads the workflow definition from disk every time a new workflow run is started, i.e. without requiring the worker process to be shutdown and restarted. So for example, a long-running workflow that CANs will "hot reload" like this on every CAN, and a non-sticky worker will hot-reload on every WFT.

This is a side-effect of implementation (worker sandboxing involves disabling import cache which results in re-reading from disk) rather than being desired behavior, and isn't appropriate in production worker deployments since users are likely to expect that during deployments they can overwrite files without any modifications to running processes until process restart.

So, let's find a good way to prevent the behavior. For example, one possibility might involve permitting the re-read-from-disk to continue, but having the worker copy the relevant files somewhere private, and importing workflows from there.

@dandavison dandavison added the bug Something isn't working label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant