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

Sumac deployment fails with RUN_MEILISEARCH: false #1185

Open
mrtmm opened this issue Jan 2, 2025 · 4 comments
Open

Sumac deployment fails with RUN_MEILISEARCH: false #1185

mrtmm opened this issue Jan 2, 2025 · 4 comments

Comments

@mrtmm
Copy link

mrtmm commented Jan 2, 2025

Bug description
Tutor deployment, running the Sumac release, fails with ConnectionError: Unable to connect to Meilisearch when RUN_MEILISEARCH: false is set.

I believe there are three steps in the platform launch where the RUN_MEILISEARCH setting is not honoured:

  1. https://github.com/overhangio/tutor/blob/release/tutor/commands/jobs.py#L49
  2. https://github.com/overhangio/tutor/blob/release/tutor/templates/jobs/init/lms.sh#L14
  3. https://github.com/overhangio/tutor/blob/release/tutor/templates/jobs/init/cms.sh#L24

How to reproduce

  1. Set RUN_MEILISEARCH: false in config.yml
  2. Run tutor config save
  3. Launch the platform as usual

Environment
Seeing the same failure with tutor local and tutor k8s

@regisb
Copy link
Contributor

regisb commented Jan 2, 2025

I think you may be mistaken in the meaning of the RUN_MEILISEARCH setting. Meilisearch is a required component of the Open edX stack with Tutor in Sumac. Setting RUN_MEILISEARCH=false merely configures Tutor to point to an externally-hosted instance of Meilisearch. Thus, if you set RUN_MEILISEARCH=false, then you also need to set MEILISEARCH_URL and other settings.

@fghaas
Copy link
Contributor

fghaas commented Jan 2, 2025

@regisb What do you think about flagging a configuration error, and refusing to start, if RUN_MEILISEARCH is set to false while MEILISEARCH_URL is simultaneously set to its default?

@mrtmm
Copy link
Author

mrtmm commented Jan 2, 2025

I think you may be mistaken in the meaning of the RUN_MEILISEARCH setting. Meilisearch is a required component of the Open edX stack with Tutor in Sumac. Setting RUN_MEILISEARCH=false merely configures Tutor to point to an externally-hosted instance of Meilisearch. Thus, if you set RUN_MEILISEARCH=false, then you also need to set MEILISEARCH_URL and other settings.

I see, in that case I misunderstood the setting indeed. From the release notes I read:

Two recent features, Studio Course Search and the new Content Libraries (beta), require Meilisearch and will be hidden from the UI if Meilisearch is not available. (For the Content Libraries beta, this affects only the UI - developers can still use the APIs without Meilisearch.)

Which made me believe that running without Meilisearch is an option for the platform as a whole (And, I assumed possible with Tutor)

@regisb
Copy link
Contributor

regisb commented Jan 2, 2025

This part of the release notes seems to be incorrect. I guess that the issue that you are pointing out is a bug both in the Sumac release notes and the Tutor documentation.

What do you think about flagging a configuration error, and refusing to start, if RUN_MEILISEARCH is set to false while MEILISEARCH_URL is simultaneously set to its default?

Yes, that would help. I'm all for it. Except that we should (probably) not refuse to start, but instead log a big fat warning in stderr. There might be good reasons to keep the default meilisearch URL, such as custom DNS, running a separate k8s service, etc.

fghaas added a commit to fghaas/tutor that referenced this issue Jan 2, 2025
Tutor is meant to be configured with either its own, or an externally
preconfigured Meilisearch instance. Thus, the combination of
configuring RUN_MEILISEARCH: false and leaving MEILISEARCH_URL at its
default is almost certainly a configuration error.

Add an alert to notify the user of that configuration issue.

Related issue:
overhangio#1185
fghaas added a commit to fghaas/tutor that referenced this issue Jan 2, 2025
Tutor is meant to be configured with either its own, or an externally
preconfigured Meilisearch instance. Thus, the combination of
configuring RUN_MEILISEARCH: false and leaving MEILISEARCH_URL at its
default is almost certainly a configuration error.

Add an alert to notify the user of that configuration issue.

Related issue:
overhangio#1185
@DawoudSheraz DawoudSheraz moved this from Pending Triage to In Progress in Tutor project management Jan 3, 2025
@DawoudSheraz DawoudSheraz moved this from In Progress to In review in Tutor project management Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In review
Development

No branches or pull requests

3 participants