Skip to content
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

#3392: fix domain deletion - [MS] #3485

Merged
merged 23 commits into from
Feb 20, 2025
Merged

Conversation

Matt-Spence
Copy link
Contributor

@Matt-Spence Matt-Spence commented Feb 7, 2025

Ticket

Resolves #3392

Changes

  • Fixes domain deletion to actually delete domains
  • New test for DS Data

Context for reviewers

Setup

Code Review Verification Steps

Go to MS->admin and find a domain that has ds data, nameservers, and a valid registry status that isn't "PendingDelete" (you can check this with the "registry status" button at the top of the domain admin page). Try and delete the domain and see what it reports back. It should work this time... hopefully.

As the original developer, I have

Satisfied acceptance criteria and met development standards

  • Met the acceptance criteria, or will meet them in a subsequent PR
  • Created/modified automated tests
  • Update documentation in READMEs and/or onboarding guide

Ensured code standards are met (Original Developer)

  • If any updated dependencies on Pipfile, also update dependencies in requirements.txt.
  • Interactions with external systems are wrapped in try/except
  • Error handling exists for unusual or missing values

Validated user-facing changes (if applicable)

  • Tag @dotgov-designers in this PR's Reviewers for design review. If code is not user-facing, delete design reviewer checklist
  • Verify new pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

As a code reviewer, I have

Reviewed, tested, and left feedback about the changes

  • Pulled this branch locally and tested it
  • Verified code meets all checks above. Address any checks that are not satisfied
  • Reviewed this code and left comments. Indicate if comments must be addressed before code is merged
  • Checked that all code is adequately covered by tests
  • Verify migrations are valid and do not conflict with existing migrations

Validated user-facing changes as a developer

Note: Multiple code reviewers can share the checklists above, a second reviewer should not make a duplicate checklist. All checks should be checked before approving, even those labeled N/A.

  • New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Meets all designs and user flows provided by design/product
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • (Rarely needed) Tested as both an analyst and applicant user

As a designer reviewer, I have

Verified that the changes match the design intention

  • Checked that the design translated visually
  • Checked behavior. Comment any found issues or broken flows.
  • Checked different states (empty, one, some, error)
  • Checked for landmarks, page heading structure, and links

Validated user-facing changes as a designer

  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • Tested with multiple browsers (check off which ones were used)
    • Chrome
    • Microsoft Edge
    • FireFox
    • Safari
  • (Rarely needed) Tested as both an analyst and applicant user

References

Screenshots

@Matt-Spence Matt-Spence requested a review from allly-b as a code owner February 7, 2025 17:06
@Matt-Spence Matt-Spence changed the title Ko/3392 fix domain deletion #3392: fix domain deletion - [MS] Feb 11, 2025
Comment on lines 164 to 170
cls.UNKNOWN: ("Before this domain can be used, " "youll need to add name server addresses."),
cls.DNS_NEEDED: ("Before this domain can be used, " "youll need to add name server addresses."),
cls.UNKNOWN: ("Before this domain can be used, " "you'll need to add name server addresses."),
cls.DNS_NEEDED: ("Before this domain can be used, " "you'll need to add name server addresses."),
cls.READY: "This domain has name servers and is ready for use.",
cls.ON_HOLD: (
"This domain is administratively paused, "
"so it cant be edited and wont resolve in DNS. "
"so it can't be edited and won't resolve in DNS. "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are actually intentionally using hatch marks here! @gabo0oo can speak to this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zandercymatics I may need a refresher 😅 Why do we have to use hatch marks here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gabo0oo Sorry - mispoke! I meant we are intentionally not using hatch marks. This PR changes => ' which I thought we were avoiding?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yup, we should use apostrophes not hatch marks. Sometimes there are reasons why it has to be a hatch mark that are beyond my knowledge so I'm not sure if that's what's going on here. Ideally, we'll always use apostrophes but if it must be a hatch mark that's ok. I'm so glad you're noticing them now too, @zandercymatics they drive me crazy! 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I think there's something on my personal laptop that keeps replacing these when I copy/paste, not sure why.

self.message_user(
request,
"Could not delete: An unspecified error occured",
f"Could not delete: An unspecified error occured: {e}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general you don't want to show users Errors that just say vague things like an error occurred, and you don't want to show technical error information unless it will help the user resolve the scenario. The error type should be logged before this (if not make sure it get's logged), so I wouldn't show it here and instead I would change the message saying that they need to contact engineering and notify us of the time and domain the error occurred on.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dave-kennedy-ecs dave-kennedy-ecs self-assigned this Feb 14, 2025
Copy link
Contributor

@dave-kennedy-ecs dave-kennedy-ecs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed code and tested successfully on MS sandbox. LGTM.
There may be pending changes from others' reviews regarding hatchmarks and how error messages are returned. It looked to me these are resolved, but I haven't followed those closely.
Approved

@Matt-Spence Matt-Spence merged commit b6ab6b2 into main Feb 20, 2025
9 of 10 checks passed
@Matt-Spence Matt-Spence deleted the ko/3392-fix-domain-deletion branch February 20, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Domain Deletion fails for domains with and without DNSSEC
5 participants