Only persist to published_realms after the realm has been successfully created, started, and indexed#3988
Conversation
…y created, started, and indexed
There was a problem hiding this comment.
Pull request overview
This PR changes the publish flow so the published_realms table is only updated/created after the published realm has been successfully created, started, and fully indexed—avoiding DB records that claim a realm is published before publish-time work finishes.
Changes:
- Refactors publish logic to track
publishedRealmIdseparately and avoid persistingpublished_realmsdata until afterrealm.start()andrealm.fullIndex(). - Updates the JSON:API response to use the computed
publishedRealmIdand request URLs rather than values read back frompublished_realms.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31aca0d996
ℹ️ 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".
…updated-to-show-a-realm
This avoids updating the
published_realmsrecord before the needed operations for publishing are done.