chore(functions): 旧Node実装を撤去(Go全面移行の完了・deployのpruneで削除)#139
Merged
Conversation
status/sanpai/register/ranking/userOGP/ogpRewrite とスケジュール4本は すべてGo版(statusGo等)へ移植済みで、フロントの$axios呼び出しと firebase.jsonのhosting rewrite(/u/*->ogpRewriteGo)もGo版のみを参照する。 app/functions/index.jsを関数を一切exportしないスタブにし、firebase deploy時に 旧Node関数がprune(削除)されるようにする。Go版(gcloud個別デプロイのgen2)は firebase管理外のためpruneされない。旧実装のソースはgit履歴に保全。 docs/backend.mdに撤去の経緯と挙動を追記。 Co-authored-by: kojira <kojira@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
Go全面移行が完了・本番安定したため、旧 Node Cloud Functions を撤去する(コスト/クラッタ削減)。option 1(ソース撤去で
firebase deployの prune により削除)を採用。事前検証(機能影響なし)
Node関数10本すべてに Go版が存在し、フロント/hosting は Go版のみ参照:
$axios:statusGo/sanpaiGo/registerGo//rankingGo/u/*→ogpRewriteGo(→userOGPGo)Node関数名への参照は残っていない。
変更
app/functions/index.js: 関数を一切 export しないスタブ(移植済みコメントのみ)に。→firebase deploy --force実行時に旧 Node 関数(status/sanpai/register/ranking/userOGP/ogpRewrite + スケジュール4本)が prune(削除) される。Go版(gcloud 個別デプロイの gen2)は firebase 管理外のため prune されない。docs/backend.md: 撤去の経緯・挙動を追記。反映手順
main → env/dev反映で dev-deploy 実行 → dev の Node関数が prune され、Go関数が残ることを確認。env/prodへ反映。検証
node --check index.jsパス、requireして export 数 = 0 を確認。