Skip to content

Add verbosity levels to release command #367

@josecelano

Description

@josecelano

Overview

Add graduated verbosity levels (-v, -vv, -vvv) to the release command to give users control over the amount of user-facing progress detail displayed. This applies the same verbosity pattern established in the provision and configure commands (tasks 8.1 and 8.2) to the release command.

Parent Epic: #362 - Add levels of verbosity (Roadmap Section 8)

Goals

  • Reuse CommandProgressListener infrastructure from provision/configure commands
  • Apply same four verbosity levels to release command
  • Show service-specific release steps, template rendering, file deployments at different detail levels
  • Maintain backward compatibility (default = Normal level)
  • Keep user output completely separate from tracing logs
  • Update user documentation with verbosity examples

Verbosity Levels

Level Flag Shows
Normal (default) Essential progress and results (2 main phases)
Verbose -v + 7 service-specific release steps (tracker, prometheus, etc.)
VeryVerbose -vv + Template rendering, file paths, deployment results
Debug -vvv + Ansible commands, working directories, full output

Service Release Steps

The release command executes 7 service-specific operations:

  1. Tracker - storage creation, database init, config rendering/deployment
  2. Prometheus - config rendering/deployment
  3. Grafana - dashboard provisioning, config deployment
  4. MySQL - database setup (if enabled)
  5. Backup - backup container config (if enabled)
  6. Caddy - reverse proxy config (if HTTPS enabled)
  7. Docker Compose - compose file rendering and deployment

Implementation Plan

Phase 1: Handler-Level Verbosity (3-4 hours)

  • Update ReleaseCommandHandler::execute() to accept optional CommandProgressListener
  • Add progress reporting for the 7 service release steps
  • Pass listener from controller to handler
  • Test Normal and Verbose levels

Phase 2: Step-Level Verbosity (5-7 hours)

  • Update all 7 service release functions to accept listener
  • Add on_detail() calls for template rendering, file deployments, storage operations
  • Add on_debug() calls for Ansible commands, working directories, paths
  • Test VeryVerbose and Debug levels

Phase 3: Documentation (2-3 hours)

  • Add "Verbosity Levels" section to docs/user-guide/commands/release.md
  • Include examples for all 4 verbosity levels
  • Document use cases and combined flag usage

Total Estimated Time: 10-14 hours

Architecture

  • Pattern: Same as provision/configure commands - reuse CommandProgressListener trait
  • DDD Layer: Application (src/application/command_handlers/release/)
  • Files: handler.rs, workflow.rs, steps/* (7 service modules), controller

Reference Implementations

Acceptance Criteria

Quality:

  • Pre-commit checks pass
  • No unused dependencies
  • All tests pass
  • No clippy warnings

Functionality:

  • Release command accepts -v, -vv, -vvv flags
  • Default behavior unchanged
  • Verbose shows 7 service steps
  • VeryVerbose shows template rendering and file deployments
  • Debug shows Ansible commands and full paths
  • User output separate from tracing logs
  • Pattern matches provision/configure implementations

Documentation:

  • User guide updated with verbosity section
  • Examples for all 4 levels
  • Symbol legend explained
  • Use cases documented

Related

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions