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

feat: Support runtime configuration #377

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

arbrandes
Copy link

@arbrandes arbrandes commented Dec 7, 2022

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
Copy link

codecov bot commented Dec 7, 2022

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

None yet

2 participants