Skip to content

fix(controller/docker): ビルドログのストリーミングで controller のサービス名を通知する - #1474

Merged
pirosiki197 merged 1 commit into
mainfrom
fix/docker-build-log-stream
Nov 1, 2026
Merged

pirosiki197 merged 1 commit into
mainfrom
fix/docker-build-log-stream

Conversation

@pirosiki197

Copy link
Copy Markdown
Contributor

なぜやるか

docker モードでは、GetBuildLogStream が即座に空のストリームを返し、ダッシュボードでビルド中のログが見られなかった。

gateway は controller の DiscoverBuildLogInstance が返したアドレスへ直接ストリームを張りに行くが、docker モードの controller は自分のアドレスとして 127.0.0.1:10000 を返していた。gateway は別コンテナで動いているので、自分自身に接続しようとして connection refused になっていた。

level=WARN msg="failed to receive build log stream" error="unavailable: dial tcp 127.0.0.1:10000: connect: connection refused"

やったこと

  • components.controller.docker.serviceName を追加し、docker モードの discoverer が自分のアドレスとしてこのホスト名を使うようにした
    • k8s モードの components.controller.k8s.serviceName と対になる設定で、既定値も同じ ns-controller(compose のサービス名)にした。既存の docker 環境は設定を変えずに直る

やらなかったこと

  • 単一インスタンスのときに gateway 側で設定済みの controller URL を使う案は採らなかった。gateway はクラスタの台数を知らないため、AddressInfo の意味を変えるか gateway に新しい設定を足す必要があり、変更範囲が広がる
  • NewSingleDiscoverer("127.0.0.1") を使っている ssgen と k8simpl のテストは、自己アドレスを使わない(シャーディングの判定のみ)ので変更していない
  • k8s モードの挙動は変えていない

🤖 Generated with Claude Code

…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>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Preview (prod backend + PR dashboard) → https://1474.ns-preview.trapti.tech/

@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bbac4edc-eb59-4f09-9f84-a4b96535cb7c
Commits

Reviewing files that changed from the base of the PR and between 0a67b50 and 11539ec.

Files selected for processing: 3
  • cmd/config.go
  • cmd/providers.go
  • pkg/infrastructure/backend/dockerimpl/config.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@pirosiki197
pirosiki197 merged commit 67f0f76 into main Nov 1, 2026
19 checks passed
@pirosiki197
pirosiki197 deleted the fix/docker-build-log-stream branch November 1, 2026 13:48
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