-
Notifications
You must be signed in to change notification settings - Fork 1
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
MFE runtime configuration #103
Comments
Recently, a capability was added to this MFE that allows it to load configuration from an the LMS's MFE Config API instead of requiring it to be baked-in to the webpack build. When enabled, though, this capability blocks any render of the MFE until the Config API responds. So, in order to minimize the amount of time that the MFE is waiting on the Config API response, we preload the API response via a in the section of index.html, which recommends to the browser to immediately begin loading the MFE Config API response as soon as index.html is loaded. Otherwise, the Config API wouldn't be called until React and frontend-platform are loaded. Recently, a capability was added to MFE that allows it to load configuration from an LMS API (the "MFE Config API") instead of requiring it to be baked-in to the webpack build. Related to: * https://github.com/overhangio/2u-tutor-adoption/issues/87 * openedx/wg-frontend#103
@dcoa, is there any chance somebody on your team could add runtime configuration support to frontend-app-course-authoring and/or frontend-app-ora-grading in the next couple of weeks? These are the ones we're considering for Olive, but they're missing dynamic config support. |
Hi, @arbrandes I'm working on ORA support, for course authoring frontend-platform is already in version > 2.5.0, and understanding this https://discuss.openedx.org/t/mfe-runtime-configuration/8495/14?u=dcoa runtime should be able to use. |
This is ORA PR openedx/frontend-app-ora-grading#144 |
Thanks a bunch, @dcoa! Let's hope we get that one reviewed and merged in time. (The repo is not in the openedx org yet, unfortunately.) |
@dcoa, it looks like frontend-app-discussions might make it in as well (they fixed the bugs). It's already on [email protected], but do you want to work your favicon magic as well? |
I think for this case the same comment from the authing app https://discuss.openedx.org/t/mfe-runtime-configuration/8495/14?u=dcoa, if this change isn't mandatory, we can do it later. |
Allows frontend-app-learning to be configured at runtime using the LMS's new MFE Configuration API. Part of openedx/wg-frontend#103
Allows frontend-app-gradebook to be configured at runtime using the LMS's new MFE Configuration API. Part of openedx/wg-frontend#103
@dcoa, mind taking a look at this one? We've identified a problem when Have you seen things like this in other MFEs? |
Allows frontend-app-profile to be configured at runtime using the LMS's new MFE Configuration API. Part of openedx/wg-frontend#103
Looks like we're good as far as all candidate MFEs for Olive are concerned! The last one was |
Looks like we're done here, finally! @dcoa, congrats, and thanks for your patience in getting this through!! 🎉 |
Allows frontend-app-learning to be configured at runtime using the LMS's new MFE Configuration API. Part of openedx/wg-frontend#103
* feat: allow runtime configuration (openedx#955) Allows frontend-app-learning to be configured at runtime using the LMS's new MFE Configuration API. Part of openedx/wg-frontend#103 * refactor: install alpha dependencies and update lint rules * refactor: update code according with paragon alpha 22 * fix: test wasn't passing correctly * chore: fix header alias --------- Co-authored-by: bra-i-am <[email protected]>
Description
This is the first step of exploration to make MFE easy to configure from an instance.
And is part of a conversation that took place in the BTR WG reference here
You can check this document for a better context, and we appreciate your feedback.
Problem we try to hack
MFEs are only configured at build time. We need to be able to configure them at runtime to avoid needing a re-build for every MFE with every change in configuration.
How we can solve this
A proposal is to make a call API to set the configuration variables.
In the MFE can set the environment variable MFE_CONFIG_API_URL, which is optional and people can choose if use the env file or call the API (setting the variable).
The configuration could be set by site configuration in an object like this:
This object is read in the initialize function and if it's all okay, start the frontend application.
Pull request based on this proposal
Frontend-Platform: Create a new function that is only activated if MFE_CONFIG_API_URL is set and make an API call to set the configuration variables.
Edx-Platform: Create the API configuration service to read the site configuration and return the MFE_CONFIG.
Enable runtime config in frontend-apps (favicon and title tag using Helmet and i18n):
npm ci
validation is necessary to upgradetensorflow/tfjs-converter
andtensorflow/tfjs-core
npm ci
validation is necessary upgrade@edx/frontend-lib-special-exams
Pending MFEs
The text was updated successfully, but these errors were encountered: