Skip to content

Enforce rollback safety PR checks - #5731

Open
bfops wants to merge 91 commits into
masterfrom
bfops/rollback-safety
Open

Enforce rollback safety PR checks#5731
bfops wants to merge 91 commits into
masterfrom
bfops/rollback-safety

Conversation

@bfops

@bfops bfops commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Description of Changes

Updates the PR template with a new section for noting PRs that must be released before the current PR can merge. We also add a CI check that this field has been updated, and to enforce that those PRs have actually been released.

A lot of the logic is added in a separate library so that it could hypothetically be used either from release flows or CI flows, without introducing a direct dependency between the two of them (it's not obvious to me that CI "should" depend on release, or vice-versa).

API and ABI breaking changes

None

Expected complexity level and risk

2

Rollback safety impact

n/a

Testing

  • Added unit tests for the functionality to parse a PR description
  • The new check..
    • re-runs on PR description changes (CI job)
    • fails on this PR with a missing release deps section (CI job)
    • fails on this PR with a default release deps section (CI job)
    • fails on this PR if I mention an open PR (CI job)
    • fails on this PR if I mention a merged, unreleased PR (CI job)
    • if I mention multiple unreleased PRs, it shows all failures (CI job)
    • succeeds if I mention only a released PR (CI job)
    • fails if I remove the default text and leave the section blank (CI job)
    • succeeds if I change the section to say n/a (CI job)
    • fails if I mention a PR from another repository (CI job)

clockwork-labs-bot and others added 30 commits August 7, 2026 12:01
…rgo-ci-merge-5687

# Conflicts:
#	tools/ci/README.md
#	tools/ci/src/main.rs
Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
@bfops
bfops requested a review from gefjon August 13, 2026 20:02
Comment thread .github/pull_request_template.md Outdated

# Must be released

<!-- List PRs that must be included in a release before this PR can merge. Supported forms include #123, SpacetimeDB#123, clockworklabs/SpacetimeDB#123, and GitHub PR URLs. Leave this section empty if there are none. -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rather than "Leave this section empty if there are none," I would rather have, "include 'n/a', in this section if this PR is safe to roll back after deployment and has no impact on the rollback-safety of any prior PRs," and recognize the case where that string (case-insensitive, preferably) appears in this section outside of a comment. I want to reject any PR where the author doesn't demonstrate that they've thought about this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd also like this description to be more clear that the burden is not just that the linked PR must be released before this can merge, but also that this PR cannot be deployed until the linked PRs:

  1. Are deployed.
  2. Have been sufficiently observed and/or tested in the live deployment that we are confident they will never roll back.

It would be nice to have verbiage about the types of changes that may impact rollback safety, namely:

  1. If this PR newly writes to a ControlDB table or reducer, system table, or on-disk data format that was previously introduced but unused.
  2. If this PR clears, deletes, incompatibly changes, or renders unsupported a ControlDB table or reducer, system table, or on-disk data format that was previously present or available.

(The ControlDB stuff is only relevant for PRs to the private repo, but I think it's fine to list here and it'll make things easier if we use the same template in both places.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That sounds great. What do you think of this version?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Comment thread .github/pull_request_template.md Outdated
Comment thread .github/workflows/ci.yml Outdated
Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Comment thread tools/ci/commands/check-release-deps/src/main.rs Outdated
Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Comment thread tools/rollback-coordination/src/gh.rs Outdated
@bfops
bfops force-pushed the bfops/rollback-safety branch from 283bfd0 to c982950 Compare August 19, 2026 21:00
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.

4 participants