Skip to content

feat: Support runtime configuration - #377

Merged
arbrandes merged 1 commit into
openedx:masterfrom
arbrandes:support-runtime-config
Dec 9, 2022
Merged

feat: Support runtime configuration#377
arbrandes merged 1 commit into
openedx:masterfrom
arbrandes:support-runtime-config

Conversation

@arbrandes

@arbrandes arbrandes commented Dec 7, 2022

Copy link
Copy Markdown
Contributor

frontend-platform supports runtime configuration since 2.5.0 (see the PR that introduced it), but it requires MFE cooperation. This implements just that: by avoiding making configuration values constant, it should now be possible to change them after initialization.

Almost all changes here relate to the LMS_BASE_URL setting, which in most places was treated as a constant.

Testing

This should be a NOOP for any deployments of the MFE that don't make explicit use of runtime configuration. This is reflected in all unit tests, which needed little to no significant modifications. This change should have no effect on usage of this MFE in the devstack or in current production deployments.

To actually see the desired effects of the change, one needs to deploy Tutor with the correspondingly modified tutor-mfe plugin. Where before several features would fail (adding a post, navigating to the topics page, etc), they should all now work.

@codecov

codecov Bot commented Dec 7, 2022

Copy link
Copy Markdown

Codecov Report

Base: 84.97% // Head: 84.95% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (965fd08) compared to base (d60f1af).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #377      +/-   ##
==========================================
- Coverage   84.97%   84.95%   -0.03%     
==========================================
  Files         134      134              
  Lines        2736     2731       -5     
  Branches      759      759              
==========================================
- Hits         2325     2320       -5     
  Misses        389      389              
  Partials       22       22              
Impacted Files Coverage Δ
src/components/NavigationBar/data/api.js 30.00% <100.00%> (ø)
src/data/api.js 100.00% <100.00%> (ø)
src/data/constants.js 100.00% <100.00%> (ø)
src/discussions/cohorts/data/api.js 100.00% <100.00%> (ø)
src/discussions/comments/data/api.js 91.66% <100.00%> (-0.34%) ⬇️
src/discussions/data/api.js 100.00% <100.00%> (ø)
src/discussions/learners/data/api.js 100.00% <100.00%> (ø)
src/discussions/posts/data/api.js 91.66% <100.00%> (-0.23%) ⬇️
src/discussions/topics/data/api.js 85.71% <100.00%> (ø)

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

arbrandes pushed a commit to arbrandes/frontend-app-discussions that referenced this pull request Dec 8, 2022
frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] openedx/frontend-platform#335

This is a backport to Olive of
openedx#377
frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] openedx/frontend-platform#335
@arbrandes
arbrandes force-pushed the support-runtime-config branch from 3cd1aee to 965fd08 Compare December 8, 2022 11:04
@asadazam93
asadazam93 requested a review from mehaknasir December 8, 2022 11:35
@arbrandes
arbrandes merged commit 9f84230 into openedx:master Dec 9, 2022
@arbrandes
arbrandes deleted the support-runtime-config branch December 9, 2022 10:40
@arbrandes

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @awais-ansari! Much appreciated!

arbrandes pushed a commit that referenced this pull request Dec 9, 2022
frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] openedx/frontend-platform#335

This is a backport to Olive of
#377
sambapete pushed a commit to EDUlib/frontend-app-discussions that referenced this pull request Apr 11, 2023
frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] openedx/frontend-platform#335

This is a backport to Olive of
openedx#377
sambapete pushed a commit to EDUlib/frontend-app-discussions that referenced this pull request Jun 14, 2023
frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] openedx/frontend-platform#335

This is a backport to Olive of
openedx#377
snglth pushed a commit to Abstract-Tech/community-theme-discussions that referenced this pull request Jul 5, 2023
frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] openedx/frontend-platform#335

This is a backport to Olive of
openedx#377
sambapete pushed a commit to EDUlib/frontend-app-discussions that referenced this pull request Aug 9, 2023
frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] openedx/frontend-platform#335

This is a backport to Olive of
openedx#377
sambapete pushed a commit to EDUlib/frontend-app-discussions that referenced this pull request Oct 11, 2023
frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] openedx/frontend-platform#335

This is a backport to Olive of
openedx#377
sambapete pushed a commit to EDUlib/frontend-app-discussions that referenced this pull request Oct 13, 2023
frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] openedx/frontend-platform#335

This is a backport to Olive of
openedx#377
moonesque pushed a commit to edSPIRIT/frontend-app-discussions that referenced this pull request Nov 12, 2023
sambapete pushed a commit to EDUlib/frontend-app-discussions that referenced this pull request Nov 17, 2023
frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] openedx/frontend-platform#335

This is a backport to Olive of
openedx#377
sambapete pushed a commit to EDUlib/frontend-app-discussions that referenced this pull request Dec 11, 2023
frontend-platform supports runtime configuration since 2.5.0 (see the PR
that introduced it[1], but it requires MFE cooperation.  This implements
just that: by avoiding making configuration values constant, it should
now be possible to change them after initialization.

Almost all changes here relate to the `LMS_BASE_URL` setting, which in
most places was treated as a constant.

[1] openedx/frontend-platform#335

This is a backport to Olive of
openedx#377
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.

2 participants