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

Versioning History <-> Matching protos #6874

Merged
merged 7 commits into from
Nov 23, 2024
Merged

Conversation

ShahabT
Copy link
Collaborator

@ShahabT ShahabT commented Nov 22, 2024

What changed?

Add versioning v3 fields to the internal APIs between History and Matching so they can send needed info when tasks are scheduled or started.

Why?

How did you test it?

Potential risks

Documentation

Is hotfix candidate?

@ShahabT ShahabT requested a review from alexshtin November 22, 2024 06:32
@ShahabT ShahabT requested a review from a team as a code owner November 22, 2024 06:32
@ShahabT ShahabT requested a review from dnr November 22, 2024 20:42
@@ -120,10 +121,13 @@ message AddWorkflowTaskRequest {
// for TaskVersionDirective, which is unversioned.)
temporal.server.api.taskqueue.v1.TaskVersionDirective version_directive = 10;
temporal.server.api.taskqueue.v1.TaskForwardInfo forward_info = 11;
// Presence of this field means the workflow is versioned.
temporal.server.api.deployment.v1.WorkflowVersioningInfo workflow_versioning_info = 12;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
temporal.server.api.deployment.v1.WorkflowVersioningInfo workflow_versioning_info = 12;
temporal.server.api.deployment.v1.TargetWorkerDeployment target_worker_deployment = 12;

Copy link
Member

Choose a reason for hiding this comment

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

Rationale: when History adds task/query to matching it expect it to be executed on this pinned or unpinned worker deployment. I would also remove word "worker" but then it can be confused with "deployment we are about to rollout". If you think it is not a case, you can call it just target_deployment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pinned or unpinned worker deployment

deployment is not pinned or unpinned itself, workflow could be pinned or unpinned.

The idea is not that history gives matching the "target" deployment. It just gives matching the workflow versioning info and matching decides how to route based on that info. "Target deployment" does not fit well with unpinned because when matching does the redirect the deployment sent here would be the source of the redirect which will be confusing because "target" is almost antonym of "source".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Conclusion: add the two fields to TaskVersionDirective

@@ -74,4 +75,20 @@ message DescribeResponse {
message DeploymentWorkflowMemo {
google.protobuf.Timestamp create_time = 1;
bool is_current_deployment = 2;
Copy link
Member

Choose a reason for hiding this comment

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

isn't this effective now? I might confuse them though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no this is about deployment themselves, not the effective deployment of a particular execution.

Comment on lines 89 to 93
// Whether the workflow deployment that Matching received when the task was scheduled contains
// the task's task queue. Used by History to determine if the task redirect should affect the
// workflow.
temporal.api.deployment.v1.Deployment schedule_time_workflow_deployment_contains_task_queue = 2;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Conclusion: add fields to the record start requests directly, if needed.

…ernal-protos

# Conflicts:
#	api/deployment/v1/message.pb.go
#	api/historyservice/v1/request_response.pb.go
#	proto/internal/temporal/server/api/deployment/v1/message.proto
@ShahabT ShahabT merged commit d219f46 into versioning-3 Nov 23, 2024
7 of 8 checks passed
@ShahabT ShahabT deleted the shahab/v3-internal-protos branch November 23, 2024 02:31
dnr pushed a commit that referenced this pull request Nov 26, 2024
## What changed?
<!-- Describe what has changed in this PR -->
Add versioning v3 fields to the internal APIs between History and
Matching so they can send needed info when tasks are scheduled or
started.

## Why?
<!-- Tell your future self why have you made these changes -->

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
dnr pushed a commit that referenced this pull request Nov 26, 2024
## What changed?
<!-- Describe what has changed in this PR -->
Add versioning v3 fields to the internal APIs between History and
Matching so they can send needed info when tasks are scheduled or
started.

## Why?
<!-- Tell your future self why have you made these changes -->

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
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.

2 participants