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

Final versioning API changes #285

Merged
merged 6 commits into from
May 23, 2023
Merged

Conversation

Sushisource
Copy link
Member

What changed?

Why?

Breaking changes

@Sushisource Sushisource requested review from a team as code owners May 16, 2023 17:59
@dnr
Copy link
Member

dnr commented May 16, 2023

How does it get there? We need it in RespondActivityTaskCompletedRequest?

@Sushisource Sushisource force-pushed the activity-ver-stamps branch from ccb0b8f to 731bede Compare May 16, 2023 18:05
@Sushisource
Copy link
Member Author

How does it get there? We need it in RespondActivityTaskCompletedRequest?

🤦 added

@cretz
Copy link
Member

cretz commented May 16, 2023

Can you clarify the reasoning here? A workflow's compatibility is tied to the version it starts with (#284) right? Why do we need to record the version each task ran on? Is it just for user awareness? If so, is that worth adding this to so many history entries?

@Sushisource
Copy link
Member Author

Can you clarify the reasoning here? A workflow's compatibility is tied to the version it starts with (#284) right? Why do we need to record the version each task ran on? Is it just for user awareness? If so, is that worth adding this to so many history entries?

Yes it's for user awareness. And users can choose to have activities run on the default version overall rather than the compatible version for the workflow. In either case, you can't deduce the exact version b/c you need to know what the default (overall or compatible set) was at the time the task was taken, which can't be determined easily.

Given we're gonna limit ids to 255 characters, it seems a minimal cost.

Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

We should do the same for cancellations and failures.
Also consider adding this in the *ById APIs.

@Sushisource
Copy link
Member Author

We should do the same for cancellations and failures. Also consider adding this in the *ById APIs.

I don't see how that works given the client which completes those isn't tied to a version

@bergundy
Copy link
Member

We should do the same for cancellations and failures. Also consider adding this in the *ById APIs.

I don't see how that works given the client which completes those isn't tied to a version

It responds on behalf of a worker

@Sushisource
Copy link
Member Author

We should do the same for cancellations and failures. Also consider adding this in the *ById APIs.

I don't see how that works given the client which completes those isn't tied to a version

It responds on behalf of a worker

But those are for async completions, which happen outside of a worker.

temporal/api/common/v1/message.proto Outdated Show resolved Hide resolved
temporal/api/common/v1/message.proto Outdated Show resolved Hide resolved
temporal/api/common/v1/message.proto Outdated Show resolved Hide resolved
temporal/api/common/v1/message.proto Show resolved Hide resolved
temporal/api/history/v1/message.proto Outdated Show resolved Hide resolved
Comment on lines +282 to +283
// a version compatible with the version that this workflow most recently ran on, if such
// behavior is possible.
Copy link
Member

Choose a reason for hiding this comment

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

WDYM by "if such behavior is possible"?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not if, ex, you're starting an activity on a different queue which doesn't share your version

temporal/api/history/v1/message.proto Outdated Show resolved Hide resolved
@Sushisource Sushisource changed the title Add versioning stamp to activity task completions Final versioning API changes May 23, 2023
@Sushisource Sushisource merged commit 6d70f41 into worker-versioning May 23, 2023
@Sushisource Sushisource deleted the activity-ver-stamps branch May 23, 2023 23:30
@bergundy
Copy link
Member

@Sushisource make sure the next PR's title is "final final versioning API changes"

Sushisource added a commit that referenced this pull request May 25, 2023
* Add versioning stamp to activity task completions

* Add to failed / cancelled events

* Change use latest flag to use compat

* Add use_versioning flag to capabilities message & comment wording updates
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