Skip to content

Commit e5b4197

Browse files
[domain-deletion]Introduce a new API for domain deletion (#198)
1 parent e3a0287 commit e5b4197

File tree

10 files changed

+644
-157
lines changed

10 files changed

+644
-157
lines changed

go/proto/admin/v1/service.pb.yarpc.go

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/proto/api/v1/service_domain.pb.go

Lines changed: 434 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/proto/api/v1/service_domain.pb.yarpc.go

Lines changed: 125 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/proto/api/v1/service_meta.pb.yarpc.go

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/proto/api/v1/service_visibility.pb.yarpc.go

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/proto/api/v1/service_worker.pb.yarpc.go

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/proto/api/v1/service_workflow.pb.yarpc.go

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/uber/cadence/api/v1/service_domain.proto

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ service DomainAPI {
5151
// it cannot be used to start new workflow executions. Existing workflow executions will continue to run on
5252
// deprecated domains.
5353
rpc DeprecateDomain(DeprecateDomainRequest) returns (DeprecateDomainResponse);
54+
55+
// DeleteDomain permanently removes a domain record. This operation:
56+
// - Requires domain to be in DEPRECATED status
57+
// - Cannot be performed on domains with running workflows
58+
// - Is irreversible and removes all domain data
59+
// - Requires proper permissions and security token
60+
rpc DeleteDomain(DeleteDomainRequest) returns (DeleteDomainResponse);
5461
}
5562

5663
message RegisterDomainRequest {
@@ -105,6 +112,14 @@ message DeprecateDomainRequest {
105112
message DeprecateDomainResponse {
106113
}
107114

115+
message DeleteDomainRequest {
116+
string security_token = 1;
117+
string name = 2;
118+
}
119+
120+
message DeleteDomainResponse {
121+
}
122+
108123
message DescribeDomainRequest {
109124
oneof describe_by {
110125
string id = 1;

thrift/cadence.thrift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,21 @@ service WorkflowService {
9898
7: shared.AccessDeniedError accessDeniedError,
9999
)
100100

101+
/**
102+
* DeleteDomain permanently removes a domain record. This operation:
103+
* - Requires domain to be in DEPRECATED status
104+
* - Cannot be performed on domains with running workflows
105+
* - Is irreversible and removes all domain data
106+
* - Requires proper permissions and security token
107+
**/
108+
void DeleteDomain(1: shared.DeleteDomainRequest deleteRequest)
109+
throws (
110+
1: shared.BadRequestError badRequestError,
111+
2: shared.ServiceBusyError serviceBusyError,
112+
3: shared.ClientVersionNotSupportedError clientVersionNotSupportedError,
113+
4: shared.AccessDeniedError accessDeniedError,
114+
)
115+
101116
/**
102117
* RestartWorkflowExecution restarts a previous workflow
103118
* If the workflow is currently running it will terminate and restart

thrift/shared.thrift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,11 @@ struct DeprecateDomainRequest {
11441144
20: optional string securityToken
11451145
}
11461146

1147+
struct DeleteDomainRequest {
1148+
10: optional string name
1149+
20: optional string securityToken
1150+
}
1151+
11471152
struct StartWorkflowExecutionRequest {
11481153
10: optional string domain
11491154
20: optional string workflowId

0 commit comments

Comments
 (0)