Skip to content

Add interactive rollback command#1766

Open
SebastianSzturo wants to merge 1 commit intobasecamp:mainfrom
SebastianSzturo:SebastianSzturo/rollback-command
Open

Add interactive rollback command#1766
SebastianSzturo wants to merge 1 commit intobasecamp:mainfrom
SebastianSzturo:SebastianSzturo/rollback-command

Conversation

@SebastianSzturo
Copy link

Based on @dhh’s suggestion (#621 (comment)), this PR improves the kamal rollback UX, specially for the “oh no, roll back now” moments.

What changed

When running kamal rollback without a version argument, Kamal now shows an interactive picker of recent deployments with relative timestamps:

  Rollback to deployment from:

    1) 15 minutes ago (8b71ff79378b)
    2) 28 minutes ago (2b97f624d657)
    3) about an hour ago (faed64ff269f)

  Pick: [1]
  • Defaults to the most recent deployment ([1]) for a fast, safe “just do it” rollback.
  • Non-interactive rollback remains unchanged: passing a version argument or using --version continues to work exactly as before.

Why

This reduces the cognitive load (and likelihood of mistakes) when rolling back under pressure by making the “recent known-good” options easy to identify and select.

When running 'kamal rollback' without a version argument, present an
interactive menu showing recent deployments with relative timestamps:

  Rollback to deployment from:

    1) 15 minutes ago (8b71ff79378b)
    2) 28 minutes ago (2b97f624d657)
    3) about an hour ago (faed64ff269f)

  Pick: [1]

Defaults to the most recent version. Direct rollback via argument or
--version flag continues to work as before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant