Skip to content

WaitForProxyの依存関係をStopCloudRunに修正#9358

Merged
komagata merged 1 commit intomainfrom
fix/wait-for-proxy-dependency
Dec 11, 2025
Merged

WaitForProxyの依存関係をStopCloudRunに修正#9358
komagata merged 1 commit intomainfrom
fix/wait-for-proxy-dependency

Conversation

@komagata
Copy link
Copy Markdown
Member

@komagata komagata commented Dec 11, 2025

Summary

  • WaitForProxyステップのwaitForPushからStopCloudRunに変更
  • SqlProxyとWaitForProxyが同時に開始されるように修正

問題

WaitForProxyがPush完了後に開始されていたため、SqlProxyより先に実行されてしまい、DB接続が確立できずタイムアウトしていた。

解決策

WaitForProxyのwaitForStopCloudRunに変更することで、SqlProxyと同時に開始されるようにした。これにより、SqlProxyが起動しながらWaitForProxyが接続を待つことができる。

Test plan

  • ステージング環境へのデプロイが成功することを確認

🤖 Generated with Claude Code

Summary by CodeRabbit

リリースノート

  • 修正(Chores)
    • ステージング環境のデプロイメント処理における同期順序を改善し、クラウドサービス間の連携信頼性を向上させました。

✏️ Tip: You can customize this high-level summary in your review settings.

WaitForProxyがSqlProxyより先に実行されていたため、
DB接続が確立できずタイムアウトしていた。
SqlProxyと同じくStopCloudRunを待つことで、
両方が同時に開始され、正しく接続待ちができるようになる。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 11, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

.cloudbuild/cloudbuild-staging.yaml の待機シーケンスを更新し、Push の代わりに StopCloudRun を待機するように変更しました。これにより WaitForProxy ステップとタイムアウト後のエラーハンドリングパスの同期ポイントが変わり、Cloud SQL Proxy の準備を待つ前に Cloud Run が停止(DB接続の切断)されることが保証されます。

Changes

コホート / ファイル(s) 変更の概要
Cloud Build ステージング設定
\.cloudbuild/cloudbuild-staging\.yaml
WaitForProxy ステップとタイムアウト後のエラーハンドリングパスの待機対象を Push から StopCloudRun に更新。Cloud Run 停止後に Cloud SQL Proxy 準備を待つよう同期ポイントを再編成

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • 注視が必要な点:
    • StopCloudRun への依存関係変更が他の Cloud Build ステップに影響しないことを確認
    • DB 接続の切断順序が正しく機能することを検証

Possibly related PRs

Suggested labels

雑事

Suggested reviewers

  • okuramasafumi

Poem

🐰 雲の上で順番を整える、
Run よ、一度停止して Proxy を待ちて、
接続の流れを整ぞと、
設定の歯車がかみ合いたり 🔄✨

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/wait-for-proxy-dependency

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8a4a190 and dc90403.

📒 Files selected for processing (1)
  • .cloudbuild/cloudbuild-staging.yaml (1 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@komagata komagata merged commit 1c47aad into main Dec 11, 2025
1 of 3 checks passed
@komagata komagata deleted the fix/wait-for-proxy-dependency branch December 11, 2025 14:24
@github-actions github-actions bot mentioned this pull request Dec 11, 2025
28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant