Skip to content

Add next branch workflow (RFD #142) - #4112

Open
T4rk1n wants to merge 2 commits into
devfrom
next-dev-workflow
Open

T4rk1n wants to merge 2 commits into
devfrom
next-dev-workflow

Conversation

@T4rk1n

@T4rk1n T4rk1n commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Sets up the next + dev workflow from RFD #142 (Dash release management: a next branch alongside dev). Fixes and chores target dev and ship as patches; features target next and ship as minors.

Already done outside this PR: next created from dev at 4.5.0 (00b8ed6), with a ruleset requiring a PR, one code-owner review, merge commits only, and the checks Consolidated Test Report, percy/dash-table-test, Forward merge not conflicted. Before merging: add the write deploy key, the DEV_NEXT_MERGE_KEY secret, and the DeployKey bypass on the next ruleset.

Changes

  • forward-merge.yml: on each push to dev, merges dev into next and pushes it with the DEV_NEXT_MERGE_KEY deploy key. The deploy key and admins are the only actors allowed to bypass the next ruleset. If the merge conflicts, it opens a "Merge dev into next" PR from dev-into-next instead, and automatic merges pause until that PR is merged. It posts the Forward merge not conflicted status on that PR itself, because PRs opened with GITHUB_TOKEN do not trigger workflows.
  • branch-policy.yml:
    • "No features on dev" fails PRs into dev that add an Unreleased Added CHANGELOG entry.
    • "Forward merge not conflicted" fails PRs into next while the forward PR has conflicts.
  • testing.yml: runs on push to next; workflow_dispatch now runs the full suite.
  • CONTRIBUTING.md, the PR template and CLAUDE.md explain which branch to target and the release steps; .ai/PERFORMANCE.md covers per-branch benchmark baselines.

Not verified yet

  • Percy only auto-approves builds on configured branches, so visual diffs on next / dev-into-next may need manual approval.

Tested locally: the changelog script on fix, feature, old-style heading and existing-entry cases, and the forward-merge script against a local bare repo for each branch state (already merged, clean automatic merge, push race with another merge into next, conflict opening a PR, new fixes while that PR is open, resolved branch with a clean or conflicting fix). Not tested in a running Dash app: no Dash runtime behavior changes.

@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@KoolADE85 KoolADE85 self-assigned this Nov 2, 2026
# Something merged into next meanwhile.
git fetch origin next
done
[ -n "$conflict" ] || exit 1

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'm not sure why we need to retry three times here?
Even if it's necessary, if the 3rd attempt fails, there is no way to alert ourselves of the failure. It just silently runs exit 1.

gh workflow run testing.yml --ref "$MERGE_BRANCH"
else
# The branch is dev itself, so the checks already run on dev apply.
git push --force origin "origin/dev:refs/heads/$MERGE_BRANCH"

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.

An edge case, but this might be safer:

Suggested change
git push --force origin "origin/dev:refs/heads/$MERGE_BRANCH"
git push --force-with-lease origin "origin/dev:refs/heads/$MERGE_BRANCH"

Comment on lines 1359 to 1362
github.event_name == 'push' &&
(github.ref == 'refs/heads/master' ||
github.ref == 'refs/heads/dev' ||
startsWith(github.ref, 'refs/tags/'))

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.

This is still restricted to master and dev - do we want to store build artifacts for pushes to next as well?

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