-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Adds migration logic for work pools #8214
Conversation
✅ Deploy Preview for prefect-orion ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
1b5fb57
to
2d220ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial pass - I think the DB logic would benefit from a review by @zangell44 if feasible
Can be run at any time to facilitate user-initiated migrations without | ||
waiting for an agent to poll. | ||
""" | ||
for work_queue in await models.work_queues.read_work_queues(session=session): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth adding some batching here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI looks good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work!!! lots of ground to cover in this PR
…erm-testing * 'main' of https://github.com/prefecthq/prefect: (77 commits) Update roles and permissions in documentation (PrefectHQ#8263) Add Prefect Cloud Quickstart tutorial (PrefectHQ#8227) Remove needless log Update comment for consistency Reorder migrations for clarity Refactor cancellation cleanup service Uses canonical `CANCELLING` states for run cancellations (PrefectHQ#8245) Add cancellation cleanup service (PrefectHQ#8128) Improve engine shutdown handling of SIGTERM (PrefectHQ#8127) Create a `CANCELLING` state type (PrefectHQ#7794) Update KubernetesJob options (PrefectHQ#8261) Small work pools UI updates (PrefectHQ#8257) Removes migration logic (PrefectHQ#8255) Consolidate multi-arch docker builds (PrefectHQ#7902) Include nested `pydantic.BaseModel` secret fields in blocks' schema (PrefectHQ#8246) Improve contributing documentation with venv instructions (PrefectHQ#8247) Update Python tests to use a single test matrix for both databases (PrefectHQ#8171) Adds migration logic for work pools (PrefectHQ#8214) Add `project_urls` to `setup.py` (PrefectHQ#8224) Add `is_schedule_active` to client `Deployment` class (PrefectHQ#7430) ...
Adds functionality to duplicate existing work queues to corresponding work pool queues. All migration logic is hidden behind the
PREFECT_EXPERIMENTAL_ENABLE_WORK_POOL
setting (which is added in this PR). The first time that the Orion server is started after enabling the work pool feature a a default agent work pool nameddefault-agent-pool
will be created and all existing work queues will be duplicated to work pool queues in that pool. The migration will not run on subsequent server start ups.Any changes made to work queues after the initial migration will be reflected in their corresponding work pool queue.
The following actions will produce corresponding changes in a work pool queue:
As part of this PR
work_pool_queue_name
is removed from the deployments API and the existingwork_queue_name
will be used instead.Additionally, any work queue that is created without a work pool will trigger the creation of the default agent work pool if it does not already exist.
Example
Checklist
<link to issue>
"fix
,feature
,enhancement