Refactor Connection credential and auth wiring

オープン
#290 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

2026年11月17日 から。

  • #327 @jlrobins による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

Start by reading Connection.__init__ and the listed auth members and helpers in connection.py; trace the credential branch to see how API key, BYOIDC, and OAuth are resolved. Extract the auth responsibilities into a collaborator and update Connection to use it. Then consider the listed transport builders, service clients, user-agent and timeout properties, and endpoints; done when the behavior is preserved and the responsibilities are grouped as described.

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

説明

Connection.init is too large mostly due to figuring out credential-based logic.

  • the auth-mode members: _byoidc, _oauth, _oauth_provider, _reauth_policy, _global_credentials, _flink_auth, _surface_auth;
  • _auth_for, _send_with_reauth_policy and oauth_metrics;
  • ControlPlaneSurface, _SurfaceSpec and _basic_auth;
  • the module-level _resolve_flink_auth and _resolve_service_credentials;
  • the credential branch of init, roughly 150 of its 330 lines.

A small collaborator, say ConnectionAuth, would resolve the mode (API key, BYOIDC or oauth) once and expose flink_auth, auth_for(surface), send_policy and oauth_metrics. Connection would hold one attribute instead of seven, and the enum and spec dataclass would leave connection.py.

After doing the main work, then also consider the transport functionality to also spin out of class Connection: _build_dataplane_client, _build_controlplane_client, _service_clients, the user-agent and timeout properties, and both endpoints are a coherent group. It would fold naturally into the auth collaborator.

主要言語
Python
スター
6
フォーク
1
平均マージ
21時間 16分
マージ済み PR(30日)
29

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

confluentinc/confluent-sql のほかの issue

confluentinc/confluent-sql の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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