Repository navigation
ci(nightly): allow forcing a build of the release branch tip - #14015
Conversation
The nightly only builds the newest commit with a green CI push run, so a red release branch blocks the channel entirely. A manual dispatch can now pass force=true to build the branch tip without the CI check. The scheduled run keeps the green-only gate.
🔵 Tier A · Mergeable after minor fixes
Adds a boolean
Fix with agent prompt### Issue 1
.github/workflows/nightly.yml:53
**Reject an empty SHA before publishing a forced build**
If the release branch is deleted or renamed between the two remote lookups, `git ls-remote` succeeds with no output. An empty `SHA` makes `actions/checkout` fall back to the workflow's triggering ref, so this can publish main (or the manually selected ref) under the release branch's nightly tags; please fail when the forced lookup returns no commit.
```suggestion
sha=$(git ls-remote "$REMOTE" "refs/heads/${branch}" | cut -f1)
[ -n "$sha" ] || { echo "::error::No tip found on ${branch}."; exit 1; }
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.📂 Walkthrough · 1
Reviewed |
| if [ "$FORCE" = "true" ]; then | ||
| # Manual override for when the branch is red and the channel still | ||
| # needs a build. Ships the tip as-is. | ||
| sha=$(git ls-remote "$REMOTE" "refs/heads/${branch}" | cut -f1) |
There was a problem hiding this comment.
Reject an empty SHA before publishing a forced build
If the release branch is deleted or renamed between the two remote lookups, git ls-remote succeeds with no output. An empty SHA makes actions/checkout fall back to the workflow's triggering ref, so this can publish main (or the manually selected ref) under the release branch's nightly tags; please fail when the forced lookup returns no commit.
| sha=$(git ls-remote "$REMOTE" "refs/heads/${branch}" | cut -f1) | |
| sha=$(git ls-remote "$REMOTE" "refs/heads/${branch}" | cut -f1) | |
| [ -n "$sha" ] || { echo "::error::No tip found on ${branch}."; exit 1; } |
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/nightly.yml
Line: 53
Comment:
**Reject an empty SHA before publishing a forced build**
If the release branch is deleted or renamed between the two remote lookups, `git ls-remote` succeeds with no output. An empty `SHA` makes `actions/checkout` fall back to the workflow's triggering ref, so this can publish main (or the manually selected ref) under the release branch's nightly tags; please fail when the forced lookup returns no commit.
```suggestion
sha=$(git ls-remote "$REMOTE" "refs/heads/${branch}" | cut -f1)
[ -n "$sha" ] || { echo "::error::No tip found on ${branch}."; exit 1; }
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · error-handling · Reply if this doesn't apply.
|
| if [ "$FORCE" = "true" ]; then | ||
| # Manual override for when the branch is red and the channel still | ||
| # needs a build. Ships the tip as-is. | ||
| sha=$(git ls-remote "$REMOTE" "refs/heads/${branch}" | cut -f1) |
There was a problem hiding this comment.
Empty tip publishes wrong commit If the release branch is removed between branch discovery and this lookup,
git ls-remote returns no SHA without failing. The forced path does not reject the empty value, so checkout falls back to the workflow ref and can publish that commit under the release branch's nightly tags. Reject an empty SHA before checkout.
| sha=$(git ls-remote "$REMOTE" "refs/heads/${branch}" | cut -f1) | |
| sha=$(git ls-remote "$REMOTE" "refs/heads/${branch}" | cut -f1) | |
| [ -n "$sha" ] || { echo "::error::No tip found for ${branch}."; exit 1; } |
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/nightly.yml
Line: 53
Comment:
**Empty tip publishes wrong commit** If the release branch is removed between branch discovery and this lookup, `git ls-remote` returns no SHA without failing. The forced path does not reject the empty value, so checkout falls back to the workflow ref and can publish that commit under the release branch's nightly tags. Reject an empty SHA before checkout.
```suggestion
sha=$(git ls-remote "$REMOTE" "refs/heads/${branch}" | cut -f1)
[ -n "$sha" ] || { echo "::error::No tip found for ${branch}."; exit 1; }
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
Brings in main's OAuth2 state and nonce validation (#14012), which cloud needs, along with the realtime origin alignment (#14020), subscriber target ownership (#14019), GitLab primary email (#14010), impersonation MFA (#14017), write-only webhook passwords (#14016), chunked-upload resume ownership (#14014), preview authorize validation (#14013), nightly forcing (#14015) and scheduled-function enqueue checks (#14011). The merge had no textual conflicts, and main left composer.json and composer.lock unchanged. So the lock keeps the branch's database and async pins. Main's assertResumeAllowed() in Storage Buckets/Files/Create checks Input(Database::PERMISSION_UPDATE, ...). utopia-php/database 8 has no PERMISSION_* constants, so every chunked resume would fail with an undefined-constant error. It now passes PermissionType::Update, as the rest of that action already does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
What does this PR do?
The nightly job only builds the newest commit on the active release branch that has a green CI push run. 2.0.x has no green push run yet, so every nightly fails at Resolve the build with
No green CI run on 2.0.x.This adds a
forceboolean input toworkflow_dispatch. A manual run withforce=truebuilds the tip of the release branch and skips the CI check, and the run logs a warning naming the commit it built. The scheduled run still waits for a green commit, as before.Why 2.0.x is red
From the CI run on #13936:
composer auditflagsmongodb/mongodb(CVE-2026-81525, fixed in 2.4.1 / 1.21.4). A forced build ships this version.minio/miniocan no longer be pulled. main switched toghcr.io/appwrite/siloin 6cc2997.Those still need a backport to 2.0.x. Until then, this lets the channel publish.
Test Plan
actionlint .github/workflows/nightly.ymlpasses.force=trueshould resolve2.0.xatce4553b270and publish2.0-nightly.<date>.