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

Add workflow info details in QueryToken #6265

Conversation

3vilhamster
Copy link
Contributor

@3vilhamster 3vilhamster commented Sep 4, 2024

What changed?
I've added workflow context fields to QueryToken so it can be accessed during request/response processing.

Why?
We want to be able to identify concrete workflow executions when RespondQueryTaskCompleted fails. To achieve this, we need to propagate workflow information.
The easiest way is to put this information into QueryToken. The fields are optional and, in the worst case, will be empty as they are now.

How did you test it?
Unit tests.

However, the matching service is missing tests related to Query processing. I'll try adding tests in this PR or creating a separate PR to address this.

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 73.07%. Comparing base (f6e4360) to head (7a36f88).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
service/matching/handler/engine.go 0.00% 6 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
common/json_task_token_serializer.go 100.00% <ø> (ø)
common/taskTokenSerializerInterfaces.go 0.00% <ø> (ø)
service/frontend/api/handler.go 65.57% <100.00%> (ø)
service/matching/handler/engine.go 79.89% <0.00%> (-0.31%) ⬇️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6e4360...7a36f88. Read the comment docs.

@@ -1722,8 +1722,8 @@ func (wh *WorkflowHandler) RespondQueryTaskCompleted(
sizeLimitError,
queryTaskToken.DomainID,
domainName,
"",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm this looked weird

Copy link
Contributor

@ketsiambaku ketsiambaku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@3vilhamster
Copy link
Contributor Author

I'll merge it without unit tests. We will have to introduce an integration test in matching that will cover QueryTasks.
The functionality is tested as a part of integration_tests for all persistence options.

@3vilhamster 3vilhamster merged commit 0f66adc into cadence-workflow:master Sep 5, 2024
19 of 20 checks passed
@3vilhamster 3vilhamster deleted the add-workflow-info-in-query-tokens branch September 5, 2024 18:15
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.

3 participants