Skip to content
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(cli): also delete replica indices #127

Merged
merged 7 commits into from
Jul 24, 2023
Merged

feat(cli): also delete replica indices #127

merged 7 commits into from
Jul 24, 2023

Conversation

kai687
Copy link
Contributor

@kai687 kai687 commented Jul 20, 2023

This PR adds a new boolean option to the algolia indices delete command: --includeReplicas.
If it's true, the command will look for any replicas of an index and deletes them with the primary index. No more dangling indices because of replicas.

DEX-784

@kai687 kai687 marked this pull request as draft July 20, 2023 18:36
@kai687 kai687 marked this pull request as ready for review July 21, 2023 17:24
@kai687
Copy link
Contributor Author

kai687 commented Jul 21, 2023

@clemfromspace got stuck writing the test (or rather the mock) for the new option. Don't know what I'm doing wrong.

@clemfromspace
Copy link
Contributor

@kai687 On it!

@clemfromspace
Copy link
Contributor

@kai687 The tests should pass now, there was missing matching stubs.
Makes me think the current stubs system is not explicit enough when there is missing stubs / unmatched stubs.

Copy link
Contributor

@clemfromspace clemfromspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, feels free to merge after :)

pkg/cmd/indices/delete/delete.go Outdated Show resolved Hide resolved
@clemfromspace clemfromspace merged commit 26ef30e into algolia:main Jul 24, 2023
2 checks passed
@kai687
Copy link
Contributor Author

kai687 commented Jul 25, 2023

Thank you so much with your help on the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants