Skip to content

Add Dry-Run Support to kairos-init #3599

@ci-robbot

Description

@ci-robbot

https://spectrocloud.slack.com/archives/C056VJ4V1HP/p1755285335046689

We propose adding a dry-run command to kairos-init to display the stages and steps that would execute without making any changes to the system. This would help users debug configurations, verify workflows, or understand the initialization process before applying it.

Problem
Currently, kairos-init executes stages immediately without an option to preview the actions. This limits transparency and makes it harder to validate configurations.

Proposed Solution
Add a --dry-run flag to kairos-init that:

  1. Parses the configuration and identifies all stages to be executed.
  2. Outputs a detailed list of steps (e.g., package installations, file modifications, service configurations) without applying them.
  3. Includes stage dependencies and order of execution.

Acceptance Criteria

  • Implement --dry-run flag in kairos-init to show execution steps.
  • Document the flag in the CLI help and README.
  • Provide examples in the documentation (e.g., kairos-init --dry-run config.yaml).
  • Ensure the output is machine-readable (e.g., JSON format) for automation.
  • Validate that no system changes occur during a dry run.

Use Cases

  • Debugging initialization failures.
  • Validating custom bundle configurations.
  • Educating users about the initialization process.

Additional Notes
This feature aligns with Kairos' focus on transparency and reproducibility. It would complement existing tools like kairos-bundle and kairos-image by providing a safety check before deployment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions