ci: fix fromJson('') crash that fails release job on non-release pushes (LAB-865) - #58
Conversation
…non-release pushes
Step env: templates are evaluated when the step is materialized, regardless
of the if: guard. On any push to main where release-please creates/updates
no release PR, steps.release.outputs.pr is empty and fromJson('') throws a
template error that fails the release-please job — which skips the publish
job (needs: release-please). Since the push that merges a release PR also
has an empty pr output, the next real release would tag on GitHub but never
publish to crates.io.
Select the release PR by release-please's deterministic head branch
(release-please--branches--main--components--cachekit-core, verified against
release PRs #38 and #49) instead of parsing the PR number in a template
position that can see an empty string.
Closes LAB-865
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 44 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
LAB-865: fix
fromJson('')crash in release workflow assign stepThe bug
GitHub Actions evaluates a step's
env:templates when materializing the step, before theif:guard is consulted. On any push to main where release-please creates/updates no release PR,steps.release.outputs.pris empty, sofromJson('')throwsError reading JToken from JsonReaderand fails the wholerelease-pleasejob — which skipspublish(needs: release-please).Evidence: runs 30205236363 (merge of #57), 29831146861, 29831120533, 29558428840 — all dead at this step. Last green: 29454532970 (v0.3.0, before the assign step existed).
Worst case: the push that merges a release PR also has an empty
proutput, sorelease_created=truewould be computed but the job dies first → tag/GitHub release and crates.io silently diverge. This would bite the LAB-764 v0.4.0 release with certainty.The fix
Remove
fromJsonfrom the template position that can see an empty string. The step now selects the release PR by release-please's deterministic head branch:Note: this is not the
release-please--branches--mainform — release-please v4 in manifest mode appends the component name. Verified against the actual release PRs #38 and #49, both on exactly this branch.Both live paths survive
outputs.prempty): no template in the step parses JSON, so materialization succeeds;if:is falsy → step skipped → job green → publish gated only byrelease_createdas designed.outputs.prset):if:truthy →gh pr edit <head-branch>resolves the open release PR (release-please maintains exactly one open PR on that branch) and adds the assignee; re-runs are idempotent (adding a present assignee is a no-op).Scope
Release-As: 0.3.1footer was separately ineffective (buried mid-body by squash-merge;test:is a non-releasing type). Per the amended LAB-764 rollout, v0.3.1 is not being resurrected — the readers-first release is collapsed into v0.4.0. This PR fixes the pipeline only.Docs gate
No docs surface: internal CI repair, no user-facing or documented behavior changed.
Closes LAB-865