-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feature/4016 anon import aliases #2433
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a3d48de
find and cleanup old index and alias
philipkcl 41e2d74
support parameter str_format
philipkcl 13c0d24
create instance indexes and aliases
philipkcl 04e9adc
create alias immediately
philipkcl 55efef9
merge develop and fix anon_import conflict
philipkcl bf7b2d9
fix index variable
philipkcl 3802a5b
add condition to avoid delete wrong index
philipkcl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
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.
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.
it might be good to enforce the separator here (
if not index_prefix.endswith('-') ...
) because here is where a missing separator could match a whole lot more indexes than we indend. E.g. if you supplydoaj
as the index prefix you'll delete indexes doajstatic-article etc. That won't happen unless the comment in settings.py to include the separator is ignored.Perhaps we should just ensure the setting always ends with
-
instead. Either way, not a blocker for release.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.
Not recommend it.
It will fail the first time import. The first time import meaning when the the index name still calling
doaj-account
instead ofdoaj-account-20111212
, which mean it will help to migrate if the environment still using old index namedoaj-account
.Moreover, prefix search by
index_type
and the script will show which index will be removed, it should be safe enough.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.
added some condition check to avoid future index like
doaj-account_abcde