Skip to content

refactor: Use derive_settings to lazy load settings. - #36205

Merged
kdmccormick merged 2 commits into
openedx:masterfrom
kdmccormick:kdmccormick/use-derived-tooling
Feb 5, 2025
Merged

refactor: Use derive_settings to lazy load settings.#36205
kdmccormick merged 2 commits into
openedx:masterfrom
kdmccormick:kdmccormick/use-derived-tooling

Conversation

@kdmccormick

@kdmccormick kdmccormick commented Feb 3, 2025

Copy link
Copy Markdown
Member

Description

Some of our settings depend on the values of other settings. Rather
than explicitly looking up each one in the YAML settings file, we can
simply derive them based on the setting in the YAML file after all the
YAML settings have been loaded.

Supporting information

Originally authored by @feanil here:

BLOCKED by this derived_settings API improvement:

Part of:

Testing information

Same as #36192, but diff using this PR's branch.

@kdmccormick

Copy link
Copy Markdown
Member Author

@feanil , this PR is ready as well. It is identical to your version of the PR, except:

  • It uses the improved derive_settings API
  • It puts back two DEFAULT_ENTERPRISE_ settings (see the latest commit). These settings arguably shouldn't exist as top-level public settings, and they were probably safe to delete... but, by keeping them for now, we can continue to rest easy that production.py is 100% identical pre- and post-refactoring.

@kdmccormick
kdmccormick marked this pull request as ready for review February 4, 2025 19:37
kdmccormick and others added 2 commits February 4, 2025 14:58
Some of our settings depend on the values of other settings.  Rather
than explicitly looking up each one in the YAML settings file, we can
simply derive them based on the setting in the YAML file after all the
YAML settings have been loaded.

Co-Authored-By: Feanil Patel <feanil@axim.org>
@kdmccormick
kdmccormick force-pushed the kdmccormick/use-derived-tooling branch from 82a57f3 to fc1a6f5 Compare February 4, 2025 19:58
@kdmccormick

Copy link
Copy Markdown
Member Author

I have successfully verified this using dump_settings with both Tutor's yamls and the redacted prodlike yamls. FYI @dianakhuang .

@kdmccormick
kdmccormick merged commit e1a8b52 into openedx:master Feb 5, 2025
@kdmccormick
kdmccormick deleted the kdmccormick/use-derived-tooling branch February 5, 2025 16:45
@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

jciasenza pushed a commit to jciasenza/edx-platform that referenced this pull request Feb 25, 2025
Some of our settings depend on the values of other settings.  Rather
than explicitly looking up each one in the YAML settings file, we can
simply derive them based on the setting in the YAML file after all the
YAML settings have been loaded.

Part of: openedx#36215
Co-Authored-By: Feanil Patel <feanil@axim.org>
tonybusa pushed a commit to tonybusa/edx-platform that referenced this pull request Apr 23, 2025
Some of our settings depend on the values of other settings.  Rather
than explicitly looking up each one in the YAML settings file, we can
simply derive them based on the setting in the YAML file after all the
YAML settings have been loaded.

Part of: openedx#36215
Co-Authored-By: Feanil Patel <feanil@axim.org>
UsamaSadiq pushed a commit that referenced this pull request May 14, 2025
Some of our settings depend on the values of other settings.  Rather
than explicitly looking up each one in the YAML settings file, we can
simply derive them based on the setting in the YAML file after all the
YAML settings have been loaded.

Part of: #36215
Co-Authored-By: Feanil Patel <feanil@axim.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants