-
Notifications
You must be signed in to change notification settings - Fork 208
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
Adding dapr api token interceptor for durable task #963
Conversation
@@ -262,7 +262,7 @@ public void close() throws InterruptedException { | |||
} | |||
} | |||
|
|||
private static ClientInterceptor WORKFLOW_INTERCEPTOR = new ClientInterceptor() { | |||
public static ClientInterceptor WORKFLOW_INTERCEPTOR = new ClientInterceptor() { |
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.
Is there a way to avoid making this public? This makes this part of the SDK user facing surface with this change.
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.
Because this is an interceptor, I believe it is ok to make it public and part of the interface, as this functionality can apply to other application code where the Dapr Token might want to be added.. does that make sense @artursouza ?
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 propose we create a new class, called WorkflowGrpcInterceptor
(or something similar) in a packaged called io.dapr.workflows.internal
because that communicate that anything in that package is for internal use and is not part of our interface with the application.
So, we can use the same class in both places here but just will not be a shared instance.
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.
done
b51aa47
to
2ea0df7
Compare
31e470a
to
9c534bb
Compare
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
57c7b6b
to
1645203
Compare
Signed-off-by: salaboy <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #963 +/- ##
============================================
+ Coverage 76.54% 76.64% +0.10%
- Complexity 1467 1470 +3
============================================
Files 137 138 +1
Lines 4472 4475 +3
Branches 527 527
============================================
+ Hits 3423 3430 +7
+ Misses 763 760 -3
+ Partials 286 285 -1 ☔ View full report in Codecov by Sentry. |
Description
This PR adds the interceptor to inject the Dapr API Token to the Durable Tasks Worker, which is needed to make sure that the token gets sent by the workflows SDK.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #962
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: