Repository navigation
fix(controller/docker): ビルドログのストリーミングで controller のサービス名を通知する - #1474
Merged
Merged
Conversation
…iscovery In docker mode the controller advertised 127.0.0.1 as its own address, so the gateway, running in another container, dialed itself when streaming build logs and always got an empty stream. Advertise a hostname reachable from other containers instead, defaulting to the compose service name in the same way as k8s.serviceName. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Preview (prod backend + PR dashboard) → https://1474.ns-preview.trapti.tech/ |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 38 minutes. View limit details
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. |
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.
なぜやるか
docker モードでは、
GetBuildLogStreamが即座に空のストリームを返し、ダッシュボードでビルド中のログが見られなかった。gateway は controller の
DiscoverBuildLogInstanceが返したアドレスへ直接ストリームを張りに行くが、docker モードの controller は自分のアドレスとして127.0.0.1:10000を返していた。gateway は別コンテナで動いているので、自分自身に接続しようとしてconnection refusedになっていた。やったこと
components.controller.docker.serviceNameを追加し、docker モードの discoverer が自分のアドレスとしてこのホスト名を使うようにしたcomponents.controller.k8s.serviceNameと対になる設定で、既定値も同じns-controller(compose のサービス名)にした。既存の docker 環境は設定を変えずに直るやらなかったこと
AddressInfoの意味を変えるか gateway に新しい設定を足す必要があり、変更範囲が広がるNewSingleDiscoverer("127.0.0.1")を使っている ssgen と k8simpl のテストは、自己アドレスを使わない(シャーディングの判定のみ)ので変更していない🤖 Generated with Claude Code