Use immutable nightly releases#53
Conversation
|
Warning Review limit reached
More reviews will be available in 49 minutes and 48 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR introduces immutable per-run nightly builds to the GitHub Actions CI/CD pipeline. The build action now resolves ChangesImmutable Nightly Releases
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR changes the nightly distribution model to be immutable by publishing each successful master build as a unique prerelease tag, and updates the reusable build action so version: nightly resolves to the newest such prerelease (with required assets). It also updates documentation and adds assertions to ensure the packaging workflow and action behavior remain consistent.
Changes:
- Publish immutable nightly prereleases tagged
nightly-<run>-<attempt>-<sha>(instead of updating a mutablenightlytag/release). - Update the composite build action to resolve
version: nightlyvia the GitHub Releases API by selecting the newest matching prerelease with required assets. - Update docs and add unit assertions to enforce the new immutable-nightly workflow/action behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/Unit/Packaging/ConfigurationPackagingTest.php |
Adds assertions for immutable nightly prerelease creation and action nightly-resolution behavior. |
docs/github-actions.md |
Documents that nightly resolves to the newest immutable nightly prerelease with required assets. |
docs/deployment.md |
Updates deployment guidance to mention version: nightly for previewing newest immutable nightlies. |
docs/binaries-phar-docker.md |
Updates packaging documentation to describe immutable nightly prereleases and action resolution behavior. |
.github/workflows/package-static.yml |
Changes nightly publishing to create a unique prerelease per run/attempt/SHA (immutable). |
.github/actions/build/action.yml |
Adds nightly resolution logic that selects a suitable prerelease tag via the GitHub API before downloading assets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
🧹 Nitpick comments (2)
docs/binaries-phar-docker.md (1)
44-44: ⚡ Quick winConsider splitting this long sentence for clarity.
Line 44 describes three different artifact destinations (workflow artifacts, GitHub prereleases, and container registry) in a single complex sentence. While technically accurate, splitting it into separate sentences would improve readability and make it clearer where each artifact type is published.
✏️ Proposed restructure for clarity
-GitHub Actions builds the same outputs in the `Package Static Builds` workflow. Commits to `master` publish separate nightly PHAR, Linux, macOS, and Windows workflow artifacts, create immutable GitHub prereleases tagged as `nightly-<run>-<attempt>-<sha>` with the Linux binary and checksums, and push the distroless image as `ghcr.io/<owner>/<repo>-static:nightly` plus a commit-specific `nightly-<sha>` tag. The reusable build action resolves `version: nightly` to the newest matching nightly prerelease. +GitHub Actions builds the same outputs in the `Package Static Builds` workflow. Commits to `master` publish separate nightly PHAR, Linux, macOS, and Windows workflow artifacts. They also create immutable GitHub prereleases tagged as `nightly-<run>-<attempt>-<sha>` with the Linux binary and checksums, and push the distroless image as `ghcr.io/<owner>/<repo>-static:nightly` plus a commit-specific `nightly-<sha>` tag. The reusable build action resolves `version: nightly` to the newest matching nightly prerelease.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/binaries-phar-docker.md` at line 44, The long sentence beginning "GitHub Actions builds the same outputs in the `Package Static Builds` workflow..." should be split into multiple clear sentences: one stating that commits to master publish workflow artifacts (nightly PHAR, Linux, macOS, Windows), a second describing the creation of immutable nightly prereleases (tagged `nightly-<run>-<attempt>-<sha>` containing the Linux binary and checksums), and a third explaining the distroless image pushes (`ghcr.io/<owner>/<repo>-static:nightly` and `nightly-<sha>`). Finally, keep the note about the reusable build action resolving `version: nightly` as a separate concluding sentence for clarity..github/actions/build/action.yml (1)
82-114: Make nightly release lookup resilient to >100 matching prereleasesThe nightly resolution only fetches the first page of releases (
releases?per_page=100) and doesn’t paginate, so if more than 100nightly-*prereleases accumulate over time it can fail to find the latest matching assets. A current check showsyiipress/enginehas0nightly prereleases right now, but the logic remains brittle for other${repository}values and future accumulation. [optional: add pagination for the GitHub releases query or document/implement retention/cleanup of old nightlies].🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/actions/build/action.yml around lines 82 - 114, The nightly lookup only downloads one page of releases into nightly_releases and can miss matching prereleases if there are >100 entries; modify the logic around the curl + nightly_releases and the python extractor to paginate GitHub releases (e.g., loop fetching releases?per_page=100&page=N until no more results) and concatenate results into nightly_releases, or alternatively use the GitHub Releases API with pagination headers to collect all pages before running the python3 block that prints the matching tag; update the curl/headers loop and ensure the python input (currently reading sys.argv[1] in the block used by nightly_releases) receives the combined JSON so the existing tag-matching code (tag.startswith("nightly-") and assets check) still works.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/actions/build/action.yml:
- Around line 82-114: The nightly lookup only downloads one page of releases
into nightly_releases and can miss matching prereleases if there are >100
entries; modify the logic around the curl + nightly_releases and the python
extractor to paginate GitHub releases (e.g., loop fetching
releases?per_page=100&page=N until no more results) and concatenate results into
nightly_releases, or alternatively use the GitHub Releases API with pagination
headers to collect all pages before running the python3 block that prints the
matching tag; update the curl/headers loop and ensure the python input
(currently reading sys.argv[1] in the block used by nightly_releases) receives
the combined JSON so the existing tag-matching code (tag.startswith("nightly-")
and assets check) still works.
In `@docs/binaries-phar-docker.md`:
- Line 44: The long sentence beginning "GitHub Actions builds the same outputs
in the `Package Static Builds` workflow..." should be split into multiple clear
sentences: one stating that commits to master publish workflow artifacts
(nightly PHAR, Linux, macOS, Windows), a second describing the creation of
immutable nightly prereleases (tagged `nightly-<run>-<attempt>-<sha>` containing
the Linux binary and checksums), and a third explaining the distroless image
pushes (`ghcr.io/<owner>/<repo>-static:nightly` and `nightly-<sha>`). Finally,
keep the note about the reusable build action resolving `version: nightly` as a
separate concluding sentence for clarity.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b57f90a4-2191-46aa-9dc4-ac9f27de045b
📒 Files selected for processing (6)
.github/actions/build/action.yml.github/workflows/package-static.ymldocs/binaries-phar-docker.mddocs/deployment.mddocs/github-actions.mdtests/Unit/Packaging/ConfigurationPackagingTest.php
Summary
nightly-<run>-<attempt>-<sha>version: nightlyto the newest matching nightly prerelease with binary and checksum assetsTests
make test TESTS=tests/Unit/Packaging/ConfigurationPackagingTest.php(Make target ran full PHPUnit suite: 649 tests)make psalmmake composer-dependency-analyserSummary by CodeRabbit
New Features
version: nightlyto automatically resolve to the latest available nightly prerelease.Documentation