Am I the only one having a hard time editing my wo...
# ask-community
c
Am I the only one having a hard time editing my work-pools? They seem to only crash with I load the edit workflow page on the browser. I'm using Safari and Brave and I'm getting the problem on both. When I use safari it just loads slowly and doesn't let me complete the edited page and on Brave it just crash.
I put this in the wrong channel. It should be in prefect-ui
@Marvin What could seem to be the problem my partner had the same issue on his computer
m
thought for 151.2 seconds
I’m missing key details to diagnose this. Can you share a bit more? - What exactly were you trying to do when it failed (command/code)? - The full error message or traceback - Your environment: OS, Python version, how you installed Prefect (pip/conda/uv), and Prefect version - Are you using Prefect Cloud or a local server? Since your partner sees the same issue, it might be project/config related rather than machine-specific. To quickly narrow it down, could you run and paste the output of:
Copy code
prefect version
python -V
prefect config view --show-sources
prefect profile inspect
Also, if this is about CLI commands, note that in Prefect 3.x some commands differ from older guides. For example: - Use
prefect deploy
(not
prefect deployment build
) - Use
flow.from_source(...).deploy(...)
in code (not
Deployment.build_from_flow()
) CLI reference if helpful: Prefect CLI Reference Once I have the error text and context, I can suggest a precise fix.
c
@Marvin prefect version Version: 3.4.1 API version: 0.8.4 Python version: 3.11.6 Git commit: b47ad8e1 Built: Thu, May 08, 2025 08:42 PM OS/Arch: darwin/arm64 Profile: ephemeral Server type: cloud Pydantic version: 2.11.4 Integrations: prefect-sqlalchemy: 0.5.2 prefect-dask: 0.3.5 prefect-docker: 0.6.6 prefect-aws: 0.5.10 prefect-gcp: 0.6.7 prefect-ray: 0.4.4 python -V Python 3.11.6 - What exactly were you trying to do when it failed (command/code)? I'm trying to edit in the UI for the workpool. - The full error message or traceback I get a Error code: 5 - Your environment: OS, Python version, how you installed Prefect (pip/conda/uv), and Prefect version I'm using the UI - Are you using Prefect Cloud or a local server? Prefect Cloud
m
thought for 283.4 seconds
Thanks for the details — that helps. In Prefect Cloud, “Error code: 5” when saving edits in the Work Pool UI usually points to one of these: - The pool can’t be found in your current workspace (workspace mismatch or stale link) - You don’t have permission to edit pools (RBAC) - The update contains something invalid/immutable (e.g., wrong/invalid base job template or trying to change the pool type) Let’s quickly narrow it down: 1) Confirm workspace and that the pool exists - In the UI, check the workspace picker (top-left) — make sure you’re in the workspace where the pool lives. - From your terminal, verify your current Cloud workspace and list pools:
Copy code
prefect cloud workspace ls
  prefect cloud workspace set   # if needed
  prefect work-pool ls
  prefect work-pool inspect "<your-pool-name>"
If the pool doesn’t show up here, it’s likely a workspace mismatch or the pool was deleted; that would cause a NotFound-style error (often reported as code 5). 2) Try the same edit via CLI - If the pool exists, try updating via CLI to see if the API accepts your change: - Update description:
Copy code
prefect work-pool update "<your-pool-name>" --description "New description"
- Set concurrency limit:
Copy code
prefect work-pool set-concurrency-limit "<your-pool-name>" 5
- If you’re editing the base job template, pull the default for your pool type first and modify carefully:
Copy code
prefect work-pool get-default-base-job-template --type <pool-type> --file default.json
    # edit default.json, then
    prefect work-pool update "<your-pool-name>" --base-job-template default.json
