Add Migration‑Exit Retry to Affine to Prevent Startup Timeouts
I introduced a retry mechanism in the Affine service so that a failed 0.27.0 startup does not cause the pod to time out, keeping the migration process alive until it can recover.
Add Retry Script and Deployments
I added a migration-exit.cjs file that watches process.exitCode and, when it equals 1, starts a timer to keep the init container alive. The file is included in the affine ConfigMap and mounted as a read‑only volume in the Affine Deployment, so the init container can retry without hitting a hard timeout. This change implements the fix for the 0.27.0 startup retry issue.
CI Test for Retry Behavior
I created scripts/ci/affine-migration-exit-test.py which runs the Affine init‑only preload with the retry script, sets SERVER_FLAVOR=script, and checks that the process exits with code 1 while the container remains active, then verifies a subsequent timeout command succeeds. The test passes, confirming that the retry logic behaves as expected.
Documentation Clarification and Platform Transfer
I updated openwiki/architecture/storage-and-state.md to state that the Affine preload must run upstream before the server starts and that a terminal failure in the migration CLI propagates via the Node preload, allowing the init container to retry. This pattern of embedding a retry script and a dedicated test can be reused by other services in the GitOps workflow, giving teams a reliable way to keep migrations alive during startup.