Skip to content

Commit 2a65ca5

Browse files
ci: keep release PRs rebased, stagger integration jobs, allow an App token
Merging one release PR left the other two CONFLICTING. All three edit the shared .release-please-manifest.json, and by default Release Please rewrites a release branch only when the generated release notes change — so a straggler kept a stale base, and neither the post-merge run nor an explicit workflow_dispatch repaired it. always-update is the supported option for exactly this ("can be useful if pull requests must not be out-of-date with the base branch"); it costs extra API calls per run, which is nothing at three charts. Needs release-please >= 16.15.0 and the action pins ^17.6.1. Stagger the integration matrix. Five jobs starting together pull the same large image from five clusters at once, out of the shared IP range GitHub-hosted runners use, which registries rate limit against. This is the suspected cause of the 2026-08-13 stalls; still unproven, and the diagnostics added alongside it will say either way. Let Release Please author its PRs as a GitHub App. A GITHUB_TOKEN PR cannot start workflow runs, so release PR checks wait on manual approval and Integration Tests — push-triggered — never covers a release PR at all. The step is skipped when the variable is unset and the action falls back to GITHUB_TOKEN, so this changes nothing until an App is configured.
1 parent 1bdafc5 commit 2a65ca5

5 files changed

Lines changed: 72 additions & 11 deletions

File tree

.github/workflows/integration-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
timeout-minutes: 40
3535
strategy:
3636
fail-fast: false
37+
# Five jobs starting at once means five k3d clusters pulling the same large Ontoserver image
38+
# simultaneously, from the shared IP range GitHub-hosted runners use — which registries rate
39+
# limit against. Staggering trades wall-clock for a much smaller burst. Suspected (not proven)
40+
# cause of the 2026-08-13 install stalls; the diagnostics added alongside this will say.
41+
max-parallel: 2
3742
matrix:
3843
mode:
3944
- name: read-only

.github/workflows/release-please.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,26 @@ jobs:
3232
# publish job fans out over.
3333
paths_released: ${{ steps.release.outputs.paths_released }}
3434
steps:
35+
# A PR opened with the default GITHUB_TOKEN cannot start workflow runs (GitHub's recursion
36+
# guard). The visible cost on a release PR: its `pull_request` checks sit at action_required
37+
# waiting for a human to approve them, and Integration Tests — which triggers on `push` only —
38+
# never runs against a release PR at all. Authoring the PR as a GitHub App instead makes both
39+
# events fire normally.
40+
#
41+
# Optional by design: with the variable unset this step is skipped and the action falls back to
42+
# GITHUB_TOKEN, exactly as before. Set the repo variable RELEASE_PLEASE_APP_ID and the secret
43+
# RELEASE_PLEASE_APP_PRIVATE_KEY to switch over — no workflow edit needed. See RELEASE.md.
44+
- uses: actions/create-github-app-token@v2
45+
id: app-token
46+
if: vars.RELEASE_PLEASE_APP_ID != ''
47+
with:
48+
app-id: ${{ vars.RELEASE_PLEASE_APP_ID }}
49+
private-key: ${{ secrets.RELEASE_PLEASE_APP_PRIVATE_KEY }}
50+
3551
- uses: googleapis/release-please-action@v4
3652
id: release
3753
with:
54+
token: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
3855
config-file: release-please-config.json
3956
manifest-file: .release-please-manifest.json
4057

CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ The traps, in short:
2525
- **`artifacthub.io/changes` in `Chart.yaml` is hand-maintained** and Release Please does not update
2626
it, so it goes stale silently after a release.
2727

28-
- **Merging one release PR conflicts the others.** All three edit `.release-please-manifest.json`,
29-
and Release Please will *not* rebase them for you — it only rewrites a release branch when the
30-
generated release content changes. Rebase by hand; the resolution is always the union of the
31-
versions. See the recovery section in `RELEASE.md`.
28+
- **Merging one release PR used to conflict the others**, because all three edit
29+
`.release-please-manifest.json`. Fixed by `always-update: true` in `release-please-config.json`;
30+
without it Release Please rewrites a release branch only when the generated *release notes*
31+
change, so a straggler keeps a stale base and conflicts. Don't remove that flag.
3232

3333
Current releases: `ontoserver` 0.4.1, `ontoserver-extras` 0.1.2, `ontoserver-indexer` 0.2.1.

