Skip to content

ci: only open one sync_docs pr at a time - #487

Merged
zeroshade merged 3 commits into
columnar-tech:mainfrom
amoeba:fix/sync-docs-idempotent-branch
Sep 8, 2026
Merged

ci: only open one sync_docs pr at a time#487
zeroshade merged 3 commits into
columnar-tech:mainfrom
amoeba:fix/sync-docs-idempotent-branch

Conversation

@amoeba

@amoeba amoeba commented Sep 7, 2026

Copy link
Copy Markdown
Member

The Sync Docs job can open multiple PRs if existing ones aren't merged before it runs again. This PR makes it so there's only ever one sync PR open at a time by:

  1. Using a common branch name instead of one keyed to the calendar date
  2. When the CI runs, if there are no new changes since the last run, we finish. If there are changes, we commit and force push to the branch.

Previously the branch was named docs/sync-output-YYYY-MM-DD, so each
daily run created a new branch and opened a new PR — even though an
existing one was still open. There are currently 5 stale open PRs as a
result.

Use a fixed branch name (docs/sync-output) instead. The force-push
already updates the branch in-place; the gh pr view guard then skips
opening a new PR when one is already open, so re-runs simply update the
existing PR.
@amoeba
amoeba force-pushed the fix/sync-docs-idempotent-branch branch from 9dc2b0c to 93a4cbb Compare September 7, 2026 21:46
@amoeba amoeba changed the title fix: use fixed branch name for sync-output PRs to prevent duplicates ci: only open one sync_docs pr at a time Sep 7, 2026
Avoids noisy daily force-pushes (and associated CI reruns) when the
open PR already reflects the current dbc output. The step only fires
when docs/ on main is stale vs dbc, so we know changes exist relative
to main — but if the remote docs/sync-output branch was already pushed
with the same content (i.e. dbc hasn't released since), there's nothing
new to push.

Uses git diff --cached against origin/docs/sync-output -- docs/ to
compare just the docs subtree.
@amoeba
amoeba requested a review from zeroshade September 7, 2026 22:01
@zeroshade
zeroshade merged commit a7a7bb5 into columnar-tech:main Sep 8, 2026
7 checks passed
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.

2 participants