-
Notifications
You must be signed in to change notification settings - Fork 831
[domain-deletion]Introduce a new API for domain deletion #6905
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
[domain-deletion]Introduce a new API for domain deletion #6905
Conversation
@@ -143,9 +143,24 @@ func (wh *WorkflowHandler) UpdateDomain( | |||
return resp, nil | |||
} | |||
|
|||
// DeprecateDomain us used to update status of a registered domain to DEPRECATED. Once the domain is deprecated | |||
// DeleteDomain permanently removes a domain record. This operation: | |||
// - Requires domain to be in DEPRECATED status |
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.
Where does this check exists? Is there a test on this?
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.
yes, it was added later under service/frontend/api/domain_handlers.go
DeleteDomain()
expectedError string | ||
}{ | ||
{ | ||
name: "success - delete deprecated domain", |
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.
nit:
It is better to call subtests with underscope:
success_delete_deprecated_domain
This way, when a test fails, you can easily find the failed case.
When you use spaces and dashes, it will not be apparent which test case caused the failure.
And I think it will look like:
TestDeleteDomain/success_-_delete_deprecated_domain
Detailed Description
[In-depth description of the changes made to the schema or interfaces, specifying new fields, removed fields, or modified data structures]
- Domain not found
- Domain not in deprecated state
- Domain has existing workflow history
- Deletion operation failures
Added unit tests covering success and failure cases
Impact Analysis
Backward Compatibility:
The change is backward compatible as it only adds a new API endpoint
Existing domain operations (Register, Update, Deprecate) remain unchanged
No changes to existing data structures or schemas
Forward Compatibility:
The change is forward compatible
New clients can use the DeleteDomain API while old clients continue to work with existing APIs
No breaking changes to existing interfaces or data structures
Testing Plan
Rollout Plan