-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AzurePipelinesCredential #2306
base: main
Are you sure you want to change the base?
Conversation
There are some TODOs that require some heavy lifting, like using either the @RickWinter @JeffreyRichter @analogrelay as we start getting more and more nested options, the API is feeling a bit unwieldy. In addition, I'm not crazy about making it obvious we use a |
C: FnMut(&Request) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + Sync + '_>> | ||
+ Send | ||
+ Sync, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@analogrelay any other good ideas here? The DX this forces (see test below; we have to pin the future) is unwieldy but I couldn't figure out a better way without taking advantage of Rust 1.85 async captures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cleaned it up a little using a BoxedFuture
, though the boxed()
"extension method" probably does more heavy lifting here. Still open to other suggestions, but this seems to be a fairly common solution I found - more than what inspired me originally.
Resolves #2030. This includes some small amount of refactoring of existing code that will be necessary sooner than later, but I didn't want to take all that on in this PR focused on
AzurePipelinesCredential
. Still, I wasn't about to repeat the same antiquated patterns.