fix(ci): Node.js を 24.18.0 にアップグレードして firebase deploy の偽陽性失敗を解消 - #157
Conversation
actions/setup-node が引いていた Node.js 22 系で premature close バグ (nodejs/node#63989) が発生し、firebase-tools の apiv2 が POST /releases を冪等でないリトライしていた。結果 deploy 自体は 成功しているのに 400 "is the current active version" で job が 赤くなっていた。 修正済みの Node.js (24.18.0, PR nodejs/node#64004 取り込み) に アップグレードすることで、premature close 自体を起こさないように する。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 48 minutes and 39 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?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 credits. 🚦 How do rate 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 see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ 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 |
|
Visit the preview URL for this PR (updated for commit 677473e): https://tabi-share-8ef6b--pr157-fix-firebase-preview-f7hox846.web.app (expires Sat, 04 Jul 2026 01:56:08 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 9f2a87ede127df7673322845e34cf22c1372d720 |
PR #157 の preview deploy が安定して緑になるか確認するため。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0bfd0a7 to
677473e
Compare
Summary
actions/setup-nodeのnode-versionを'22'→'24.18.0'に変更(3つの workflow 共通)背景
Deploy to Firebase Hosting on PRjob が、実際は deploy 成功しているのに必ず failure 扱いになる現象が PR #151 で発生していた。失敗フロー
```
T+0.0s POST /releases?versionName=<新version> (1回目)
T+0.8s apiv2: "retrying ... after a premature close error"
T+1.8s POST /releases?versionName=<同じ新version> (リトライ)
T+2.5s <<< 400 "supplied version is the current active version"
```
1回目で release は成功しチャンネル更新済み。premature close でレスポンス取りこぼした firebase-tools の apiv2 が冪等でない POST を再送 → Firebase が
FAILED_PRECONDITION 400を返す → job 失敗。根本原因
Node.js v24.17.0 で導入された keep-alive socket 再利用タイミング変更 (nodejs/node#63989) による node-fetch@2 の
ERR_STREAM_PREMATURE_CLOSEバグ。firebase-tools のバージョンアップが原因ではない。actions/setup-node@v4でnode-version: '22'を指定していたが、22.x の最新が引かれていたため premature close 発生バージョンを踏んでいた。なぜ firebase-tools のバージョン pin では直らないか
firebase-tools 最新 v15.22.3 の PR #10697("Retry without keep-alive after a premature close error")は、本文で明示的に:
deploy フローには適用されないため、firebase-tools 側で patch を待っても解消されない。Node.js 側で premature close を起こさないことが根本治療。
関連 issue / 参照
Test plan
curl -Iで叩いて 200 + 最新の last-modified を確認firebase-hosting-merge.ymlの staging deploy が成功firebase-hosting-release.ymlの production deploy が成功Fallback
万一 Node 24 で別の問題が発生した場合は、
node-version: '22.22.0'への pin で対応する(22.23.0 を踏まないバージョン)。🤖 Generated with Claude Code