[nexus] Safer project deletion#2024
Merged
Merged
Conversation
smklein
commented
Dec 8, 2022
sunshowers
reviewed
Dec 8, 2022
sunshowers
left a comment
Contributor
There was a problem hiding this comment.
Thanks for adding me to the review! I spent quite a bit of time looking at this and it was really helpful to me. I've put in a few comments where I had further questions but overall this makes sense to me.
davepacheco
reviewed
Dec 12, 2022
Collaborator
Author
|
I think I've addressed all comments requesting changes - if y'all have a chance, I'd appreciate another look |
davepacheco
approved these changes
Dec 16, 2022
davepacheco
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for fixing the authz issues!
sunshowers
reviewed
Dec 16, 2022
sunshowers
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me, though I'm more of a learner than anything else here!
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.
Previously
Project deletion was very problematic - even though projects contain many resources, they could be deleted while their children objects still exist. This would effectively "orphan" those resources, making them inaccessible.
For example: Create an instance in a project, delete the project. Now the instance exists, but cannot be deleted.
This PR
Adds
rcgento projects, and ensures that they can no longer be deleted while containing child resources.DatastoreCollectionConfig<ChildResource>forProject, for many child resourcesProject::insert_resourceto bumprcgenwhile creating child resourcesAreas worth a particular close review:
default, as described in RFD 21. This default VPC may additionally contain subnets - by default, a subnet nameddefaultis also created, but more may exist. At the time that we delete a project, we need to either delete these resources ourselves, or verify that they have been deleted by the user.project_id, which makes this seem a little quirkier to me.rcgenon creation. Regardless, we do check for their absence when deleting projects.Before taking out of draft:
ExternalIpcreation: bef880aFixes #1482