-
Notifications
You must be signed in to change notification settings - Fork 45
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
feat:delete environment command #189
feat:delete environment command #189
Conversation
@Shivam you will have to add a check to see if there are any infras that are present for the environment, if yes you can just prompt that there are infras present in the environment and they need to be deleted before deleting the environment. |
@SarthakJain26 @neelanjan00 also we are using
This is other instance we are using the iteration which imo should not be needed. |
@shivam-Purohit On deleting it does get reflected in the DB but the error you are seeing is because we are not deleting the document from the DB rather we are just marking it as removed, and since an mongo index is set on name field, therefore mongo does not allows the creation of a new environment with the same name. The solution to this is make the index as partial index and not consider the documents that are marked as removed. Anyways this is a separate issue which will have to be updated in graphql code. Regarding using GET command instead of LIST, you are right, we should use GET where we want to fetch just one resource and we should be using LIST where multiple resources are being fetched. You can go ahead and update the implementation. Thanks |
@SarthakJain26 so what should be the next step in this feature then? Also I have pushed the changes I suggested if you can take a look. |
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.
@shivam-Purohit please also add the example usage of command in delete/delete.go and Usage_0.23.0.md file
Signed-off-by: Shivam Purohit <[email protected]>
Signed-off-by: Shivam Purohit <[email protected]>
Signed-off-by: Shivam Purohit <[email protected]>
Signed-off-by: Shivam Purohit <[email protected]>
Signed-off-by: Shivam Purohit <[email protected]>
Signed-off-by: Shivam Purohit <[email protected]>
99486e0
to
256e576
Compare
Signed-off-by: Shivam Purohit <[email protected]>
done! can you take another look? thank you! |
I see a commit pushed in litmus regarding this. Should this issue now be fixed @SarthakJain26 ? |
Yes Shivam! This will be fixed now. |
Signed-off-by: Shivam Purohit <[email protected]>
cd8dc20
to
197a8f1
Compare
@SarthakJain26 done! |
Currently there is no command to delete the chaos environment. This feature will aim to add command to delete chaos environments based on the id provided.