Twin Pull Requests
Some features change both the control plane (turbopanel) and the daemon (turbopaneld), because the two talk over a shared contract. Each repository then gets its own pull request: a twin pair.
The Rules
- Use the same branch name in both repositories, for example
server-ip-report. - Link the two pull requests in each body: write the other pull request's full address in the field the template provides, and say that the daemon one merges first.
- Merge the daemon pull request first, then the control plane one.
Both repositories run a contract check against the other repository's trunk, never against another pull request's branch (contract-twin in the control plane, contract-drift in the daemon). The check is one way:
- The daemon may be ahead. It can list wire features, feature floors and optional fields the control plane does not know yet, and an older control plane ignores what it does not know. So the daemon pull request is green on its own, and stays green after it merges.
- The control plane may only rely on what daemon
trunkalready has. A control plane pull request that uses a feature or field daemontrunklacks is red and says to merge the daemon change first. Once the daemon pull request has merged, re-run the control plane checks. - Values both sides must share exactly (signing prefixes, proof tags, hostname rules) must match on both sides. Change them only with a maintainer's help.
- Removing something goes the other way: the daemon check is red if the daemon drops something the control plane still uses. Remove it from the control plane first.
One Order for Everything
The daemon goes first both onto trunk and in a release (see How to
Ship).
If You Work From Forks
The checks compare with the other repository's trunk, so a fork pair works the same way. Your daemon pull request is checked on its own. Your control plane pull request stays red until a maintainer has merged the daemon one. That is expected, not a mistake in your change. Say so in both pull request bodies so reviewers know it is deliberate.
Opening the Pair
# in ~/turbopanel/turbopaneld and in ~/turbopanel/turbopanel
BASE=upstream # use origin instead if you push to TurboPanel directly (a read-only clone has no upstream until you fork)
git fetch "$BASE"
git switch -c server-ip-report "$BASE"/trunk
# ...make the change, format it, commit...
git push -u origin server-ip-report
gh pr create --repo TurboPanel/turbopaneld --base trunk --title "feat(servers): send the server address"
gh pr create --repo TurboPanel/turbopanel --base trunk --title "feat(servers): report each server's address"Then edit each body to link the other. After the daemon pull request merges, re-run the control plane checks and ask for a review there. The wire contract is expand-only: add fields, do not remove or rename them in the same change.
Related
Last updated on