If CLI updates work but the UI still errors, it’s likely a UI bug — we can escalate with details. 3) Check permissions - Ensure your role in the workspace is Admin or Owner; Members may not be able to modify work pools. If you don’t have the right role, ask an Admin/Owner to grant it. - Roles/permissions guide: Cloud roles and permissions 4) Immutable fields or invalid template - Pool type is immutable — if you need a different type (e.g., docker → kubernetes), create a new pool:
Copy code
prefect work-pool create "<new-pool>" --type <pool-type>
- If you’re editing the base job template, ensure valid JSON and that fields match the pool type’s schema. Using the default template as a starting point (step 2) helps. - Work pools guide: Managing work pools - CLI reference: Prefect CLI Reference If it still fails: - Please share the pool name and type, exactly what field you’re changing, and whether the CLI update succeeds. - In the browser, open DevTools → Network, find the request to edit the work pool, and copy the response body/error text — that usually includes the precise API error behind “code: 5”. We’ll get you unblocked quickly once we see whether it’s workspace/permissions vs. a specific validation issue.
c
@Marvin How do I edit a workpool by the name of my-ecs-pool. I want to change the cluster aws name. I want to update it with a new name. How do I do that from the command cli
m
thought for 181.3 seconds
Got it — you can change the ECS cluster for your work pool by updating its base job template via the CLI. Here’s a safe, step-by-step way: 1) Confirm the pool exists in your current workspace
Copy code
prefect cloud workspace ls
prefect work-pool ls
prefect work-pool inspect "my-ecs-pool"
2) Export a template to edit - If you don’t already have your pool’s current template saved, start from the ECS default:
Copy code
prefect work-pool get-default-base-job-template --type ecs --file ecs-template.json
Tip: If your pool already has customizations, copy its existing template (from the UI or
inspect
output) into a file and edit that instead of starting from the default. 3) Edit ecs-template.json You can set the cluster in either place below (both are commonly present in the ECS template): - job_configuration.cluster - job_configuration.task_run_request.cluster Set them to your new cluster name (or full ARN), for example:
Copy code
{
  "job_configuration": {
    ...
    "cluster": "my-new-ecs-cluster",
    "task_run_request": {
      ...
      "cluster": "my-new-ecs-cluster",
      ...
    },
    ...
  },
  "variables": {
    ...
    "properties": {
      "cluster": {
        ...
        "default": "my-new-ecs-cluster"
      }
    }
  }
}
Notes: - Keeping the variables.properties.cluster.default in sync makes the pool default consistent. - If any deployments override the cluster via job variables, update those too (they take precedence over the pool default). 4) Apply the update
Copy code
prefect work-pool update "my-ecs-pool" --base-job-template ecs-template.json
5) Verify
Copy code
prefect work-pool inspect "my-ecs-pool"
Ensure the cluster shows your new value, then run a test deployment to confirm tasks launch on the new cluster. Helpful references: - Managing work pools: Managing work pools - ECS guide (what each field means): ECS integration guide - CLI reference: Prefect CLI Reference If you hit an error applying the update, paste the CLI output and (if possible) the relevant part of your JSON and I’ll help spot the schema issue.
c
'cluster': { 'anyOf': *[{'type': 'string'}*, *{'type': 'null'}]*, 'title': 'Cluster', 'default': 'spicy-dog-3c4n6k74', 'description': 'The ECS cluster to run the task in. An ARN or name may be provided. If not provided, the default cluster will be used.' } @Marvin I want to change the name of the default string. How do I do that? keep it short and concise
m
thought for 18.7 seconds
- Export/edit the template file, change the default, then update the pool:
Copy code
prefect work-pool get-default-base-job-template --type ecs --file ecs.json
Edit ecs.json:
Copy code
{
  "variables": {
    "properties": {
      "cluster": {
        "default": "my-new-ecs-cluster"
      }
    }
  }
}
Apply it:
Copy code
prefect work-pool update "my-ecs-pool" --base-job-template ecs.json
c
So I used the Prefect CLI to fix this. Somewhere there was a issue. Now I'm able to edit it in the UI again