-
Notifications
You must be signed in to change notification settings - Fork 155
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: operators can prefix elasticsearch indexes for multi-tenancy #404
feat: operators can prefix elasticsearch indexes for multi-tenancy #404
Conversation
Thanks for the pull request, @keithgg! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
d0bab28
to
6f70cfa
Compare
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.
@keithgg This is good to go from my side. 👍 🎉
I tested what's in the test instructions- I read through the code
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #404 +/- ##
==========================================
+ Coverage 96.10% 96.12% +0.01%
==========================================
Files 58 58
Lines 4550 4568 +18
==========================================
+ Hits 4373 4391 +18
Misses 177 177
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Thank for checking @itsjeyd. It's a coverage issue so I need to add more tests. |
@e0d I've added some tests for the methods I added. Do you mind enabling the tests here again? |
@keithgg I've approved the tests again. |
Hey @asadazam93, would it be possible for you to help us get this PR lined up for engineering review by the Infinity team? |
@keithgg is this also supported by AWS open search? |
@asadazam93 It should be, because I'm making use of features that have been part of ElasticSearch since before the split. That being said, I haven't tested it with OpenSearch. Would you like me to? Note: I've put this in Draft mode, because I have a much simpler implementation that I'm testing, which should be done later today. Update: New changes are live. The implementation is much simpler now, negating the need to modify the functions within |
e2396e6
to
b0d5bcd
Compare
@mtyaka making sure that you see that there were some coverage issues. |
Thank you @e0d. I'll sort them out on Monday. Update: The coverage issue is in I'll spend more time on it in my current sprint. |
Hey @keithgg, when do you expect to be getting back to this PR? |
720d3b0
to
36329fa
Compare
Hi @e0d, do you mind kicking off the tests here? They should pass now. |
@keithgg tests running. |
@asadazam93 We've got a green build here so this is ready for engineering review by your team. |
@keithgg Looks like this will need a rebase. @asadazam93 If you could provide a rough estimate on when this PR might get a review, that would be great :) |
Adds a new configuration setting, ELASTICSEARCH_INDEX_PREFIX. If set, all Elasticsearch indexes and aliases that are generated by the application begin with the prefix. This is to enable multi-tenancy, so that more than one version of this application can run on an ElasticSearch deployment.
36329fa
to
9101e6a
Compare
@keithgg I just have one concern. It would be great if you can test this out with open search. Rest looks good to me |
Thanks @asadazam93. I'll test on OpenSearch and confirm if it's working as intended. |
@keithgg looks like there are some test failures. |
@asadazam93 I tested the changes on the latest OpenSearch 2.6.0 and it works as expected. @e0d I think that's a flaky test. I've experienced some intermittent test failures on |
@keithgg 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Description
Adds a new configuration setting,
ELASTICSEARCH_INDEX_PREFIX
. If set, all Elasticsearch indexes and aliases that are generated by the application begin with the prefix.This is to enable multi-tenancy, so that more than one version of this application can run on an ElasticSearch deployment.
Testing instructions
When testing this, be sure to clear out your current
tutor
install beforehand (tutor local stop
andrm -r ~/.local/share/tutor
)pip install --upgrade tutor[full]
pip install git+https://github.com/open-craft/tutor-forum@keith/prefix-elasticsearch-indexes
tutor plugins enable forum
tutor images build forum
to build the forum imagetutor local quickstart
Create a tutor local installstarting_
starting_
Other information
I couldn't run the tests locally as the test documentation is outdated due to #392. If upstream confirms this is a worthwhile addition, I'll add tests.