Skip to content

Update default Rollback directory#538

Open
rohIta-k wants to merge 4 commits into
krkn-chaos:mainfrom
rohIta-k:docs/rollback-docs-cleanup
Open

Update default Rollback directory#538
rohIta-k wants to merge 4 commits into
krkn-chaos:mainfrom
rohIta-k:docs/rollback-docs-cleanup

Conversation

@rohIta-k

@rohIta-k rohIta-k commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Changes

This PR updates rollback documentation to align with the current implementation in Krkn.

Updated rollback directory references

The documented default rollback directory has been updated from:

/tmp/kraken-rollback

to:

~/.krkn/rollback

This matches the current behavior implemented in Krkn and reflected in runtime logs and tests.

Removed incorrect KubeVirt rollback references

The documentation previously implied that KubeVirt VM outage scenarios participate in the rollback framework.

After reviewing the implementation, KubeVirt VM outage scenarios do not register rollback callables and therefore are not managed through the rollback framework.

Sources

The documentation changes were verified against:

Krkn logs

Using secure default rollback directory: /Users/<user>/.krkn/rollback

run_kraken.py

rollback_versions_dir = os.path.join(
    os.path.expanduser("~"),
    ".krkn",
    "rollback"
)

tests/test_rollback.py

assert rollback_versions_dir != "/tmp/kraken-rollback"
assert "/.krkn/rollback" in normalized

KubeVirt VM Outage Scenario Implementation

The scenario does not:

  • register rollback callables using self.rollback_handler.set_rollback_callable(...)
  • participate in the rollback version-file framework

Documentation Pages Updated

  • content/en/docs/rollback-scenarios/index.md
  • content/en/docs/scenarios/kubevirt-vm-outage-scenario/index.md
  • static/search-index.json

@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for krkn-chaos ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c8a01b6
🔍 Latest deploy log https://app.netlify.com/projects/krkn-chaos/deploys/6a559eb3cbc37600086f5b0a
😎 Deploy Preview https://deploy-preview-538--krkn-chaos.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Align rollback docs with ~/.krkn/rollback default and remove KubeVirt rollback claim
📝 Documentation 🕐 10-20 Minutes

Grey Divider

Description

• Update rollback docs to reflect the secure default rollback directory (~/.krkn/rollback).
• Remove KubeVirt VM outage rollback support references that don’t match current implementation.
• Refresh examples/log snippets and config defaults to use the new rollback path.
Diagram

graph TD
R[["Rollback docs"]] --> D1["Default dir: ~/.krkn/rollback"] --> F["Krkn rollback code"]
R --> S1["Supported scenarios list"] --> A[["Application outage doc"]]
S1 --> K[["KubeVirt outage doc"]] --> N1["Rollback section removed"]
K -. "No rollback callables" .-> F
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep a short “Rollback: Not supported” note in KubeVirt docs
  • ➕ Avoids ambiguity for readers looking specifically for rollback behavior
  • ➕ Preserves discoverability without implying support
  • ➖ Adds a small amount of repeated info across scenario pages
2. Add a central “Rollback support matrix” page and link scenarios to it
  • ➕ Single source of truth for which scenarios register rollback callables
  • ➕ Reduces risk of per-scenario docs drifting over time
  • ➖ More upfront doc work and requires ongoing maintenance as scenarios evolve

Recommendation: Current approach (removing the incorrect claim) is correct. Consider adding a brief “Rollback: not supported” callout (or linking to a centralized support matrix) to prevent readers from assuming rollback applies to all scenarios listed under chaos scenarios.

Files changed (2) +7 / -13

Documentation (2) +7 / -13
_index.mdUpdate default rollback directory and supported-scenario list +7/-8

Update default rollback directory and supported-scenario list

• Replaces /tmp/kraken-rollback references with ~/.krkn/rollback across examples, log snippets, and config defaults. Removes the KubeVirt VM Outage entry from the list of rollback-supported scenarios.

content/en/docs/rollback-scenarios/_index.md

_index.mdRemove rollback-support section from KubeVirt VM outage docs +0/-5

Remove rollback-support section from KubeVirt VM outage docs

• Deletes the “Rollback Scenario Support” section and its TOC entry to stop implying this scenario participates in the rollback framework.

content/en/docs/scenarios/kubevirt-vm-outage-scenario/_index.md

@qodo-code-review

qodo-code-review Bot commented Jun 24, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 24 rules

Grey Divider


Remediation recommended

1. Search index still outdated ✓ Resolved 🐞 Bug ☼ Reliability
Description
static/search-index.json still contains the old rollback content (including /tmp/kraken-rollback
and KubeVirt rollback support), so local/offline search can surface incorrect results relative to
the updated markdown.
Code

content/en/docs/rollback-scenarios/_index.md[74]

+~/.krkn/rollback
Relevance

⭐⭐⭐ High

Team invested in keeping prebuilt search index fresh (PRs #145/#150); likely update
static/search-index.json.

PR-#145
PR-#150
PR-#422

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The pre-built search index still includes /tmp/kraken-rollback and the removed “KubeVirt VM
Outage” rollback mention; the repo also contains a script that writes the index to
static/search-index.json during builds.

static/search-index.json[829-833]
scripts/build-search-index.js[156-175]
package.json[16-19]
CLAUDE.md[64-70]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The committed build artifact `static/search-index.json` is out of sync with the updated markdown, so search results may point users to removed/changed documentation content.

## Issue Context
This repo builds a Lunr offline search index into `static/search-index.json`.

## Fix Focus Areas
- static/search-index.json[829-833]
- scripts/build-search-index.js[156-175]
- package.json[16-19]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Rollback dir docs contradict ✓ Resolved 🐞 Bug ≡ Correctness
Description
content/en/docs/rollback-scenarios/_index.md now documents the default rollback directory as
~/.krkn/rollback but still claims execute-rollback defaults to /tmp/kraken-rollback/, creating
contradictory instructions on the same page.
Code

content/en/docs/rollback-scenarios/_index.md[130]

+    rollback_versions_directory: ~/.krkn/rollback      # Directory to store rollback version files.
Relevance

⭐⭐ Medium

Doc consistency fixes are mixed; several “contradictory docs” suggestions were rejected in reviews
(e.g., PRs #305/#293).

PR-#305
PR-#293

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The page shows ~/.krkn/rollback in the example output and config snippet, but still states
execute-rollback defaults to /tmp/kraken-rollback/.

content/en/docs/rollback-scenarios/_index.md[72-88]
content/en/docs/rollback-scenarios/_index.md[127-131]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The rollback docs page was updated to show `~/.krkn/rollback` as the default rollback directory, but one remaining sentence still references `/tmp/kraken-rollback/`, making the page self-contradictory.

## Issue Context
Readers following `execute-rollback` guidance will be misled about where version files are executed from.

## Fix Focus Areas
- content/en/docs/rollback-scenarios/_index.md[82-86]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@rohIta-k

Copy link
Copy Markdown
Contributor Author

I've updated static/search-index.json file so that the search index stays in sync with the documentation changes introduced in this PR.

@paigerube14

Copy link
Copy Markdown
Contributor

@rohIta-k can you separate out the rollback directory changes from the kubevirt rollback removal changes. Want to have 1 change per PR, tia

@rohIta-k rohIta-k changed the title Update default Rollback directory and Kubevirt references Update default Rollback directory Jul 14, 2026
rohIta-k added 3 commits July 14, 2026 07:51
Signed-off-by: Rohita <rohitak.srimayee@gmail.com>
Signed-off-by: Rohita <rohitak.srimayee@gmail.com>
Signed-off-by: Rohita <rohitak.srimayee@gmail.com>
@rohIta-k rohIta-k force-pushed the docs/rollback-docs-cleanup branch from 4b7f852 to b2453b9 Compare July 14, 2026 02:26
Signed-off-by: Rohita <rohitak.srimayee@gmail.com>
@rohIta-k

Copy link
Copy Markdown
Contributor Author

@paigerube14 i've only included rollback directory changes here, will create an other PR for kubevirt rollback removal changes

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.

2 participants