Skip to content

Conversation

@ShahabT
Copy link
Contributor

@ShahabT ShahabT commented Nov 20, 2024

What changed?
Deprecate WorkerVersionStamp and replace it with Deployment and Versioning Behavior in all APIs.

Why?
WorkerVersionStamp does not fit well with the versioning 3 concepts and terminology.

Breaking changes
SDKs that support versioning 3 need to populate Deployment in the task completion/failure responses. Values populated in WorkerVersionStamp will still be honored if Deployment is not set.

Server PR

@ShahabT ShahabT requested review from a team as code owners November 20, 2024 05:17
Comment on lines -365 to -367
// Must be set when versioning-3 is used (i.e. `worker_version_stamp.use_versioning` is `true`
// and `worker_version_stamp.deployment_series_name` is provided).
temporal.api.enums.v1.VersioningBehavior versioning_behavior = 15;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@antlai-temporal looking at the comment for versioning_behavior, I realized the stamp is not serving us well is v3 and is basically a twisted way of representing Deployment and versioned/unversioned boolean. I think Deployment and VersioningBehavior is perfect for these responsibilities, hence I'm deprecating the stamp. Please consider setting the deployment field instead of the stamp when v3 is used (WorkerDeploymentOptions is set).

@ShahabT
Copy link
Contributor Author

ShahabT commented Nov 20, 2024

@antlai-temporal merging this to unblock server. Will address change requests in a separate PR, if any.

@ShahabT ShahabT merged commit ad41fcf into versioning-3 Nov 20, 2024
1 check passed
@ShahabT ShahabT deleted the shahab/clean-stamps branch November 20, 2024 05:29
Comment on lines +137 to +140
// Must be sent if user has set a deployment series name (versioning-3).
// Deprecated. SDK should return `Deployment` in the requests to server instead of populating
// this field.
string deployment_series_name = 4;
Copy link
Member

Choose a reason for hiding this comment

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

Wait why is this both newly added and already deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because we first added it. then I removed it in #483, then I realized it will break recent SDK changes that @antlai-temporal made in versioning-3 branch, then I added back in this PR as deprecated.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think if we don't need it and it is just in my branch we could just delete it...

Comment on lines +354 to 355
// Deprecated. Use `deployment` and `versioning_behavior` instead.
temporal.api.common.v1.WorkerVersionStamp worker_version_stamp = 10;
Copy link
Member

@Sushisource Sushisource Nov 20, 2024

Choose a reason for hiding this comment

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

I'm guessing we don't do this consistently everywhere, but, I think deprecation warnings really should go first at the top of the comment.

Also we probably want to use the official [deprecated = true] tag: https://protobuf.dev/programming-guides/proto3/

(I'd say let's apply this everywhere we're deprecating things for this)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good to know. I'll add the official deprecation tag in my next PR.

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.

5 participants