-
Notifications
You must be signed in to change notification settings - Fork 83
Add Deployment Pre-Release APIs #479
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
Changes from all commits
aad202a
12ec5b2
bf6ec80
a432c29
d3bd873
6421777
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| // The MIT License | ||
| // | ||
| // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. | ||
| // | ||
| // Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| // of this software and associated documentation files (the "Software"), to deal | ||
| // in the Software without restriction, including without limitation the rights | ||
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| // copies of the Software, and to permit persons to whom the Software is | ||
| // furnished to do so, subject to the following conditions: | ||
| // | ||
| // The above copyright notice and this permission notice shall be included in | ||
| // all copies or substantial portions of the Software. | ||
| // | ||
| // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| // THE SOFTWARE. | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package temporal.api.deployment.v1; | ||
|
|
||
| option go_package = "go.temporal.io/api/deployment/v1;deployment"; | ||
| option java_package = "io.temporal.api.deployment.v1"; | ||
| option java_multiple_files = true; | ||
| option java_outer_classname = "MessageProto"; | ||
| option ruby_package = "Temporalio::Api::Deployment::V1"; | ||
| option csharp_namespace = "Temporalio.Api.Deployment.V1"; | ||
|
|
||
| import "google/protobuf/timestamp.proto"; | ||
|
|
||
| import "temporal/api/enums/v1/task_queue.proto"; | ||
| import "temporal/api/common/v1/message.proto"; | ||
|
|
||
| // `Deployment` identifies a deployment of Temporal workers. The combination of deployment series | ||
| // name + build ID serves as the identifier. User can use `WorkerDeploymentOptions` in their worker | ||
| // programs to specify these values. | ||
| message Deployment { | ||
| // Different versions of the same worker service/application are related together by having a | ||
| // shared series name. | ||
| // Out of all deployments of a series, one can be designated as the current deployment, which | ||
| // receives new workflow executions and new tasks of workflows with | ||
| // `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior. | ||
| string series_name = 1; | ||
| // Build ID changes with each version of the worker when the worker program code and/or config | ||
| // changes. | ||
| string build_id = 2; | ||
| } | ||
|
|
||
| // `DeploymentInfo` holds information about a deployment. Deployment information is tracked | ||
| // automatically by server as soon as the first poll from that deployment reaches the server. There | ||
| // can be multiple task queue workers in a single deployment which are listed in this message. | ||
| message DeploymentInfo { | ||
| Deployment deployment = 1; | ||
| google.protobuf.Timestamp create_time = 2; | ||
| repeated TaskQueueInfo task_queue_infos = 3; | ||
| // A user-defined set of key-values. Can be updated as part of write operations to the | ||
| // deployment, such as `SetCurrentDeployment`. | ||
| map<string, temporal.api.common.v1.Payload> metadata = 4; | ||
| // If this deployment is the current deployment of its deployment series. | ||
| bool is_current = 5; | ||
|
|
||
| message TaskQueueInfo { | ||
| string name = 1; | ||
| temporal.api.enums.v1.TaskQueueType type = 2; | ||
| // When server saw the first poller for this task queue in this deployment. | ||
| google.protobuf.Timestamp first_poller_time = 3; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would add last_poller_time if technically possible. Can be updated lazily.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 That's possible and I agree we should have it. Will create a task for it (can't do right away because of more technical work).
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it belongs here. As this time is per build id. Or this message should be renamed to the DeploymentTaskQueueInfo
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The message is already nested in
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Message names are top level. So someone looking at the name will not see where it is used.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mfateev This message name is nested, not top level. Are suggesting we should not have nested message definitions and only top level? |
||
| } | ||
| } | ||
|
|
||
| // Used as part of Deployment write APIs to update metadata attached to a deployment. | ||
| message UpdateDeploymentMetadata { | ||
| map<string, temporal.api.common.v1.Payload> upsert_entries = 1; | ||
| // List of keys to remove from the metadata. | ||
| repeated string remove_entries = 2; | ||
| } | ||
|
|
||
| // DeploymentListInfo is an abbreviates set of fields from DeploymentInfo that's returned in | ||
| // ListDeployments. | ||
| message DeploymentListInfo { | ||
| deployment.v1.Deployment deployment = 1; | ||
| google.protobuf.Timestamp create_time = 2; | ||
| // If this deployment is the current deployment of its deployment series. | ||
| bool is_current = 3; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| // The MIT License | ||
| // | ||
| // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. | ||
| // | ||
| // Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| // of this software and associated documentation files (the "Software"), to deal | ||
| // in the Software without restriction, including without limitation the rights | ||
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| // copies of the Software, and to permit persons to whom the Software is | ||
| // furnished to do so, subject to the following conditions: | ||
| // | ||
| // The above copyright notice and this permission notice shall be included in | ||
| // all copies or substantial portions of the Software. | ||
| // | ||
| // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| // THE SOFTWARE. | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package temporal.api.enums.v1; | ||
|
|
||
| option go_package = "go.temporal.io/api/enums/v1;enums"; | ||
| option java_package = "io.temporal.api.enums.v1"; | ||
| option java_multiple_files = true; | ||
| option java_outer_classname = "DeploymentProto"; | ||
| option ruby_package = "Temporalio::Api::Enums::V1"; | ||
| option csharp_namespace = "Temporalio.Api.Enums.V1"; | ||
|
|
||
| // Specify the reachability level for a deployment so users can decide if it is time to | ||
| // decommission the deployment. | ||
| enum DeploymentReachability { | ||
| // Reachability level is not specified. | ||
| DEPLOYMENT_REACHABILITY_UNSPECIFIED = 0; | ||
| // The deployment is reachable by new and/or open workflows. The deployment cannot be | ||
| // decommissioned safely. | ||
| DEPLOYMENT_REACHABILITY_REACHABLE = 1; | ||
| // The deployment is not reachable by new or open workflows, but might be still needed by | ||
| // Queries sent to closed workflows. The deployment can be decommissioned safely if user does | ||
| // not query closed workflows. | ||
| DEPLOYMENT_REACHABILITY_CLOSED_WORKFLOWS_ONLY = 2; | ||
| // The deployment is not reachable by any workflow because all the workflows who needed this | ||
| // deployment went out of retention period. The deployment can be decommissioned safely. | ||
| DEPLOYMENT_REACHABILITY_UNREACHABLE = 3; | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.