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

StatusPendingAutomatedRemoval is missing from some state transitions #251

Open
nharper opened this issue Nov 3, 2023 · 0 comments
Open
Assignees

Comments

@nharper
Copy link
Collaborator

nharper commented Nov 3, 2023

There are two locations that handle a StatusPendingRemoval but do not handle StatusPendingAutomatedRemoval:

The Submit endpoint checks that a domain meets the preload requirements, and if it does, updates its status to StatusPending if appropriate. StatusPending means the domain is not currently on the preload list, but it should be added to the list on the next update. If a domain has StatusPendingAutomatedRemoval, it hits the default in the switch statement and returns an error. It should be handled the same as StatusPendingRemoval, as both of those statuses convey that the domain should be removed from the preload list.

The existing logic for the Submit endpoint appears to be incorrect when handling the StatusPendingRemoval state. That state is treated the same as StatusUnknown, StatusRejected, and StatusRemoved, which is to transition the domain to the StatusPending state. This means that a StatusPendingRemoval (or StatusPendingAutomatedRemoval) domain, which is one that is on the preload list but met the requirements for (automated) removal, and has now passed the checks for being on the list, will have its status changed to one that means the domain currently isn't on the preload list but it should be (StatusPending). Instead, its status should be changed to StatusPreloaded: if a domain was pending removal but now no longer should be removed, there is no action to take or any pending state.

The Remove endpoint checks if a domain meets the requirements for immediate removal from the preload list. If a domain that is pending automated removal meets the immediate removal criteria, then it should be updated to StatusPendingRemoval.

PR #250 is a good starting point for fixing the Submit endpoint, though a behavior change is needed for both pending removal statuses.

@carlosjoan91 carlosjoan91 self-assigned this Nov 11, 2023
carlosjoan91 added a commit that referenced this issue Dec 1, 2023
…StatusPendingRemoval states (#252)

Add StatusPendingAutomatedRemoval handling to submit API and change
handling of PendingRemoval domains, so they go back to preloaded if
submitted again.

This addresses the Submit part of #251
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

No branches or pull requests

2 participants