Skip to content

fix: allow refresh-token auth without userName#157

Merged
KaviarasuSakthivadivel merged 1 commit intomainfrom
fix/refresh-token-auth-without-username
Mar 5, 2026
Merged

fix: allow refresh-token auth without userName#157
KaviarasuSakthivadivel merged 1 commit intomainfrom
fix/refresh-token-auth-without-username

Conversation

@KaviarasuSakthivadivel
Copy link
Contributor

  • DataCloudConnection.of() accepts null userName (optional for refresh-token auth)
  • DataCloudDatabaseMetadata.getUserName() throws SQLException with state 28000 when userName is null
  • DataCloudDatasource normalizes null userName to empty string for connect path

Fixes regression where driver required userName for refresh-token auth (e.g. 'userName is marked non-null but is null').

- DataCloudConnection.of() accepts null userName (optional for refresh-token auth)
- DataCloudDatabaseMetadata.getUserName() throws SQLException with state 28000 when userName is null
- DataCloudDatasource normalizes null userName to empty string for connect path

Fixes regression where driver required userName for refresh-token auth (e.g. 'userName is marked non-null but is null').
@KaviarasuSakthivadivel KaviarasuSakthivadivel force-pushed the fix/refresh-token-auth-without-username branch from f66bf77 to 37683f1 Compare March 2, 2026 23:50
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.73%. Comparing base (cf3209d) to head (37683f1).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...salesforce/datacloud/jdbc/DataCloudDatasource.java 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #157      +/-   ##
============================================
+ Coverage     82.70%   82.73%   +0.03%     
- Complexity     1345     1347       +2     
============================================
  Files           111      111              
  Lines          4053     4055       +2     
  Branches        413      413              
============================================
+ Hits           3352     3355       +3     
  Misses          510      510              
+ Partials        191      190       -1     
Components Coverage Δ
JDBC Core 83.91% <100.00%> (+0.04%) ⬆️
JDBC Main 40.69% <0.00%> (ø)
JDBC HTTP 91.09% <ø> (ø)
JDBC Utilities 66.07% <ø> (ø)
Spark Datasource ∅ <ø> (∅)
Files with missing lines Coverage Δ
...force/datacloud/jdbc/core/DataCloudConnection.java 58.86% <ø> (+0.41%) ⬆️
...datacloud/jdbc/core/DataCloudDatabaseMetadata.java 98.34% <100.00%> (+0.02%) ⬆️
...salesforce/datacloud/jdbc/DataCloudDatasource.java 40.35% <0.00%> (ø)

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KaviarasuSakthivadivel KaviarasuSakthivadivel merged commit 97bc515 into main Mar 5, 2026
15 of 18 checks passed
@KaviarasuSakthivadivel KaviarasuSakthivadivel deleted the fix/refresh-token-auth-without-username branch March 5, 2026 21:39
KaviarasuSakthivadivel pushed a commit that referenced this pull request Mar 6, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.42.2](v0.42.1...v0.42.2)
(2026-03-05)


### Bug Fixes

* allow refresh-token auth without userName
([#157](#157))
([97bc515](97bc515))
* properly handle thread interrupts during gRPC channel shutdown
([#159](#159))
([b0a96d1](b0a96d1))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants