-
Notifications
You must be signed in to change notification settings - Fork 62
[nexus] Safer project deletion #2024
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
Conversation
sunshowers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
|
I think I've addressed all comments requesting changes - if y'all have a chance, I'd appreciate another look |
davepacheco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the authz issues!
sunshowers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, though I'm more of a learner than anything else here!
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