New test stories added in ci/journey.sh#48
Conversation
📝 WalkthroughWalkthroughChangesArchiver and partitioner behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Up to standards ✅🟢 Issues
|
| // cleanupAlreadyArchived is the idempotent cleanup branch: the partition was | ||
| // archived in a prior cycle (watermark already past its upper bound), so there | ||
| // is no race — just detach + drop the stale PG partition. | ||
| // is no race — just drop the stale PG partition. DROP TABLE IF EXISTS detaches |
There was a problem hiding this comment.
@imtiazqa Wait, how did this sneak into this PR? This is a regression, it's absolutely wrong to ACCESS EXCLUSIVE lock the entire partitioned table. The whole partMgr.Detach CONCURRENTLY mechanism was built specifically for this.
…, hot table rename, cold-tier E2E, retention update, disable/enable, and unregister
…040 INSERT timestamp and restore assertion
… mesh mode The previous main.go change removed DETACH CONCURRENTLY from cleanupAlreadyArchived and replaced it with a direct DROP TABLE to work around TC-024 failing in mesh mode. The failure was in partMgr.Detach which fans out to Spock peers by connecting to each peer DSN from spock.node_interface — those hostnames are not resolvable from the archiver host in the CI mesh environment. That introduced a locking regression: DROP TABLE on an attached partition takes ACCESS EXCLUSIVE on the entire parent table, blocking all reads and writes across all partitions. The DETACH CONCURRENTLY mechanism was specifically built to avoid this. The correct fix is scoped to the test: story_partitioner_fk_drop already skips in mesh mode for the exact same reason. TC-024 follows the same pattern.
a900708 to
19885ac
Compare
There was a problem hiding this comment.
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 2062-2081: Update the TC-119 round-trip flow after the ARCHIVER
export so the import consumes the exported artifact’s cli_events configuration
rather than the hand-written /tmp/journey-roundtrip.yaml entry. Extract the
complete cli_events entry, preserving serialized fields such as
partition_period, hot_period, and enablement, then use that derived artifact for
import while retaining the export validation.
- Around line 2545-2563: The TC-053 archiver invocations must be validated
independently instead of masking failures or reusing prior output. Update both
commands around the disabled and re-enabled checks to write to separate fresh
log files, fail immediately when the archiver exits non-zero, and grep only the
corresponding invocation’s log for the [events] assertion; retain the existing
enable command behavior and messages.
🪄 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 Plus
Run ID: c713f966-d15f-4a62-88be-86c11dbfa244
📒 Files selected for processing (1)
ci/journey.sh
TC-022 — Verifies that a wrong S3 endpoint causes the archiver to fail at Phase 2 with a clear connection error naming the bad host
TC-024 — Verifies that an empty (0-row) partition completes all six archiver phases cleanly and is dropped from PostgreSQL
TC-040 — Verifies that renaming the hot table triggers the DDL hook to update the registry and rebuild the view, and DML via the view continues to route correctly
TC-052 — Verifies that partitioner set --retention updates partition_config in the database without touching the YAML file
TC-053 — Verifies that a disabled table is silently excluded from archiver runs and re-enabling it restores normal processing
TC-054 — Verifies that partitioner remove deletes the partition_config row while leaving the physical table intact
TC-071 — Verifies that a composite PARTITION BY RANGE (col1, col2) key is rejected by the archiver before any Iceberg or S3 work
TC-118 — Verifies that an archiver.tables block in the YAML config is ignored at runtime; the archiver always drives off partition_config
TC-119 — Verifies that export → delete row → import restores a partition_config entry (backup/restore cycle works correctly)
TC-120 — Verifies that archiver set writes only to partition_config; the YAML config file on disk is not modified