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

Adds support for picking a non-prd Prefect Cloud environment #15

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

chrisguidry
Copy link
Contributor

No description provided.

)

app.console.print(
f"Run it with: \n $ prefect deployment run {function}/{deployment_name}",
style="blue",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These blue styles are pretty dark on Ubuntu's default theme. Dialing them back for now

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boooo

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I joke

# TODO: Get this configuration from the user's environment if possible
CLOUD_UI_URL = "https://app.prefect.cloud"
CLOUD_API_URL = "https://api.prefect.cloud/api"
if os.environ.get("CLOUD_ENV") in ("prd", "prod", None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There a pydantic settings file we could use for this instead of getting it directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question, I've felt a little off-kilter with where the settings should be with this one, since we're kinda piggybacking on ~/.prefect/profiles.toml. I figured this was only for us devs, so we didn't want to expose this as a user-facing option (like as a --cloud-env switch or something, which is how I started)

@chrisguidry chrisguidry merged commit 917cb69 into autocomplete-deployments Feb 7, 2025
2 checks passed
chrisguidry added a commit that referenced this pull request Feb 7, 2025
* Autocompletes deployments on `run`, `schedule`, and friends

There's still more of a delay here than I'd like, even with the caching.
I think we are starting to get some import time creep that I'll dig into
more over time.

* Fixing up auth tests

* Adds support for picking a non-prd Prefect Cloud environment (#15)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants