Skip to content
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

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

Shaddoll
Copy link
Member

@Shaddoll Shaddoll commented Feb 5, 2024

What changed?
Implement StartWorkflowExecutionAsync API

Why?
To implement the new feature

How did you test it?
unit test

Potential risks

Release notes

Documentation Changes

@coveralls
Copy link

Pull Request Test Coverage Report for Build 018d7b0b-3d5b-4604-a911-c06ac1b42055

  • -58 of 120 (51.67%) changed or added relevant lines in 3 files are covered.
  • 88 unchanged lines in 17 files lost coverage.
  • Overall coverage decreased (-0.03%) to 62.686%

Changes Missing Coverage Covered Lines Changed/Added Lines %
common/messaging/kafka/producer_impl.go 0 11 0.0%
service/frontend/api/handler.go 62 85 72.94%
common/rpc.go 0 24 0.0%
Files with Coverage Reduction New Missed Lines %
service/frontend/api/handler.go 1 61.77%
service/matching/taskGC.go 1 97.37%
common/membership/hashring.go 2 84.05%
common/persistence/persistenceMetricClients.go 2 58.41%
service/matching/taskListManager.go 2 79.7%
service/matching/taskReader.go 2 84.88%
common/persistence/statsComputer.go 3 94.64%
common/task/fifo_task_scheduler.go 3 84.54%
common/persistence/nosql/nosqlplugin/cassandra/tasks.go 4 76.09%
service/history/task/transfer_standby_task_executor.go 6 86.19%
Totals Coverage Status
Change from base Build 018d7ab6-fb67-4608-80b4-8a9fbcacdfa5: -0.03%
Covered Lines: 92200
Relevant Lines: 147083

💛 - Coveralls

// propagate the headers from the context to the message
clientHeaders := common.GetClientHeaders(ctx)
header := &shared.Header{
Fields: map[string][]byte{},
Copy link
Member

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
Copy link
Member

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.

  1. do we forward headers to workflows in sync calls?
  2. 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?

Copy link
Member Author

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.

Copy link
Member

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?

@Shaddoll Shaddoll merged commit 21dc9e9 into cadence-workflow:master Feb 5, 2024
16 checks passed
@Shaddoll Shaddoll deleted the async-api branch February 5, 2024 22:02
@Shaddoll Shaddoll restored the async-api branch February 5, 2024 22:02
@Shaddoll Shaddoll deleted the async-api branch February 5, 2024 22:02
headerNames := call.HeaderNames()
headerExists := map[string]struct{}{}
for _, h := range headerNames {
headerExists[h] = struct{}{}
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants