Skip to content

server: Add resilience to realm reference migration script#4084

Open
backspace wants to merge 1 commit intomainfrom
server/migration-script-spaces-resilience
Open

server: Add resilience to realm reference migration script#4084
backspace wants to merge 1 commit intomainfrom
server/migration-script-spaces-resilience

Conversation

@backspace
Copy link
Contributor

When I ran the script in production it choked and aborted on a file in a realm with a space in the name. This adds more thorough handling for special characters in paths and also notes errors for listing at the end instead of aborting.

@github-actions
Copy link

Host Test Results

    1 files  ±0      1 suites  ±0   1h 55m 20s ⏱️ + 2m 56s
1 915 tests ±0  1 900 ✅ +1  15 💤 ±0  0 ❌ ±0 
1 930 runs  ±0  1 915 ✅ +2  15 💤 ±0  0 ❌  - 1 

Results for commit 0804102. ± Comparison against base commit 079e239.

@backspace backspace marked this pull request as ready for review February 27, 2026 20:56
@backspace backspace requested a review from a team February 27, 2026 20:56
@backspace backspace changed the title server: Add resilience to realm migration script server: Add resilience to realm reference migration script Feb 27, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0804102de0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# patch -R -p0 < <name>.patch

set -euo pipefail
set -uo pipefail

Choose a reason for hiding this comment

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

P2 Badge Restore fail-fast for unhandled command failures

Dropping -e from the shell options means failures outside the two explicit sed/mv checks are now silently ignored, so the script can keep mutating realm files even when prerequisite steps fail. A concrete case is inability to create or append the rollback patch file (e.g., unwritable CWD): > "$PATCH_FILE"/>> "$PATCH_FILE" can fail, but the run still reports updates and proceeds without a valid rollback artifact, which is a data-safety regression compared with the previous fail-fast behavior.

Useful? React with 👍 / 👎.

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