-
Notifications
You must be signed in to change notification settings - Fork 805
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 StartWorkflowExecutionAsync API #5642
Conversation
// propagate the headers from the context to the message | ||
clientHeaders := common.GetClientHeaders(ctx) | ||
header := &shared.Header{ | ||
Fields: map[string][]byte{}, |
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.
size is known so you can do
Fields: make(map[string][]byte, len(clientHeaders)
if _, ok := headerExists[ClientIsolationGroupHeaderName]; !ok { | ||
headers[ClientIsolationGroupHeaderName] = call.Header(ClientIsolationGroupHeaderName) | ||
} | ||
return headers |
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.
this is an important part that I have some knowledge gap.
- do we forward headers to workflows in sync calls?
- by doing this allowlist based header selection would the user be disappointed when they don't see some of the custom headers in their workflow's headers?
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.
These are the headers either forwarded in sync calls or consumed in sync calls.
For example, isolation group header is used in sync calls for zonal isolation.
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.
@Groxx I believe you were looking at reducing the set of headers that were either persisted or forwarded, waht's the current status of that?
headerNames := call.HeaderNames() | ||
headerExists := map[string]struct{}{} | ||
for _, h := range headerNames { | ||
headerExists[h] = struct{}{} |
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 don't feel strongly about this, but I recall Steven making a point about headers not... technically being a map, since they support duplicates under some implementations.
What changed?
Implement StartWorkflowExecutionAsync API
Why?
To implement the new feature
How did you test it?
unit test
Potential risks
Release notes
Documentation Changes