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.
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
Implement CreateHttpManagementPayload API in Durable Worker Extension #2929
Implement CreateHttpManagementPayload API in Durable Worker Extension #2929
Changes from 5 commits
0255475
48df767
376fb69
221138f
33dbd20
7a98d3d
cdc7ca8
aa49b31
dca86d3
d7ba384
8bb1601
5d2f297
412ff58
d3cdebe
34a8979
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
why is
response
possiblynull
now?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.
SetHeadersAndGetPayload
is also invoked by the existing method CreateCheckStatusResponse, which provides an HTTP response toSetHeadersAndGetPayload
. In the new API,CreateHttpManagementPayload
, there won’t be an HTTP response parameter. Therefore, whenSetHeadersAndGetPayload
is called byCreateHttpManagementPayload
, the response will be null; however, if it’s called byCreateCheckStatusResponse
, the response will not be null.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 it allowed for this string to ever be null? If not, I'd recommend removing the
?
from thestring
type.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.
If the
DurableTaskClient
isn’t an instance ofFunctionsDurableTaskClient
, then HttpBaseUrl could be null, as it’s only an attribute ofFunctionsDurableTaskClient
. I’m not entirely sure in what scenario the DurableTaskClient wouldn’t be a FunctionsDurableTaskClient—perhaps it could happen if bindings aren’t being used. That’s why I added an exception for cases where the base URL creation fails.Check warning on line 23 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 23 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 23 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 23 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 23 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 23 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 23 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / Analyze (csharp)
Check warning on line 23 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / Analyze (csharp)
Check warning on line 23 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 23 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 32 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 32 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 32 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 32 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / Analyze (csharp)
Check warning on line 32 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 41 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 41 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 41 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 41 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / Analyze (csharp)
Check warning on line 41 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 50 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 50 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 50 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 50 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / Analyze (csharp)
Check warning on line 50 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 59 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 59 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 59 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 59 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / Analyze (csharp)
Check warning on line 59 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 68 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 68 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 68 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 68 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / Analyze (csharp)
Check warning on line 68 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 77 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 77 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 77 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 77 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / Analyze (csharp)
Check warning on line 77 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 86 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 86 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 86 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 86 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / Analyze (csharp)
Check warning on line 86 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 95 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 95 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 95 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
Check warning on line 95 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / Analyze (csharp)
Check warning on line 95 in src/Worker.Extensions.DurableTask/HttpManagementPayload.cs
GitHub Actions / build
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.
Should we replace
dynamic
withHttpManagementPayload
here, and in the calling functions?