Skip to content

test: add archiver crash rollback and partitioner FK drop rollback journey stories#45

Merged
vyruss merged 3 commits into
mainfrom
test/rollback-automation
Jul 14, 2026
Merged

test: add archiver crash rollback and partitioner FK drop rollback journey stories#45
vyruss merged 3 commits into
mainfrom
test/rollback-automation

Conversation

@imtiazqa

@imtiazqa imtiazqa commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Adds two journey stories covering rollback behavior:

Archiver crash rollback — kills the archiver mid Phase 2, asserts data stays in PG, verifies Phase 0 self-heals on re-run
Partitioner FK drop rollback — inbound FK blocks expired partition drop, asserts fail-fast with SQLSTATE 23503 (no retry loop), self-heals after FK reference removed. Skipped in mesh mode with a NOTE.

@imtiazqa
imtiazqa requested a review from vyruss as a code owner July 8, 2026 16:20
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@vyruss, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 92af31f4-d870-4294-a7f1-fad9209f7bb6

📥 Commits

Reviewing files that changed from the base of the PR and between f8780b3 and 5c600b2.

📒 Files selected for processing (1)
  • ci/journey.sh
📝 Walkthrough

Walkthrough

This PR adds two tiered E2E stories to ci/journey.sh: one validates archiver crash recovery and self-healing, while the other validates partitioner behavior for FK-referenced expired partitions. Both run before story_register_cli.

Changes

Journey script E2E stories

Layer / File(s) Summary
Archiver crash and self-heal story
ci/journey.sh
story_archiver_rollback kills the archiver during delayed export, verifies row retention, then confirms watermark creation and unified-view visibility after re-running.
Partitioner FK-drop guard story and wiring
ci/journey.sh
story_partitioner_fk_drop checks SQLSTATE 23503 failure with the expired partition attached, then confirms partition removal after deleting the FK row; both stories are added before story_register_cli.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: vyruss

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the two journey stories added for archiver rollback and partitioner FK-drop rollback.
Description check ✅ Passed The description directly matches the added rollback journey stories and their key behaviors.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/rollback-automation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@vyruss vyruss left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 1st story can pass without testing what it claims. The fixed sleep 10 before the kill doesn't know if the archiver has reached the post-Phase-2 hold. On slow runners we can kill it before any cold rows are in Iceberg and all the assertions will pass anyway (crash-row only leaves PG at cutover, which never runs; the re-run is then just a clean first archive). So the Phase 0 self-heal path the story exists to test never actually runs.

Making the kill depend on the debug-export-delay log marker like story_concurrency already does. This also makes the kill happen after the export commits, so we don't need a special case for mesh mode.

The 2nd story is fine.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci/journey.sh`:
- Around line 1763-1767: Update the rollback test loop around the
debug-export-delay timeout so that a timeout or early archiver exit performs the
same cleanup of temporary partition_config and rb_events state as the normal
path before returning. Reuse the existing teardown logic rather than exiting
directly, while preserving the current success behavior when the marker is
found.
- Around line 1768-1773: Ensure the archiver crash-test function always cleans
up its created rb_events, partition_config, and table state when the hold-marker
is not reached. Add a function-scope RETURN trap or invoke the existing cleanup
before the early return in the reached check, then remove the redundant manual
cleanup block at the function end while preserving normal success behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a6d8a4b4-b922-4677-a625-8f2cd3e545cb

📥 Commits

Reviewing files that changed from the base of the PR and between 4507e07 and f8780b3.

📒 Files selected for processing (1)
  • ci/journey.sh

Comment thread ci/journey.sh
Comment thread ci/journey.sh
@vyruss
vyruss force-pushed the test/rollback-automation branch from f8780b3 to 5c600b2 Compare July 14, 2026 14:00
@vyruss
vyruss merged commit c838280 into main Jul 14, 2026
6 checks passed
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