Closed famarting closed 6 months ago
Attention: 19 lines
in your changes are missing coverage. Please review.
Comparison is base (
a65edda
) 70.26% compared to head (476a3f2
) 70.11%.
Files | Patch % | Lines |
---|---|---|
client/client.go | 59.52% | 15 Missing and 2 partials :warning: |
client/actor.go | 71.42% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Should I be able to explicitly pass a custom token?
that was already possible, and still will be, with the function WithAuthToken
Description
This PR refactors the way the API Token is handled, now instead of having to manually set to token in the context by using
withAuthToken
there are two interceptors that will set the token automatically.This new approach will guarantee that every new function added to the client will automatically make use of the api token if its set, unlike the current approach, where actually there were a few functions that were not using
withAuthToken
and therefore wouldn't work properly if the api token was set...Another example of the benefits and the need of this refactor is the use of the grpc connection that is being made in this PR https://github.com/dapr/go-sdk/pull/487 , since for workflows the grpc connection is used directly and we won't control the calls made by that durabletask grpc client we need to transparently set the api token i.e with the interceptors I added
Issue reference
Please reference the issue this PR will close: #[issue number]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: