Skip to content

[branch-1.3] Fix OAuth profile type option key mismatch in Spark options - #868

Merged
littlegrasscao merged 1 commit into
branch-1.3from
sucao/fix-oauth-1.3
Mar 26, 2026
Merged

littlegrasscao merged 1 commit into
branch-1.3from
sucao/fix-oauth-1.3

Conversation

@littlegrasscao

Copy link
Copy Markdown
Collaborator

Summary

Backport of #866 to branch-1.3.

  • The Spark option key for profile type was shareCredentialsType, but the JSON deserializer (DeltaSharingProfileDeserializer) reads the type field. This mismatch caused OAuth profiles configured via .option("shareCredentialsType", "oauth_client_credentials") to silently fall back to bearer_token, failing with "bearer_token only supports version 1".
  • Rename the option from shareCredentialsType to type so it matches the JSON field name used by .share profile files and the deserializer.
  • Update the Python client (delta_sharing.py) to pass type instead of shareCredentialsType.
  • Add end-to-end round-trip tests verifying that Spark options correctly produce both BearerTokenDeltaSharingProfile and OAuthClientCredentialsDeltaSharingProfile.

Test plan

  • DeltaSharingOptionsSuite — 3 new round-trip tests (bearer_token, oauth, default behavior)
  • DeltaSharingOptionsProfileProviderSuite — existing tests pass

The Spark option key for profile type was `shareCredentialsType`, but the
JSON deserializer in DeltaSharingProfileDeserializer reads the `type` field.
This caused OAuth profiles set via Spark options to silently fall back to
bearer_token, failing with "bearer_token only supports version 1".

Rename the option from `shareCredentialsType` to `type` so the key matches
the JSON field name used by .share profile files and the deserializer.
@littlegrasscao
littlegrasscao merged commit 316202d into branch-1.3 Mar 26, 2026
7 checks passed
@littlegrasscao
littlegrasscao deleted the sucao/fix-oauth-1.3 branch April 2, 2026 01:01
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.

2 participants