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

Aperta
#1,616 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
577
Fork
229
Merge medio
40m
PR unite (30g)
12

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di databricks/databricks-sdk-py

Tutte le issue di databricks/databricks-sdk-py

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.