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

[23.1] Reload toolbox after forking when using --preload #16620

Merged
merged 2 commits into from Aug 30, 2023

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Aug 30, 2023

When adding gunicorn workers or restarting workers the new workers need
to load up the current toolbox, as it may have changed from when the
master process became ready.

To test this, start gunicorn with --preload and --max-requests 50.
After the instance has booted change the tool version in a single tool.
The tool watcher will pick this up and you get the new tool version.

Now trigger the worker replacement by making 50 requests. Without
this PR you would get the old version.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

When adding gunicorn workers or restarting workers the new workers need
to load up the current toolbox, as it may have changed from when the
master process became ready.

To test this, start gunicorn with `--preload` and `--max-requests 50`.
After the instance has booted change the tool version in a single tool.
The tool watcher will pick this up and you get the new tool version.

Now trigger the worker replacement by making 50 requests. Without
this commit you would get the old version.
We only load the hashes in the config watcher thread, so the initial
hashes are not available. I assume there's no sudden modtime changes on
production instances that would make this invalid.
@github-actions github-actions bot added this to the 23.2 milestone Aug 30, 2023
@mvdbeek mvdbeek changed the title [231] Reload toolbox after forking if instance runs with --preload [231] Reload toolbox after forking when using --preload Aug 30, 2023
@mvdbeek mvdbeek requested a review from a team August 30, 2023 11:24
@mvdbeek mvdbeek changed the title [231] Reload toolbox after forking when using --preload [23.1] Reload toolbox after forking when using --preload Aug 30, 2023
@jmchilton jmchilton merged commit 49e6f75 into galaxyproject:release_23.1 Aug 30, 2023
40 checks passed
@jmchilton
Copy link
Member

Your patience for these deployment things is impressive - I appreciate you!

@dannon dannon modified the milestones: 23.2, 23.1 Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants