-
Notifications
You must be signed in to change notification settings - Fork 215
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: allow runtime configuration #955
feat: allow runtime configuration #955
Conversation
Thanks for the pull request, @dcoa! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
Tests are failing because of a peer dependency error, to solve this is necessary an update of @edx/frontend-lib-special-exams (I create a PR there to upgrade frontend-platform openedx/frontend-lib-special-exams#70) |
@dcoa Thank you for your contribution. Is this ready for our review? |
Hi @natabene, yes it's able to start the review process. |
@dcoa
|
Hi @dcoa! Just checking in to see where things are at with this PR :) Are you still interested in pursuing it? |
Hi, @itsjeyd yes I'm still interested to make this PR merged. |
@dcoa I'd love to merge this soon! Would you mind rebasing and seeing if you can get tests to pass? |
Hi @ghassanmas I test it in devstack using webpack local module to "install" |
- I test this on production mode, i.e. I build it `nom run build` then run it. I think here you are testing in development mode
- What are the node/npm version you are using
… On 12 Oct 2022, at 20:25, Kyle McCormick ***@***.***> wrote:
@dcoa <https://github.com/dcoa> I'd love to merge this soon! Would you mind rebasing and seeing if you can get tests to pass?
—
Reply to this email directly, view it on GitHub <#955 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AD42PH65QLJPTFHTWR4WM23WC3YABANCNFSM53QA7SJQ>.
You are receiving this because you commented.
|
hi @kdmccormick I can't make test past until @edx/frontend-lib-special-exams is updated (this PR solves that openedx/frontend-lib-special-exams#70) |
I'm using node v16.15.1 (npm v8.11.0) |
I tested it. I needed the fix in |
I tried this many many times in production mode with tutor but it I can't make it to work when using the speficed version of special-exam. the way I installed your version is by changing the pacakge.json i.e. The only case when this work is when I forced npm to ignore peer depedency error i.e. So I guess the fail probably is not due to changes in this PR rather for frontend-lib-special-exams. |
@dcoa frontend-lib-special-exams should be all set now! |
@dcoa now that frontend-lib-special-exams is all set, could you get this PR's test passing? |
5e9dcae
to
29964ac
Compare
@kdmccormick I was working on that, and now all passed. |
Codecov ReportBase: 84.13% // Head: 84.13% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #955 +/- ##
=======================================
Coverage 84.13% 84.13%
=======================================
Files 264 264
Lines 4519 4519
Branches 1158 1158
=======================================
Hits 3802 3802
Misses 697 697
Partials 20 20
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. |
29964ac
to
351a096
Compare
@dcoa @MaferMazu @ghassanmas Now that the special-exams PR is merged, could any you folks please confirm that this PR works as expected (using Tutor) and that the issues we saw before are resolved? Once that is confirmed, I am happy to merge this! |
I have test this using tutor/olive in production: you can access it at: https://apps.olive.zaat.dev/learning/course/course-v1:zaatdev+101+1/home Note: this is not the official open testing instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for testing Ghassan!
Sorry @dcoa , one tiny thing I just noticed 😛 Otherwise this looks great.
@@ -32,7 +32,7 @@ describe('Sequence Content', () => { | |||
expect(screen.queryByText('Loading locked content messaging...')).not.toBeInTheDocument(); | |||
expect(container.querySelector('svg')).toHaveClass('fa-lock'); | |||
expect(screen.getByText( | |||
`You must complete the prerequisite: '${gatedContent.prereqSectionName}' to access this content.`, | |||
`You must complete the prerequisite: ' ${gatedContent.prereqSectionName} ' to access this content.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this string change intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I did it intentionally because react-intl not rendering the single quotes but I found out the real fix here is adding another single quote like this formatjs/formatjs#3870
Thanks, @kdmccormick I'll fix it
Hi @kdmccormick I fix it, but codecov is failing and I am not sure why, seems like some messing configuration, may be re-running workflows this could be solved.
|
Is this good to merge? I've got a special-exams lib release that can't be pulled in without this now that we've bumped the platform version in that lib to match this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the nudge @zacharis278 , I didn't realize that codecov had finally passed.
Thanks again @dcoa !
@dcoa 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
@kdmccormick looks like this PR is possibly causing failures in the edx.org deployment pipeline. Not sure where the issue lies yet, it's yelling about an old version of the footer component that isn't even in this package-lock.
|
Hi @zacharis278 this occurred because footer component is overridden (using a npm package alias) with |
Thank you! I didn't even realize there was a separate version of this component |
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-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 PR is part of the work to make it possible to configure the frontend applications at runtime (you can referer to this openedx/wg-frontend#103).
Changes
How to test
MFE_CONFIG_API_URL
andAPP_ID
in the env file and add the api url ( To test this you can use the API from this feat: add mfe config api edx-platform#30473 or use an external tool to mock the API response).@edx/frontend-lib-special-exams
clone the repo https://github.com/eduNEXT/frontend-lib-special-exams use the branchdcoa/update-fronted-platform
and use webpack local module configuration (reference) to test it.Note: You can combine buildtime and runtime configuration