Skip to content

fix: fixed wrong lms_host#1375

Merged
ahmed-arb merged 2 commits intooverhangio:releasefrom
muhammadadeeltajamul:adeel/fix_wrong_lms_host
Apr 30, 2026
Merged

fix: fixed wrong lms_host#1375
ahmed-arb merged 2 commits intooverhangio:releasefrom
muhammadadeeltajamul:adeel/fix_wrong_lms_host

Conversation

@muhammadadeeltajamul
Copy link
Copy Markdown
Contributor

Fix : Issue#1372

Fixes: Running tutor dev launch -I sets default LMS_HOST not local.openedx.io

Copy link
Copy Markdown
Contributor

@Faraz32123 Faraz32123 left a comment

Choose a reason for hiding this comment

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

Can we also add the changelog entry?

Comment thread tutor/interactive.py Outdated
Comment on lines +11 to +12
if run_for_prod:
return
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isn't this condition redundant when we are already checking run_for_prod before calling the function.

Comment thread tutor/commands/compose.py Outdated
config,
run_for_prod=run_for_prod,
)
elif run_for_prod is not None:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: why didn't we specifically used elif not run_for_prod and remove the if condition from inside the function because it will return early from the function.

@Faraz32123 Faraz32123 moved this from Pending Triage to In review in Tutor project management Apr 29, 2026
@muhammadadeeltajamul muhammadadeeltajamul force-pushed the adeel/fix_wrong_lms_host branch 2 times, most recently from 548af34 to 651ffaf Compare April 29, 2026 10:49
@muhammadadeeltajamul
Copy link
Copy Markdown
Contributor Author

Can we also add the changelog entry?

It can be added in next release changelog

@Faraz32123 Faraz32123 requested a review from ahmed-arb April 29, 2026 11:15
@ahmed-arb ahmed-arb merged commit 17df718 into overhangio:release Apr 30, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Tutor project management Apr 30, 2026
ahmed-arb pushed a commit that referenced this pull request Apr 30, 2026
ahmed-arb added a commit that referenced this pull request May 6, 2026
PR #1375 added an `elif not run_for_prod:` branch in
`interactive_configuration` that called `set_run_mode_defaults`,
unconditionally overwriting `LMS_HOST`, `CMS_HOST`, and `ENABLE_HTTPS`
with development values whenever `run_for_prod` was falsy.

For `tutor local launch --non-interactive`, `run_for_prod` is `None`
(only `dev` sets it to `False`), which is also falsy — so the dev
defaults clobbered the user's production configuration on every
launch. CI deployments that ran `tutor config save --set LMS_HOST=...`
followed by `tutor local launch -I` had those values silently reset,
breaking HTTPS and the configured hostname.

Address #1372 directly by changing the default `LMS_HOST` to
`local.openedx.io`. A fresh `tutor dev launch -I` (or any first run
with no prior config) now lands on dev-friendly defaults via the
default values themselves — no special non-interactive code path
needed. `CMS_HOST` already templates from `LMS_HOST`, and
`ENABLE_HTTPS` was already `false` by default.

Revert the `interactive_configuration` and `ask_questions` changes
from #1375; the `set_run_mode_defaults` helper is no longer needed
because the interactive "is this prod?" flow can inline its
overrides as it did before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ahmed-arb added a commit that referenced this pull request May 6, 2026
PR #1375 added an `elif not run_for_prod:` branch in
`interactive_configuration` that called `set_run_mode_defaults`,
unconditionally overwriting `LMS_HOST`, `CMS_HOST`, and `ENABLE_HTTPS`
with development values whenever `run_for_prod` was falsy.

For `tutor local launch --non-interactive`, `run_for_prod` is `None`
(only `dev` sets it to `False`), which is also falsy — so the dev
defaults clobbered the user's production configuration on every
launch. CI deployments that ran `tutor config save --set LMS_HOST=...`
followed by `tutor local launch -I` had those values silently reset,
breaking HTTPS and the configured hostname.

Address #1372 directly by changing the default `LMS_HOST` to
`local.openedx.io`. A fresh `tutor dev launch -I` (or any first run
with no prior config) now lands on dev-friendly defaults via the
default values themselves — no special non-interactive code path
needed. `CMS_HOST` already templates from `LMS_HOST`, and
`ENABLE_HTTPS` was already `false` by default.

Revert the `interactive_configuration` and `ask_questions` changes
from #1375; the `set_run_mode_defaults` helper is no longer needed
because the interactive "is this prod?" flow can inline its
overrides as it did before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

First dev setup with wrong lms_host

4 participants