Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/prefect/cli/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This shows which services are configured to be enabled via environment variables.
This shows which services are configured to be enabled via the current settings.

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)
Copy link
Member

Choose a reason for hiding this comment

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

I prefer Enabled? over Configured?. I think that the message below clearly communicates the information that's being displayed and Enabled? makes more sense.

Suggested change
table.add_column("Configured?", no_wrap=True)
table.add_column("Enabled?", no_wrap=True)

table.add_column("Description", style="cyan", no_wrap=False)

for svc in Service.all_services():
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"\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]"
"\n[dim]Note: This shows services enabled via the current settings, not running status."
"Services will not run if the server\n"
" was started with --no-services or --workers > 1.[/dim]"

)


@services_app.command(aliases=["start"])
Expand Down