Skip to content

Enforce rollback safety PR checks - #5731

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

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

Conversation

@bfops

@bfops bfops commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Description of Changes

This is the first PR in what will be a small series of PRs geared at enforcing our strategy for rollback-safe deploys.

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.

Also adds a separate utility for finding what release included a particular PR. This is based on commit subject lines, so it can technically be spoofed.

API and ABI breaking changes

None

Expected complexity level and risk

2

Rollback safety impact

n/a

Testing

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 changed the title Enforce rollback safety Enforce rollback safety PR checks Aug 12, 2026
echo "This PR is not based on master. Please wait until the base PR merges."
exit 1

release_dependencies:

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.

this is an odd place to add this job, but this is kind of where we have put job(s) that depend on PR metadata rather than just commit contents. Thoughts? ci.yml doesn't run on PR edit events, but this workflow does

Comment thread .github/workflows/check-pr-base.yml Outdated
Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
on:
pull_request:
types: [opened, edited]
types: [opened, reopened, edited]

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.

unrelated fix: run properly on reopened PRs


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.inputs.pr_number || format('sha-{0}', github.sha) }}
cancel-in-progress: true

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.

unrelated fix: have later jobs cancel previous ones, e.g. if you edit the PR description several times quickly

@bfops
bfops marked this pull request as ready for review August 13, 2026 18:28
@bfops
bfops changed the base branch from bot/split-public-cargo-ci to master August 13, 2026 19:59
@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
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