Overhaul Batch Change Workflow
See original GitHub issueBackground
The manual review workflow that is currently implemented for Batch Changes is hard to follow across the various states and transitions. The purpose of this effort is to streamline the workflow, and finalize and reshape the states and workflows to be in a better place.
Proposed Workflow
diagram source
@startuml
hide empty description
[*] --> PendingReview : SUBMIT (warnings or scheduled)
[*] --> Processing : SUBMIT (no warnings not scheduled)
[*] --> Scheduled : SUBMIT (no warnings and scheduled)
PendingReview --> PendingReview : APPROVE (warnings)
PendingReview --> Processing : APPROVE (no warnings not scheduled)
PendingReview --> Scheduled : APPROVE (no warnings and scheduled)
PendingReview --> [*] : ABANDON (reject or cancel)
Scheduled --> Scheduled : VALIDATE (no warnings)
Scheduled --> PendingReview : VALIDATE (new warnings)
Scheduled --> Processing : PROCESS (no warnings)
Scheduled --> [*] : ABANDON (reject or cancel)
Processing --> [*] : Done
@enduml
The process starts when the batch change is submitted.
Pending Review
A batch change enters Pending Review only when there are warnings present. These warnings can include missing zones or domains flagged for Manual Review. The only way to advance the batch change is to clear all warnings.
Available Actions
CANCEL- the requesting user can cancel the requestREJECT- an authorized approver can reject the request if for some reason it should not be implemented.APPROVE- an authorized approver can approve the request. This will clear any line items requiring manual review, as well as re-execute validations to see if the batch change can proceed. If warnings remain (or new warnings are found), the change will remain inPendingReview.
Transitions
On CANCEL--> goto aCancelledstate, capturing the user cancelling the request and the cancellation time.On REJECT--> goto aRejectedstate, capturing the user rejecting the request, an optional rejection reason.On APPROVEif warnings exist--> stay in aPendingReviewstate until the warnings are addressedif no warnings and scheduled--> goto aScheduledstate until the scheduled datetime has elapsedif no warnings and not scheduled--> gotoProcessingstate for exercising the batch change
Scheduled
A batch change enters a Scheduled state only when there are no errors or warnings and a scheduled datetime has been set on the batch change.
Actions
PROCESS- can be triggered automatically when the scheduled datetime elapses or manually triggered via an endpoint to process the scheduled change. Note: when a scheduled change is processed, due to the fact that the world may have changed for some number of weeks while it was in a scheduled state, VinylDNS will re-run validations again. If there are warnings at this time, the requirement is to move to PendingReview and alert someone of the issue.VALIDATE- an authorized reviewer can re-validate a Scheduled change prior to processing to ensure that there are no new warnings that may occur.CANCEL- the requester may cancel the request at anytime before it is processed.REJECT- an authorized reviewer may reject the request at anytime before it is processed.
Transitions
On PROCESSif no new warnings--> gotoProcessingwhere changes are appliedif new warnings--> gotoPendingReviewwhere the reviewer can remediateif scheduled not elapsed--> stay and notify user the scheduled time has not elapsed
On VALIDATEif no new warnings--> stay until scheduled datetime elapsesif new warnings--> gotoPendingReview
On CANCEL--> gotoCancelled, capturing the user cancelling the request and the cancellation time.On REJECT--> goto aRejectedstate, capturing the user rejecting the request, an optional rejection reason.
Processing
Processing is a temporary state during which a Batch Change is being applied to the DNS backend
Actions
NONE
Transitions
if all changes fail in batch--> gotoFailedif some changes fail in batch--> gotoPartialFailureif all changes succeed in batch--> gotoComplete
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (11 by maintainers)

Top Related StackOverflow Question
@britneywright updated to put REJECT back in.
don’t forget the existing statuses, Complete, Failed and PartialFailure that will come after PendingReview or Scheduled.
This kind of brings us back to approval status and how the two are essentially the same except that an approved batch change could fail or partial fail during the backend processing