-
Notifications
You must be signed in to change notification settings - Fork 22
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
#2823: update delete domain process - [MS] #3185
Merged
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
7cf8b8a
Delete contacts and subdomains on delete domain
Matt-Spence 6891f5c
Rework delete from epp
Matt-Spence ede01e3
Merge remote-tracking branch 'origin/main' into ms/2823-update-delete…
Matt-Spence b5e4f8b
update deletion process and tests
Matt-Spence 27868a0
minor fixes to tests
Matt-Spence 9437b73
minor test fix
Matt-Spence 74eeae1
Merge remote-tracking branch 'origin/main' into ms/2823-update-delete…
Matt-Spence 89253a1
linter fixes
Matt-Spence f25bb9b
include hostname in error messages for shared hosts
Matt-Spence dad4226
add back in less console noise decorator
Matt-Spence 6fdb763
admin fix
Matt-Spence e8fdf0c
revert accidental admin change
Matt-Spence 3f79b56
temp test changes
Matt-Spence 2e84171
fix a test
Matt-Spence 43484ec
Merge remote-tracking branch 'origin/main' into ms/2823-update-delete…
Matt-Spence aaaa4f2
fix broken test
Matt-Spence 8b473d5
add error message to registry errors
Matt-Spence 3dbafb5
up log level
Matt-Spence a9710da
more debugging
Matt-Spence 5e7823a
more debugging
Matt-Spence e87c4f7
use update function to delete hosts
Matt-Spence 1a9b671
consolidate delete domain function
Matt-Spence e0eb70a
working _delete_domain
dave-kennedy-ecs 533e577
refactor delete to use same logic as nameserver setter
Matt-Spence 51da456
fix tests
Matt-Spence 1fb8b22
pushing changes to pull on another device
Matt-Spence 63c2b79
clean up
Matt-Spence 21007ce
review changes
Matt-Spence 32789fa
review changes and linting
Matt-Spence db4f9c5
Merge branch 'ms/2823-update-delete-domain-process' of https://github…
Matt-Spence bb2072d
log exception in nameserver setter.
Matt-Spence f2d7be1
Merge remote-tracking branch 'origin' into ms/2823-update-delete-doma…
Matt-Spence 0178d57
linter fixes
Matt-Spence f039f31
linter fixes
Matt-Spence 8016dd9
Merge branch 'main' into ms/2823-update-delete-domain-process
Matt-Spence File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -750,7 +750,12 @@ def nameservers(self, hosts: list[tuple[str, list]]): | |
|
||
successTotalNameservers = len(oldNameservers) - deleteCount + addToDomainCount | ||
|
||
self._delete_hosts_if_not_used(hostsToDelete=deleted_values) | ||
try: | ||
self._delete_hosts_if_not_used(hostsToDelete=deleted_values) | ||
except: | ||
# the error will be logged in the erring function and we don't | ||
# need this part to succeed in order to continue.s | ||
pass | ||
|
||
if successTotalNameservers < 2: | ||
try: | ||
|
@@ -1065,6 +1070,8 @@ def _delete_domain(self): | |
if responseCode != ErrorCode.COMMAND_COMPLETED_SUCCESSFULLY: | ||
raise NameserverError(code=nsErrorCodes.BAD_DATA) | ||
|
||
# addAndRemoveHostsFromDomain removes the hosts from the domain object, | ||
# but we still need to delete the object themselves | ||
self._delete_hosts_if_not_used(hostsToDelete=deleted_values) | ||
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. (Nitpick / optional) A comment explaining as to why delete hosts is called after 1062 would be a nice to have but not needed 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. Good idea |
||
|
||
logger.debug("Deleting non-registrant contacts for %s", self.name) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Would suggest logging the error + some minor grammar things in the comment, but other than that looks good