Repository navigation
Add RPC definitions for namespace soft deletion and restoration #899
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,8 +10,10 @@ option ruby_package = "Temporalio::Api::OperatorService::V1"; | |
| option csharp_namespace = "Temporalio.Api.OperatorService.V1"; | ||
|
|
||
| import "temporal/api/enums/v1/common.proto"; | ||
| import "temporal/api/enums/v1/namespace.proto"; | ||
| import "temporal/api/nexus/v1/message.proto"; | ||
| import "google/protobuf/duration.proto"; | ||
| import "google/protobuf/timestamp.proto"; | ||
|
|
||
| // (-- Search Attribute --) | ||
|
|
||
|
|
@@ -60,6 +62,46 @@ message DeleteNamespaceResponse { | |
| string deleted_namespace = 1; | ||
| } | ||
|
|
||
| message SoftDeleteNamespaceRequest { | ||
| // Only one of namespace or namespace_id must be specified to identify namespace. | ||
| string namespace = 1; | ||
| string namespace_id = 2; | ||
| } | ||
|
|
||
| message SoftDeleteNamespaceResponse { | ||
| } | ||
|
|
||
| message RestoreNamespaceRequest { | ||
| // Only one of namespace or namespace_id must be specified to identify namespace. | ||
| string namespace = 1; | ||
| string namespace_id = 2; | ||
| } | ||
|
|
||
| message RestoreNamespaceResponse { | ||
| } | ||
|
|
||
| message DescribeNamespaceRestoreRequest { | ||
|
Contributor
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. Another option here is RestoreNamespaceRequest returning a job token(maybe the runID of restore workflow) and DescribeNamespaceRestoreRequest passing that job token. That will help us query the status of multiple past operations. But maybe that is not very important since we only have on Restore operation per namespace at a time.
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. yeah, I figured most of the time you wouldn't care about previous restore workflows. If you think this would be useful we can include this in another change. |
||
| // Only one of namespace or namespace_id must be specified to identify namespace. | ||
| string namespace = 1; | ||
| string namespace_id = 2; | ||
| } | ||
|
|
||
| message DescribeNamespaceRestoreResponse { | ||
| temporal.api.enums.v1.NamespaceRestoreState state = 1; | ||
| // Cluster that runs the restore job. | ||
| string host_cluster = 2; | ||
| google.protobuf.Timestamp start_time = 3; | ||
| // Unset while the restore is running. | ||
| google.protobuf.Timestamp close_time = 4; | ||
| // Run ID of the restore job. | ||
| string run_id = 5; | ||
| // Estimated when the refresh starts. | ||
| int64 total_execution_count = 6; | ||
| // Executions processed on every cluster. | ||
| int64 processed_execution_count = 7; | ||
| google.protobuf.Timestamp estimated_completion_time = 8; | ||
|
Contributor
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 wonder if server should calculate this. Can the client calculate this based on start_time, current_time and the progress?
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. yeah it can, I just included it so client wouldn't need to do this, and I suppose mostly irrelevant but it'd be calculated based off the clock of the server. If it's something that might be useful to OSS users I figured might as well just have server provide this. |
||
| } | ||
|
|
||
| message AddOrUpdateRemoteClusterRequest { | ||
| // Frontend Address is a cross cluster accessible address for gRPC traffic. This field is required. | ||
| string frontend_address = 1; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @yycptt should we still include this as an option?