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 use_latest_build_id for activities, child workflows, continue-as-new #4347

Merged
merged 11 commits into from May 18, 2023

Conversation

dnr
Copy link
Member

@dnr dnr commented May 16, 2023

What changed?
Thread use_latest_build_id and build stamps where needed, respect use_latest_build_id.

Why?
Implement more feature

How did you test it?
Not yet

Potential risks

Is hotfix candidate?

@dnr dnr requested review from bergundy and Sushisource May 16, 2023 06:39
@dnr dnr requested a review from a team as a code owner May 16, 2023 06:39
Copy link
Member

@Sushisource Sushisource left a comment

Choose a reason for hiding this comment

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

Makes sense!

common/util.go Outdated Show resolved Hide resolved
@@ -2149,6 +2162,9 @@ func (ms *MutableStateImpl) ReplicateActivityTaskScheduledEvent(
scheduledEventID := event.GetEventId()
scheduleToCloseTimeout := attributes.GetScheduleToCloseTimeout()

// always use latest build id if activity is on a different task queue than the workflow
useLatestBuildId := attributes.UseLatestBuildId || attributes.TaskQueue.GetName() != ms.executionInfo.TaskQueue
Copy link
Member

Choose a reason for hiding this comment

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

Caller concern, a binary may include multiple workers polling on different task queues.

Copy link
Member Author

Choose a reason for hiding this comment

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

can you elaborate? I'm not sure how what you said relates to the code

Copy link
Member

Choose a reason for hiding this comment

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

Respect the SDK's decision and don't override it server side.

Copy link
Member

Choose a reason for hiding this comment

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

	// always use latest build id if activity is on a different task queue than the workflow

Should be:
Use the latest build ID if indicated by the SDK.

Copy link
Member Author

Choose a reason for hiding this comment

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

I got rid of all the task queue checks. I still have some concern about making the default behavior the least surprising thing, but it's up to the sdk now

@dnr dnr merged commit 6b25035 into temporalio:worker-versioning May 18, 2023
10 checks passed
@dnr dnr deleted the ver13 branch May 18, 2023 00:47
dnr added a commit that referenced this pull request May 26, 2023
…ue-as-new (#4347)

Note: This commit came from a feature branch and is not expected to build.
dnr added a commit to dnr/temporal that referenced this pull request May 26, 2023
…ue-as-new (temporalio#4347)

Note: This commit came from a feature branch and is not expected to build.
dnr added a commit that referenced this pull request May 26, 2023
…ue-as-new (#4347)

Note: This commit came from a feature branch and is not expected to build.
dnr added a commit that referenced this pull request May 26, 2023
…ue-as-new (#4347)

Note: This commit came from a feature branch and is not expected to build.
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.

None yet

3 participants