[ISSUE] FeatureEngineeringClient does not authenticate using OAuth profile from .dbksconfig while WorkspaceClient works

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

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

まだ誰も着手していません。

評価

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

調査の方向性

Start by tracing how FeatureEngineeringClient constructs or obtains its Databricks SDK client and resolves credentials, then compare that path with WorkspaceClient's OAuth profile handling. Reproduce with the supplied .dbksconfig profile and compare the failing Feature Engineering call with the working WorkspaceClient call. Done means FeatureEngineeringClient authenticates successfully using the same profile; the issue does not name relevant source files or tests.

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

説明

FeatureEngineeringClient does not authenticate using OAuth profile from .dbksconfig while WorkspaceClient works

Description

FeatureEngineeringClient cannot authenticate when credentials are provided through a Databricks OAuth profile configured in .dbksconfig and selected via environment variables/profile resolution. The client works with SPARK_REMOTE environment variable.

The same authentication configuration works correctly with both WorkspaceClient. However, Feature Engineering API calls fail with:

{
  "error_code": 401,
  "message": "Credential was not sent or was of an unsupported type for this API. [ReqId: 53b397d5-e1f2-406c-b3fc-1805a73e19fc]"
}

Additionally, the behavior appears consistent with the issue discussed in the Databricks Community thread below:

https://community.databricks.com/t5/data-engineering/featureengineeringclient-and-databricks-connect/td-p/96918

This suggests that FeatureEngineeringClient may not be resolving OAuth credentials from profiles in the same way as WorkspaceClient and Databricks Connect.


Reproduction

A minimal example is shown below.

from databricks.sdk import WorkspaceClient
from databricks.feature_engineering import FeatureEngineeringClient
import os

os.environ["DATABRICKS_CONFIG_PROFILE"] = "DEFAULT"  # or your profile name
# Uses OAuth profile from .dbksconfig
w = WorkspaceClient()

# Works correctly
print(w.current_user.me())

# Fails with 401
fe = FeatureEngineeringClient()

fe.read_table(
    name="<catalog>.<schema>.<feature_table>"
)

Authentication is configured through .dbksconfig and selected through the standard Databricks SDK profile/environment-variable mechanism.

For comparison, Databricks Connect using the same profile successfully creates a Spark session and executes queries.


Expected behavior

FeatureEngineeringClient should resolve credentials from the same OAuth profile mechanism supported by WorkspaceClient and Databricks Connect.

If the profile is valid and successfully used by the Databricks SDK, Feature Engineering operations should authenticate successfully without requiring alternative authentication methods or additional configuration.


Is it a regression?

Unknown.

This is the first version tested.

Observed environment:

  • databricks-feature-engineering==0.18.2
  • databricks-sdk==0.154.0
  • databricks-connect==15.4.26
  • mlflow==3.4.0

Debug Logs

Authentication failure returned by the API:

{
  "error_code": 401,
  "message": "Credential was not sent or was of an unsupported type for this API. [ReqId: 53b397d5-e1f2-406c-b3fc-1805a73e19fc]"
}

Additional DEBUG logs can be provided if required.


Other Information

  • OS: Windows 11
  • Python: 3.12.0
  • databricks-feature-engineering: 0.18.2
  • databricks-sdk: 0.154.0
  • databricks-connect: 15.4.26
  • mlflow: 3.4.0

Additional context

The following components work successfully using the same OAuth profile:

  • databricks.sdk.WorkspaceClient
  • Databricks Connect (spark.remote)

Only Feature Engineering API calls fail with an authentication error.

The behavior may indicate that FeatureEngineeringClient is not fully honoring the Databricks SDK OAuth profile configuration or is using a different credential resolution path.

主要言語
Python
スター
577
フォーク
229
平均マージ
40分
マージ済み PR(30日)
12

環境構築

はじめの一歩

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

databricks/databricks-sdk-py のほかの issue

databricks/databricks-sdk-py の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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