Skip to content

Conversation

@peytonrunyan
Copy link
Contributor

@peytonrunyan peytonrunyan commented Feb 6, 2023

Closes #8426

The prefect work-queue ls command 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

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • This pull request includes tests or only affects documentation.
  • This pull request includes a label categorizing the change e.g. fix, feature, enhancement

@netlify
Copy link

netlify bot commented Feb 6, 2023

Deploy Preview for prefect-orion ready!

Name Link
🔨 Latest commit d450b64
🔍 Latest deploy log https://app.netlify.com/sites/prefect-orion/deploys/63e17ace74611f000811449a
😎 Deploy Preview https://deploy-preview-8427--prefect-orion.netlify.app/api-ref/prefect/cli/work_queue
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@peytonrunyan peytonrunyan added the fix A fix for a bug in an existing feature label Feb 6, 2023
@peytonrunyan peytonrunyan marked this pull request as ready for review February 6, 2023 20:51
@peytonrunyan peytonrunyan requested a review from a team as a code owner February 6, 2023 20:51
Copy link
Member

@desertaxle desertaxle left a 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.

View all work queues.
"""
if not pool:
if not pool and PREFECT_EXPERIMENTAL_ENABLE_WORK_POOLS.value() is False:
Copy link
Contributor

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.

Comment on lines +370 to +375
table = Table(
title="Work Queues",
caption="(**) denotes a paused queue",
caption_style="red",
)
table.add_column("Name", style="green", no_wrap=True)
Copy link
Contributor

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 ?

@zanieb zanieb merged commit 524c25c into main Feb 6, 2023
@zanieb zanieb deleted the fix-ls branch February 6, 2023 22:31
ddelange added a commit to ddelange/prefect that referenced this pull request Feb 9, 2023
* '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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A fix for a bug in an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client Error 418 when running prefect work-queue ls

4 participants