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

chore: add ELASTIC_SEARCH_INDEX_PREFIX setting to prefix indices #130

Merged
merged 1 commit into from
Apr 10, 2023

Conversation

keithgg
Copy link
Contributor

@keithgg keithgg commented Jan 25, 2023

Description

This PR is a redo of #128, because there was an issue with the tests running

Add a new setting ELASTIC_SEARCH_INDEX_PREFIX that will be prepended to all ElasticSearch indexes. This helps with multitenancy so that indexes can be split per "tenant"

Testing Instructions

  • Proofread the code
  • It should be enough to run the tests here as they are fairly extensive with make test_with_es

Supporting information

@openedx-webhooks
Copy link

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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jan 25, 2023
@e0d
Copy link

e0d commented Jan 25, 2023

@keithgg I've approved the tests, and the tests are running this time.

@keithgg
Copy link
Contributor Author

keithgg commented Feb 7, 2023

@e0d do you mind kicking off the tests here again?

@e0d
Copy link

e0d commented Feb 7, 2023

@keithgg tests approved.

@mphilbrick211
Copy link

@keithgg looks like your tests have passed - is this ready for review? If so, you'll need to address the branch date error in the meantime. Thanks!

@keithgg
Copy link
Contributor Author

keithgg commented Feb 8, 2023

@mphilbrick211 Great! I've rebased against master. Once the tests are kicked off again it should be ready for review.

@mphilbrick211
Copy link

Great, @keithgg! Are you planning to re-run the tests?

@e0d
Copy link

e0d commented Feb 8, 2023

@keithgg kind of looks like this branch is stuck again, not seeing the tests actually being queue up and codecov/patch seems stuck.

@keithgg
Copy link
Contributor Author

keithgg commented Feb 9, 2023

@e0d that's a bummer. Should I create another PR?

@e0d
Copy link

e0d commented Feb 9, 2023 via email

@keithgg
Copy link
Contributor Author

keithgg commented Feb 9, 2023

@e0d sure. I've pushed an empty commit. If that doesn't work, I'll push another with a code change.

@e0d
Copy link

e0d commented Feb 9, 2023

@keithgg that seems to have done it. Tests approved and running.

@mphilbrick211
Copy link

@keithgg - Now that tests are working/passing, please let me know when this is ready for review. Thanks!

@keithgg
Copy link
Contributor Author

keithgg commented Feb 10, 2023

Thank you @e0d. @mphilbrick211 it's (finally) ready for review.

@mphilbrick211
Copy link

Hi @jristau1984! Would you mind taking a look at this for review/merge?

@mphilbrick211
Copy link

Hi @jristau1984! Friendly ping on this :)

@MoisesGSalas
Copy link

Is there any chance to revisit this PR? @keithgg originally mentioned a PR for groove but the Large Instances Working Group is also expecting this to land soon. While reviewing openedx/openedx-k8s-harmony#13 we did some basic testing and everything seemed to work just fine.

@jristau1984
Copy link

This feature is not currently used on the edx.org instance, so there is no need for 2U to review this PR. Thanks,

@keithgg
Copy link
Contributor Author

keithgg commented Mar 20, 2023

Cool @jristau1984. @feanil (soz for the ping, you're the latest committer 🙂) are you able to assist with a review?

Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

This change looks good to me. Before we merge this, can you rebase on the latest and bump the version so we can do a release after merging?

Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

Actually, wait 1 more change before we land this, please update the README to mention the new setting and how to use it.

@keithgg
Copy link
Contributor Author

keithgg commented Mar 22, 2023

Thank you @feanil, I've rebased and updated the README.

@keithgg keithgg force-pushed the keith/shared-elasticsearch branch 2 times, most recently from af56ca8 to a9b5111 Compare March 22, 2023 07:41
@keithgg keithgg requested review from feanil and removed request for jristau1984 March 22, 2023 07:41
@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Mar 23, 2023
@e0d e0d removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Mar 24, 2023
@e0d
Copy link

e0d commented Mar 24, 2023

@feanil ready for review.

@feanil
Copy link
Contributor

feanil commented Apr 5, 2023

@keithgg thanks for adding the doc, can you also bump the version so that we can do a release of the package once this lands?

This helps with multitenancy so that indexes can be split per
tenant. Each index can be prefixed by the string defined
which will allow multiple tenants per ES cluster running the same
code.
@keithgg keithgg force-pushed the keith/shared-elasticsearch branch from a9b5111 to f03fb8e Compare April 6, 2023 12:28
@keithgg
Copy link
Contributor Author

keithgg commented Apr 6, 2023

@keithgg thanks for adding the doc, can you also bump the version so that we can do a release of the package once this lands?

Sure @feanil, done. Updated to 3.5.0 from 3.4.0.

@feanil feanil merged commit 737db62 into openedx:master Apr 10, 2023
@openedx-webhooks
Copy link

@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.

github-actions bot added a commit to openedx/edx-platform that referenced this pull request May 9, 2023
<!--

🌴🌴
🌴🌴🌴🌴         🌴 Note: the Palm master branch has been created. Please consider whether your change
    🌴🌴🌴🌴     should also be applied to Palm. If so, make another pull request against the
🌴🌴🌴🌴         open-release/palm.master branch, or ask in the #wg-build-test-release Slack channel
🌴🌴             if you have any questions or need help.

🫒🫒🫒🫒🫒🫒     🫒 Note: the Olive release is still supported.
                Please consider whether your change should be applied to Olive as well.

Please give your pull request a short but descriptive title.
Use conventional commits to separate and summarize commits logically:
https://open-edx-proposals.readthedocs.io/en/latest/oep-0051-bp-conventional-commits.html

Use this template as a guide. Omit sections that don't apply.
You may link to information rather than copy it, but only if the link is publicly
readable.  If you must linked information must be private (because it has secrets),
clearly label the link as private.

-->

## Description

This PR aims to update the version of the edx-search library to [3.5.0](https://github.com/openedx/edx-search/releases/tag/v3.5.0). This update will enable operators to have a shared ElasticSearch installation for multiple OpenedX instances. More details about this feature can be found [here](openedx/edx-search#130).

## Supporting information

In the Large Instances Working Group we added a feature to have a [shared ElasticSearch installation](openedx/openedx-k8s-harmony#4) for multiple OpenedX instances in a Kubernetes cluster. To take advantage of this feature in the Palm release, we require the upgrade of the edx-search version.
@pdpinch
Copy link

pdpinch commented Jun 11, 2023

Should this setting have an annotation so it will be included in the Technical Reference docs: https://edx.readthedocs.io/projects/edx-platform-technical/en/latest/index.html ?

feanil added a commit to openedx/edx-platform that referenced this pull request Jun 12, 2023
@feanil
Copy link
Contributor

feanil commented Jun 12, 2023

@pdpinch good catch, created a PR here, openedx/edx-platform#32428

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

8 participants