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

Consistently handle resources that require a workspace ID #283

Open
mitchnielsen opened this issue Oct 16, 2024 · 0 comments
Open

Consistently handle resources that require a workspace ID #283

mitchnielsen opened this issue Oct 16, 2024 · 0 comments

Comments

@mitchnielsen
Copy link
Contributor

Summary

In #281, creating a work pool would cause a fairly unhelpful 404 error. After some digging, turns out that API requires the workspace ID to be configured. It's marked as optional for compatibility with OSS, but is actually required for Prefect Cloud.

There are already some accomodations for this in clients like the one for blocks, that checks if the workspace ID is null and returns an error if so.

We can do a couple things to make this a better experience:

  1. Comb through and make sure all resources that require workspace ID settings include a check for the workspace_id to be configured. You can check by looking at Path parameters in the API docs for each resource.
  2. Put that calculation and error message linked above into a helper and use that helper consistently.
  3. Make a note somewhere, maybe in CONTRIBUTING.md, to keep this in mind when adding support for new resources.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants