Skip to content

Versioning 3 API refinements#536

Merged
carlydf merged 20 commits intoversioning-3.1from
shahab/build-id
Jan 28, 2025
Merged

Versioning 3 API refinements#536
carlydf merged 20 commits intoversioning-3.1from
shahab/build-id

Conversation

@ShahabT
Copy link
Copy Markdown
Contributor

@ShahabT ShahabT commented Jan 28, 2025

READ BEFORE MERGING: All PRs require approval by both Server AND SDK teams before merging! This is why the number of required approvals is "2" and not "1"--two reviewers from the same team is NOT sufficient. If your PR is not approved by someone in BOTH teams, it may be summarily reverted.

What changed?

  • version string fields in WorkerDeploymentOptions and WorkerDeploymentVersion changed to build_id.
  • WorkerDeploymentVersionInfo and WorkerDeploymentInfo messages completed with all the fields that will be implemented before Replay.
  • Added conflict_token to relevant APIs.
  • Now using special __unversioned__ value instead of empty string to represent unversioned workers.

Note: the following APIs are still to be added:

  • UpdateWorkerDeploymentVersionMetadata
  • DeleteWorkerDeploymentVersion
  • DeleteWorkerDeployment

Why?
Refinements based on latest design discussions within the crew.

Breaking changes

Server PR

@ShahabT ShahabT requested review from a team as code owners January 28, 2025 08:09

message DeploymentVersionTaskQueueInfo {
// All the Task Queues that have ever polled from this Deployment version.
repeated VersionTaskQueueInfo task_queue_infos = 7;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

are we including this feature, of having unique VersionTaskQueueInfos, for pre-release? IMO we should only add this when we complete server work related to this, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Shivs11, not sure if understand the question, don't we have TQ list per version already?

Comment on lines +1991 to +1998
string namespace = 1;
string deployment_name = 2;
// Must be a Versioned Build. Pass empty string to unset.
google.protobuf.StringValue version = 3;
// Required. Can be one of the following:
// - The Build ID of a Version of this Deployment that supports Versioning Behaviors (i.e. has
// `WorkflowVersioningMode==VERSIONING_BEHAVIORS`.)
// - Or, the "__unversioned__" special value, to represent all the unversioned workers (those
// with `UNVERSIONED` (or unspecified) `WorkflowVersioningMode`.)
string version = 3;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

curious: should we pass in temporal.api.deployment.v1.WorkerDeploymentVersion like other API's related to version deployment????

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think either this should be:

    string namespace = 1;
    // Required. `version.build_id` can be one of the following:
    // - The Build ID of a Version of this Deployment that supports Versioning Behaviors (i.e. has
    // `WorkflowVersioningMode==VERSIONING_BEHAVIORS`.)
    // - Or, the "__unversioned__" special value, to represent all the unversioned workers (those
    // with `UNVERSIONED` (or unspecified) `WorkflowVersioningMode`.)
    temporal.api.deployment.v1.WorkerDeploymentVersion version = 2;
    bytes conflict_token = 3;
    ...

or:

    string namespace = 1;
    string deployment_name = 2;
    // Required. Can be one of the following:
    // - The Build ID of a Version of this Deployment that supports Versioning Behaviors (i.e. has
    // `WorkflowVersioningMode==VERSIONING_BEHAVIORS`.)
    // - Or, the "__unversioned__" special value, to represent all the unversioned workers (those
    // with `UNVERSIONED` (or unspecified) `WorkflowVersioningMode`.)
    string build_id = 3;
    bytes conflict_token = 4;
    ...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'll just go with build_id for now since I think it makes sense and it's the smaller change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

build_id sounds good. I hesitate to use WorkerDeploymentVersion message with its build ID being "unversioned" because that is no longer representing a single Worker Deployment Version.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My thinking is that these APIs are split into:

  • APIs that act on the Worker Deployment
    • DescribeWorkerDeployment
    • ListWorkerDeployments
    • SetWorkerDeploymentCurrentVersion
    • SetWorkerDeploymentRampingVersion
  • APIs that act on the Worker Deployment Version
    • DescribeWorkerDeploymentVersion

and right now the APIs that act on the Worker Deployment take in a string deployment_name and a string build_id if necessary. The APIs that act on the WorkerDeploymentVersion take in a WorkerDeploymentVersion version.

Copy link
Copy Markdown
Contributor

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Approving under the assumption that this is not making backwards incompatible alterations with main.

Comment on lines +1991 to +1998
string namespace = 1;
string deployment_name = 2;
// Must be a Versioned Build. Pass empty string to unset.
google.protobuf.StringValue version = 3;
// Required. Can be one of the following:
// - The Build ID of a Version of this Deployment that supports Versioning Behaviors (i.e. has
// `WorkflowVersioningMode==VERSIONING_BEHAVIORS`.)
// - Or, the "__unversioned__" special value, to represent all the unversioned workers (those
// with `UNVERSIONED` (or unspecified) `WorkflowVersioningMode`.)
string version = 3;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think either this should be:

    string namespace = 1;
    // Required. `version.build_id` can be one of the following:
    // - The Build ID of a Version of this Deployment that supports Versioning Behaviors (i.e. has
    // `WorkflowVersioningMode==VERSIONING_BEHAVIORS`.)
    // - Or, the "__unversioned__" special value, to represent all the unversioned workers (those
    // with `UNVERSIONED` (or unspecified) `WorkflowVersioningMode`.)
    temporal.api.deployment.v1.WorkerDeploymentVersion version = 2;
    bytes conflict_token = 3;
    ...

or:

    string namespace = 1;
    string deployment_name = 2;
    // Required. Can be one of the following:
    // - The Build ID of a Version of this Deployment that supports Versioning Behaviors (i.e. has
    // `WorkflowVersioningMode==VERSIONING_BEHAVIORS`.)
    // - Or, the "__unversioned__" special value, to represent all the unversioned workers (those
    // with `UNVERSIONED` (or unspecified) `WorkflowVersioningMode`.)
    string build_id = 3;
    bytes conflict_token = 4;
    ...

Comment on lines 2042 to 2043
string previous_version = 2;
// The ramping version percentage before executing this operation.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you want to call this previous_build_id ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes! fixed for SetCurrent resp and SetRamping resp

@carlydf carlydf merged commit 675ece7 into versioning-3.1 Jan 28, 2025
@carlydf carlydf deleted the shahab/build-id branch January 28, 2025 21:40
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