-
Notifications
You must be signed in to change notification settings - Fork 952
Description
Problem Description
Since upgrading to Coder v2.23.X, the provisioner list (both in CLI and UI) shows a continuously growing list of outdated/offline provisioners.
These provisioners (often or typically) correspond to Kubernetes pods that have been replaced during deployments but remain in the list for up to 7 days before automatic cleanup.
Current behavior:
- Offline provisioners from previous deployments clutter the list
- No way to filter active vs. inactive provisioners
- UI shows confusing "outdated" status without version information
- CLI limited to 50, and cannot sort leaving the end-user possibly missing some in Active state
- Upgrade suggestions appear for permanently offline provisioners with 'may' is reasonable, but the suggestion to upgrade doesn't fully embrace 'to current or matching version'
Proposed Solution
1. Default Filtering
- CLI: Add
--show-offline
flag to display offline provisioners (make them hidden by default) - UI: Filter to show only active provisioners by default, with toggle for "Show all provisioners"
2. Enhanced Status Display
- UI: Display actual provisioner versions instead of "outdated" status
- Status clarity: Distinguish between "temporarily offline" vs "permanently replaced" (can relate to k8s resource being present or not)
3. User Experience Improvements
- Documentation: Add clear messaging about automatic cleanup policy (X days/7 days)
- Alerts: Modify upgrade suggestions to only target active provisioners
- Sorting: Allow sorting by status, version, and last seen timestamp
- CLU: Make Active by default show up at the top/beginning of the list (less important if we have --show-offline). Use the 'Created At' time rather than sorting by name (current method).
4. CLI Enhancements
# Default: show only active provisioners
coder provisioner list
# Show all provisioners (current behavior)
coder provisioner list --show-offline
# Filter by status
coder provisioner list --status=idle,running,offline
# Show provisioners from last X days (similar to since, which would be '--last-seen')
coder provisioner list --max-age=24h
5. UI Enhancements
- Filter controls similar to other Coder UI screens
- Version information displayed clearly
- Status indicators that differentiate between:
- Active (idle/running)
- Temporarily offline
- Permanently replaced/outdated
- Information banner: "Showing active provisioners. Inactive provisioners older than X days are automatically removed."
Benefits
Reduced confusion and consistency between CLI and UI.
Most benefits come immediately by considering:
- Default filtering to show only active provisioners
Since the CLI support -c and -l for number, many of these can be generated manually but should be similar to theUI:
- CLI filtering flags
Avoiding the 'upgrade pressure' and ensure the suggestion on Offline instances to be upgraded:
- Documentation improvements
Related Issues
This feature request addresses similar concerns raised in:
- Filtering and pagination needs for provisioner interfaces: Filtering and pagination on provisioner job list #17156
May relate to API work, since API output may benefit from a concerted set of queries as the UI provides.