RELEASE.md

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ normal path; everything else in this document is fallback and recovery.
77
- [How the three charts stay separate](#how-the-three-charts-stay-separate)
88
- [What lands where](#what-lands-where)
99
- [Conventions you must not break](#conventions-you-must-not-break)
10+
- [Release PRs and workflow approval (GitHub App token)](#release-prs-and-workflow-approval-github-app-token)
1011
- [Manual release (`release.sh`)](#manual-release-releasesh)
1112
- [Recovery](#recovery)
1213
- [Artifact Hub](#artifact-hub)
@@ -61,6 +62,10 @@ scope.** This is the single most important thing to understand:
6162
Practical consequence: **keep a commit to one chart** where you can. A commit that sweeps all three
6263
charts forces all three to release together.
6364

65+
- `always-update: true` keeps the open release PRs rebased on `master` as each one merges. All three
66+
edit the shared `.release-please-manifest.json`, so without it merging one leaves the rest
67+
conflicting — see [Recovery](#a-release-pr-conflicts-after-another-one-merged).
68+
6469
Configuration lives in `release-please-config.json` (what the packages are) and
6570
`.release-please-manifest.json` (what version each is currently at).
6671

@@ -138,6 +143,29 @@ up the runs by commit SHA and polls for up to 10 minutes if one is still in flig
138143

139144
If the gate reports *no run found*, the commit was never pushed to a branch. Push it before tagging.
140145

146+
## Release PRs and workflow approval (GitHub App token)
147+
148+
A PR opened with the default `GITHUB_TOKEN` cannot trigger workflow runs — GitHub's recursion guard.
149+
On a release PR that shows up two ways:
150+
151+
- its `pull_request` checks queue at **action_required** until a human clicks approve;
152+
- **Integration Tests never runs on a release PR at all**, because it triggers on `push` only and
153+
the bot's push is suppressed. The suite only runs after the merge, against master.
154+
155+
`release-please.yml` will author its PRs as a GitHub App when one is configured, which makes both
156+
events fire normally. It is optional: with the variable unset the step is skipped and the action
157+
falls back to `GITHUB_TOKEN`, behaving exactly as before. To switch over — no workflow edit needed:
158+
159+
1. Create a GitHub App under the **aehrc** org (Settings → Developer settings → GitHub Apps).
160+
Permissions: **Contents: Read and write**, **Pull requests: Read and write**,
161+
**Issues: Read and write** (Release Please labels its PRs, and labels are the issues API).
162+
2. Install it on `aehrc/ontoserver-deploy`, and generate a private key.
163+
3. Add repo **variable** `RELEASE_PLEASE_APP_ID` (the numeric App ID) and repo **secret**
164+
`RELEASE_PLEASE_APP_PRIVATE_KEY` (the whole PEM, `BEGIN`/`END` lines included).
165+
166+
Verify by pushing a chart change: the release PR's author becomes the App, and its checks — now
167+
including Integration Tests — start without an approval prompt.
168+
141169
## Manual release (`release.sh`)
142170

143171
Kept for recovery and for releasing from a feature branch. **It still follows the old convention**
@@ -221,14 +249,24 @@ git push origin gh-pages
221249

222250
### A release PR conflicts after another one merged
223251

224-
Every release PR edits `.release-please-manifest.json`, so merging one leaves the others
225-
`CONFLICTING`. **Release Please does not fix this for you** — it rewrites a release branch only when
226-
the *generated release content* changes, and a straggler's content has not changed, so both the
227-
post-merge run and an explicit `workflow_dispatch` leave the stale branch alone (observed
228-
2026-08-13).
252+
Every release PR edits `.release-please-manifest.json`, so merging one used to leave the others
253+
`CONFLICTING`. **`always-update: true` in `release-please-config.json` fixes this** — it is the
254+
supported option for exactly this case:
255+
256+
> if true, always update existing pull requests when changes are added, instead of only when the
257+
> release notes change. [] can be useful if pull requests must not be out-of-date with the base
258+
> branch.
259+
260+
The default is `false`, which only rewrites a release branch when the *generated release notes*
261+
change. Merging extras changes the shared manifest but not the indexer's notes, so the straggler was
262+
left pointing at a stale base — and neither the post-merge run nor an explicit `workflow_dispatch`
263+
repaired it (observed 2026-08-13, before the option was set). It costs extra API calls per run,
264+
which is irrelevant at three charts.
265+
266+
Requires release-please ≥ 16.15.0; `release-please-action@v4` depends on `^17.6.1`, so it is live.
229267

230-
Rebase it by hand. The resolution is always the union: each chart's own new version, plus whatever
231-
the merged release just published.
268+
If you ever hit a conflict anyway, rebase by hand. The resolution is always the union: each chart's
269+
own new version, plus whatever the merged release just published.
232270

233271
```bash
234272
BR=release-please--branches--master--components--<chart>

release-please-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
33
"separate-pull-requests": true,
4+
"always-update": true,
45
"packages": {
56
"charts/ontoserver": {
67
"release-type": "helm",

0 commit comments

Comments
 (0)