-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix error when using prefect work-queue ls without enabling work pools
#8427
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
Conversation
✅ Deploy Preview for prefect-orion ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
desertaxle
left a comment
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.
LGTM!
I don't think the double default will be a large issue since users won't have the ability to create another work pool unless they choose to toggle on the experimental flag.
src/prefect/cli/work_queue.py
Outdated
| View all work queues. | ||
| """ | ||
| if not pool: | ||
| if not pool and PREFECT_EXPERIMENTAL_ENABLE_WORK_POOLS.value() is False: |
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.
You should use the experiment_enabled helper.
| table = Table( | ||
| title="Work Queues", | ||
| caption="(**) denotes a paused queue", | ||
| caption_style="red", | ||
| ) | ||
| table.add_column("Name", style="green", no_wrap=True) |
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.
Is all that follows here just a replication of some old code that was deleted before it should have been ?
* 'main' of https://github.com/prefecthq/prefect: (26 commits) Update Infrastructure to include extra-pip-package in example and updated deployment.yaml (PrefectHQ#8465) Fix `prefect dev start` (PrefectHQ#8176) Bump @prefecthq/orion-design from 1.2.21 to 1.2.22 in /orion-ui (PrefectHQ#8456) Update flowRunFilter on WorkPool page (PrefectHQ#8453) Restore Prefect wrapper that shows details on HTTP errors (PrefectHQ#8391) Use the len of the JSON representation when determining log size (PrefectHQ#8449) Dezombify concurrency limits (PrefectHQ#8408) Bump @prefecthq/orion-design from 1.2.19 to 1.2.21 in /orion-ui (PrefectHQ#8452) Removes experimental guards around work pools (PrefectHQ#8362) Update return type for get_run_logger (PrefectHQ#8422) Add utilities for deprecation (PrefectHQ#8402) Add ability to create a new flow run from the UI with custom default parameter values taken from a previous run (PrefectHQ#8405) Enhancement: Increase polling interval on flow runs to match logs (PrefectHQ#8441) During blocks registration, hide link to blocks catalog if PREFECT_UI_URL is None (PrefectHQ#8438) Add Orion info route (PrefectHQ#8400) Bump @prefecthq/orion-design from 1.2.18 to 1.2.19 in /orion-ui (PrefectHQ#8436) Add generic webhook block (PrefectHQ#8401) Update Queue name to Work Queue (PrefectHQ#8424) Fix error when using `prefect work-queue ls` without enabling work pools (PrefectHQ#8427) Add release notes for 2.7.12 (PrefectHQ#8429) ...
Closes #8426
The
prefect work-queue lscommand was using a route to lookup work pools associated with with each of the work queues. This doesn't work without enabling a flag. This wasn't caught by my tests because I was using a fixture that auto-enabled the flag. This is no longer the case.Updated video of the changes:
https://www.loom.com/share/c697692aa93e4c2f90c185f23e160fed
Note, it shows two default queues because I have a default-agent-pool and a separate pool with a default queue. I could see this potentially causing confusion.
Example
Checklist
<link to issue>"fix,feature,enhancement