Skip to content

chore: sync prod into staging to unblock release PR #1346#1347

Merged
suisuss merged 8 commits into
stagingfrom
chore/sync-prod-into-staging-1346
May 22, 2026
Merged

chore: sync prod into staging to unblock release PR #1346#1347
suisuss merged 8 commits into
stagingfrom
chore/sync-prod-into-staging-1346

Conversation

@suisuss

@suisuss suisuss commented May 22, 2026

Copy link
Copy Markdown

Problem

Release PR #1346 (staging -> prod) is DIRTY / CONFLICTING. Single conflict:

  • drizzle/meta/_journal.json

Root cause

PR #1340 (release: To Prod) was squash-merged instead of merged as a merge commit. Every previous staging -> prod release was a merge commit (2 parents); #1340 has 1 parent.

sha       parents  subject
28f8c91a  2        Merge pull request #1337 from KeeperHub/staging
3a56c5ce  2        Merge pull request #1333 from KeeperHub/staging
0f218a77  2        Merge pull request #1329 from KeeperHub/staging
14a61bcc  2        Merge pull request #1314 from KeeperHub/staging
aebbed7d  2        Merge pull request #1311 from KeeperHub/staging
10ed1850  2        Merge pull request #1304 from KeeperHub/staging
adaabe1f  1        release: To Prod (drop DB integration block migration) (#1340)   <- squash

A merge commit preserves shared ancestry. A squash takes staging's tree and creates a brand-new commit on prod with no parent link back. So after #1340:

  • staging history: hotfix as commit 75eb2849 (from squash-merging hotfix(security): drop global Database Query plugin block #1339 into staging)
  • prod history: hotfix as commit adaabe1f (squash of staging into prod)
  • the two commits contain byte-identical migration content but are unrelated objects
  • merge-base of prod and staging stays at 90f2d7ae -- from before either side had the hotfix

When this PR's parent #1346 opens, git does a 3-way merge from that pre-hotfix base. Both sides modified the tail of _journal.json. Git can't tell the edits are logically the same; it just sees overlapping changes and conflicts.

No one pushed directly to prod. No force push, no branch protection bypass. The wrong option was selected in the GitHub merge dropdown on #1340.

Three-way state on the conflicting file:

Ref Last journal entry EOF newline
merge-base 90f2d7ae idx 82 (block_executions_for_deactivated_users) no
origin/prod (after #1340) idx 83 (drop_db_integration_block) no
origin/staging idx 84 (employee_only_signup_block) yes

Resolution

This PR merges origin/prod into staging and keeps staging's version of _journal.json (strict superset: 82 + 83 + 84). The merge restores shared ancestry so PR #1346 becomes a clean merge.

  • No migration file content changed.
  • git diff origin/staging HEAD is empty for non-merge content.
  • git merge-base --is-ancestor origin/prod HEAD is true after this merge.

Once this lands, PR #1346 should auto-flip to MERGEABLE.

Prevention (not in this PR -- needs follow-up)

The repo currently allows all three merge methods on every base branch:

allow_merge_commit:  true
allow_squash_merge:  true   <- caused this
allow_rebase_merge:  true

Options to stop a recurrence:

  1. Disable allow_squash_merge repo-wide. Forces merge commits everywhere; feature PRs lose the squash option.
  2. CI guard on prod: fail if the new merge commit has fewer than 2 parents. Cheap, targeted, doesn't break feature PR ergonomics. Recommended.
  3. Process only -- code-review the merge action. Cheapest, but the same misclick will happen again.

Out of scope

build-images / build on #1346 failed with No space left on device on a self-hosted runner. Infra issue, unrelated to this conflict. Re-run after this PR lands and the runner host is cleaned up.

joelorzet and others added 8 commits May 19, 2026 21:17
Conflict in drizzle/meta/_journal.json: both prod (PR #1340) and
staging added the byte-identical idx 83 entry independently, plus
staging added idx 84 (employee_only_signup_block) and a trailing
newline. Resolved by keeping staging's superset (82, 83, 84).

No migration content changed - this only reconciles the journal.
@suisuss suisuss merged commit 3af04cd into staging May 22, 2026
32 checks passed
@suisuss suisuss deleted the chore/sync-prod-into-staging-1346 branch May 22, 2026 02:34
@github-actions

Copy link
Copy Markdown

🧹 PR Environment Cleaned Up

The PR environment has been successfully deleted.

Deleted Resources:

  • Namespace: pr-1347
  • All Helm releases (Keeperhub, Scheduler, Event services)
  • PostgreSQL Database (including data)
  • LocalStack, Redis
  • All associated secrets and configs

All resources have been cleaned up and will no longer incur costs.

@github-actions

Copy link
Copy Markdown

ℹ️ No PR Environment to Clean Up

No PR environment was found for this PR. This is expected if:

  • The PR never had the deploy-pr-environment label
  • The environment was already cleaned up
  • The deployment never completed successfully

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