Migrate Azure MSI & Metadata Service token sources to httpclient and add 100% test coverage#709
Merged
Migrate Azure MSI & Metadata Service token sources to httpclient and add 100% test coverage#709
httpclient and add 100% test coverage#709Conversation
This was referenced Nov 28, 2023
8ac91f9 to
fdc7906
Compare
httpclient and add 90% test coveragehttpclient and add 100% test coverage
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #709 +/- ##
==========================================
+ Coverage 16.86% 17.57% +0.71%
==========================================
Files 103 103
Lines 14128 14188 +60
==========================================
+ Hits 2383 2494 +111
+ Misses 11536 11489 -47
+ Partials 209 205 -4 ☔ View full report in Codecov by Sentry. |
Contributor
Author
mgyucht
reviewed
Nov 29, 2023
Contributor
mgyucht
left a comment
There was a problem hiding this comment.
Mostly looks good, a couple comments/suggestions/questions.
mgyucht
approved these changes
Nov 30, 2023
Contributor
mgyucht
left a comment
There was a problem hiding this comment.
After offline discussion, LGTM, please add docs for that one parameter and feel free to merge.
This PR improves the stability for Azure MSI authentication by adopting the httpclient transport. add 100% coverage for MSI & metadata-service .. .. ..
fa1ff7d to
3e96fd4
Compare
Contributor
Author
|
tested as |
mgyucht
added a commit
that referenced
this pull request
Dec 7, 2023
This is a bugfix release, including a fix correcting issues with OAuth flows, due to a bug with the propagation of the response status in `httpclient`'s `RoundTrip()` implementation. This fixes the `failed during request visitor: token: oauth2: cannot fetch token: Response: {...}` error.
All fixes:
* Migrate Azure MSI & Metadata Service token sources to `httpclient` and add 100% test coverage ([#709](#709)).
* Added `config.NewAzureCliTokenSource` and `config.NewAzureMsiTokenSource` constructors ([#727](#727)).
* Use per-config refresh context for OAuth tokens ([#728](#728)).
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 7, 2023
This is a bugfix release, including a fix correcting issues with OAuth
flows, due to a bug with the propagation of the response status in
`httpclient`'s `RoundTrip()` implementation. This fixes the `failed
during request visitor: token: oauth2: cannot fetch token: Response:
{...}` error.
All fixes:
* Migrate Azure MSI & Metadata Service token sources to `httpclient` and
add 100% test coverage
([#709](#709)).
* Added `config.NewAzureCliTokenSource` and
`config.NewAzureMsiTokenSource` constructors
([#727](#727)).
* Use per-config refresh context for OAuth tokens
([#728](#728)).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This PR improves the stability for Azure MSI authentication by adopting the httpclient transport.
Needs two PRs merged first:
qa.HTTPFixturesto faster transport-level stubs #708DatabricksEnvironmentand fix Azure MSI auth from ACR, where IMDS doesn't give host environment information #700