Skip to content

Skip loading config if auth is already explicitly configured directly#306

Merged
nfx merged 2 commits intomainfrom
fix/304
Feb 17, 2023
Merged

Skip loading config if auth is already explicitly configured directly#306
nfx merged 2 commits intomainfrom
fix/304

Conversation

@nfx
Copy link
Copy Markdown
Contributor

@nfx nfx commented Feb 16, 2023

@nfx nfx requested a review from pietern February 16, 2023 19:06
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Base: 40.87% // Head: 40.91% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (19715f3) compared to base (824895b).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #306      +/-   ##
==========================================
+ Coverage   40.87%   40.91%   +0.04%     
==========================================
  Files          46       46              
  Lines        2662     2669       +7     
==========================================
+ Hits         1088     1092       +4     
- Misses       1485     1487       +2     
- Partials       89       90       +1     
Impacted Files Coverage Δ
config/config_file.go 76.31% <100.00%> (-4.33%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Copy Markdown
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable. Please check out the comment.

Reminds me of #185.

// See: https://github.com/databricks/databricks-sdk-go/issues/304
if l.isAnyAuthConfigured(cfg) {
return nil
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only happen if cfg.Profile == "". Otherwise it may not pick up what is needed from the config file.

@nfx nfx requested a review from pietern February 17, 2023 11:45
@nfx nfx merged commit e1242ef into main Feb 17, 2023
@nfx nfx deleted the fix/304 branch February 17, 2023 11:54
nfx added a commit that referenced this pull request Feb 17, 2023
 * Change APIError to use pointer receiver ([#298](#298)).
 * Drop duplicate prefix in randomized email ([#299](#299)).
 * Expand semver pattern to be compliant with https://semver.org ([#302](#302)).
 * Fix `apierr.APIError` pointer receivers ([#307](#307)).
 * Skip loading config if auth is already explicitly configured directly ([#306](#306)).
 * Sync fixes for smallest node selection from Terraform ([#301](#301)).
 * Updated from OpenAPI spec ([#305](#305)).

Dependency updates:

 * Bump google.golang.org/api from 0.109.0 to 0.110.0 ([#303](#303)).
@nfx nfx mentioned this pull request Feb 17, 2023
nfx added a commit that referenced this pull request Feb 17, 2023
* Change APIError to use pointer receiver
([#298](#298)).
* Drop duplicate prefix in randomized email
([#299](#299)).
* Expand semver pattern to be compliant with https://semver.org
([#302](#302)).
* Fix `apierr.APIError` pointer receivers
([#307](#307)).
* Skip loading config if auth is already explicitly configured directly
([#306](#306)).
* Sync fixes for smallest node selection from Terraform
([#301](#301)).
* Updated from OpenAPI spec
([#305](#305)).

Dependency updates:

* Bump google.golang.org/api from 0.109.0 to 0.110.0
([#303](#303)).
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.

~/.databrickscfg is loaded even when direct config has precedence

3 participants