Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

bug: dataplane client ignores SERVER_BASEPATH, so create/delete topic miss the subpath

オープン 初心者向け
#2,693 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@bhataprameya がすでに取り組んでいます。

2026年10月24日 から。

  • #2694 @bhataprameya による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript

調査の方向性

frontend/src/app.tsx の dataplane トランスポートの設定から始めます。次に frontend/src/config.ts の getGrpcBasePath を読み、動作している console.v1alpha1 クライアントと比較します。SERVER_BASEPATH がスタンドアロン UI の dataplane リクエスト URL にどう影響するかを確認します。Create Topic、Delete Topic、その他の dataplane RPC に設定されたプレフィックスが含まれることを完了条件とし、/kafka 以下へのリクエストで確認します。

索引モデルが issue の本文から書いたものです。

説明

Summary

When Console is served under a URL prefix (SERVER_BASEPATH=/kafka), the topics list works, but Create Topic and Delete Topic call the dataplane API at the site root. The browser requests POST /redpanda.api.dataplane.v1.TopicService/CreateTopic instead of POST /kafka/redpanda.api.dataplane.v1.TopicService/CreateTopic.

Anything else mounted at / receives that request. The UI then shows ConnectError [unknown].

The same code is in v3.5.1 and is unchanged on v3.13.1 / current master.

Setup

Console behind a reverse proxy that forwards only /kafka/* to the process.

SERVER_BASEPATH=/kafka
SERVER_STRIPPREFIX=true
SERVER_SETBASEPATHFROMXFORWARDEDPREFIX=true

The served page sets window.BASE_URL = '/kafka/'. Listing topics and the console.v1alpha1 calls go to /kafka/... and succeed.

What happens

  1. Open /kafka/topics.
  2. Create Topic, fill in a name, submit.
  3. The browser sends:
POST /redpanda.api.dataplane.v1.TopicService/CreateTopic

That path has no /kafka prefix, so the proxy does not send it to Console. The Connect client reports ConnectError [unknown]. Delete Topic uses the same client.

The same request with the prefix reaches Console and returns a normal API response. For example, an empty body returns 400 invalid_argument (topic is required), which shows the handler itself is fine.

Cause

The standalone app builds the dataplane transport with an explicit empty base URL:

// frontend/src/app.tsx
const dataplaneTransport = createConnectTransport({
  baseUrl: getGrpcBasePath(''), // Embedded mode handles the path separately.

getGrpcBasePath only falls back to window.BASE_URL when the override is nullish:

// frontend/src/config.ts
export const getGrpcBasePath = (overrideUrl?: string) => overrideUrl ?? getBasePath();

'' is not nullish, so the fallback never runs and baseUrl stays empty. The comment says embedded mode handles the path, but this transport is the one the standalone UI uses. Create Topic, Delete Topic, and the other redpanda.api.dataplane.v1 calls share it. The older console.v1alpha1 client still uses getBasePath() and is fine.

Expected

With SERVER_BASEPATH=/kafka, dataplane calls should be POST /kafka/redpanda.api.dataplane.v1.TopicService/CreateTopic (and the same prefix for Delete Topic and the other dataplane RPCs).

Workaround

Also route /redpanda.api.dataplane.v1.* to Console at the proxy, or serve Console at / on its own host. No Console config option changes the empty base URL.

主要言語
TypeScript
スター
4.3k
フォーク
431
平均マージ
3日 7時間
マージ済み PR(30日)
22

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

redpanda-data/console のほかの issue

redpanda-data/console の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。