-
Notifications
You must be signed in to change notification settings - Fork 2k
clarify that prefect server services ls shows configuration, not runtime state
#19160
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -719,12 +719,17 @@ def run_manager_process(): | |||||||||||||
| # public, user-facing `prefect server services` commands | ||||||||||||||
| @services_app.command(aliases=["ls"]) | ||||||||||||||
| def list_services(): | ||||||||||||||
| """List all available services and their status.""" | ||||||||||||||
| """ | ||||||||||||||
| List all available services and their configuration status. | ||||||||||||||
|
|
||||||||||||||
| This shows which services are configured to be enabled via environment variables. | ||||||||||||||
| Services will not run if the server was started with --no-services or --workers > 1. | ||||||||||||||
| """ | ||||||||||||||
| from prefect.server.services.base import Service | ||||||||||||||
|
|
||||||||||||||
| table = Table(title="Available Services", expand=True) | ||||||||||||||
| table.add_column("Name", no_wrap=True) | ||||||||||||||
| table.add_column("Enabled?", no_wrap=True) | ||||||||||||||
| table.add_column("Configured?", no_wrap=True) | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer
Suggested change
|
||||||||||||||
| table.add_column("Description", style="cyan", no_wrap=False) | ||||||||||||||
|
|
||||||||||||||
| for svc in Service.all_services(): | ||||||||||||||
|
|
@@ -740,6 +745,11 @@ def list_services(): | |||||||||||||
| table.add_row(name, setting_text, description) | ||||||||||||||
|
|
||||||||||||||
| app.console.print(table) | ||||||||||||||
| app.console.print( | ||||||||||||||
| "\n[dim]Note: This shows configuration via environment variables. " | ||||||||||||||
| "Services will not run if the server\n" | ||||||||||||||
| " was started with --no-services or --workers > 1.[/dim]" | ||||||||||||||
|
Comment on lines
+749
to
+751
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| @services_app.command(aliases=["start"]) | ||||||||||||||
|
|
||||||||||||||
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.