serviceability: restrict delete instructions to valid statuses#2870
Open
martinsander00 wants to merge 2 commits intomainfrom
Open
serviceability: restrict delete instructions to valid statuses#2870martinsander00 wants to merge 2 commits intomainfrom
martinsander00 wants to merge 2 commits intomainfrom
Conversation
8418270 to
10f38ec
Compare
10f38ec to
e9b0e47
Compare
Same pattern as link: devices go through DeviceProvisioning → LinkProvisioning → Activated and can be Drained. Restricting delete to only Activated would leave devices stuck in these states.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves: #2223
Summary
DeviceProvisioning→LinkProvisioning→Activated) and can be drained for maintenance. Restricting to onlyActivatedwould leave devices stuck in provisioning or drained states with no way to clean them up.Provisioningphase after activation (before the link health oracle transitions them toActivated), and can also be drained for maintenance.Testing Verification
test_contributor_delete_from_suspendedtest_exchange_delete_from_suspendedtest_location_delete_from_suspendedtest_link_delete_fails_from_pending— verifies deletion from Pending returns InvalidStatustest_link_delete_from_soft_drained— verifies deletion from SoftDrained succeedstest_link_delete_from_hard_drained— verifies deletion from HardDrained succeedstest_device_delete_fails_from_pending— verifies deletion from Pending returns InvalidStatustest_device_delete_from_drained— verifies deletion from Drained succeeds