Skip to content

DescribeWorkerDeployment proto changes#523

Merged
Shivs11 merged 5 commits intoversioning-3.1from
shivam/versioning-3.1-worker-deployment-info
Jan 21, 2025
Merged

DescribeWorkerDeployment proto changes#523
Shivs11 merged 5 commits intoversioning-3.1from
shivam/versioning-3.1-worker-deployment-info

Conversation

@Shivs11
Copy link
Copy Markdown
Member

@Shivs11 Shivs11 commented Jan 20, 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?

  • Proto changes to add DescribeWorkerDeployment

Why?

  • versioning-3.1

Breaking changes

  • no, going into feature branch

Server PR

  • Server PR in development.

@Shivs11 Shivs11 requested review from a team as code owners January 20, 2025 18:01
@Shivs11 Shivs11 requested review from ShahabT and carlydf January 20, 2025 18:01
Comment on lines +158 to +160
// - It does not recieve new executions (see WorkerDeploymentVersionInfo.accepts_new_executions)
// - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status)
// - It is drained (see WorkerDeploymentVersionInfo.drainage_status)
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.

fix indentation on these lines

Comment on lines +158 to +160
// - It does not recieve new executions (see WorkerDeploymentVersionInfo.accepts_new_executions)
// - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status)
// - It is drained (see WorkerDeploymentVersionInfo.drainage_status)
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.

the fields referred to don't exist yet? I see a TODO.. is that going to come in this PR or later?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yep - those fields will be coming in later when we start working on them

}

message DescribeWorkerDeploymentResponse {
deployment.v1.WorkerDeploymentInfo deployment_info = 1;
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.

We always use the fully qualified name when referring to other pacakges (e.g. temporal.api.deployment.v1...). I see some other deployment-related messages didn't do that but let's do it consistently going forward

@Shivs11 Shivs11 requested a review from dnr January 20, 2025 23:30
Comment on lines +163 to +164
// Identity of the client that last edited the routing config for this Worker Deployment.
string last_editor_identity = 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.

If current/ramping version are added later, this field is better to be added with them because they change together.

bool accepts_new_executions = 4;
}

// TODO (Shivam): WorkerDeploymentVersionSummary.PollerStatus + TaskQueueInfo + RampingInfo +
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.

It seems appropriate to add create_time in the first iteration because no extra logic/data is needed to populate that.


rpc DescribeWorkerDeployment (DescribeWorkerDeploymentRequest) returns (DescribeWorkerDeploymentResponse) {
option (google.api.http) = {
get: "/namespaces/{namespace}/worker-deployment/{deployment_name}/describe-worker-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.

No need for the /describe-worker-deployment part. Describe is usually a simple GET on the resource top level endpoint. See DescribeTaskQueue as an example.

Suggested change
get: "/namespaces/{namespace}/worker-deployment/{deployment_name}/describe-worker-deployment"
get: "/namespaces/{namespace}/worker-deployment/{deployment_name}"

Comment on lines +868 to +871
get: "/namespaces/{namespace}/worker-deployment/{deployment_name}"
additional_bindings {
get: "/api/v1/namespaces/{namespace}/worker-deployment/{deployment_name}"
}
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.

Suggested change
get: "/namespaces/{namespace}/worker-deployment/{deployment_name}"
additional_bindings {
get: "/api/v1/namespaces/{namespace}/worker-deployment/{deployment_name}"
}
get: "/namespaces/{namespace}/worker-deployments/{deployment_name}"
additional_bindings {
get: "/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}"
}

Prefer plurals

@Shivs11 Shivs11 requested a review from cretz January 21, 2025 17:50
@Shivs11 Shivs11 merged commit 5d87060 into versioning-3.1 Jan 21, 2025
@Shivs11 Shivs11 deleted the shivam/versioning-3.1-worker-deployment-info branch January 21, 2025 20:16
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