-
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
Update README to explain how to run this using Tutor #1472
Conversation
Thanks for the pull request, @bradenmacdonald! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
da2cca4
to
47e79f4
Compare
47e79f4
to
c0dbc2a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1472 +/- ##
==========================================
+ Coverage 87.74% 87.78% +0.03%
==========================================
Files 310 310
Lines 5320 5320
Branches 1316 1316
==========================================
+ Hits 4668 4670 +2
+ Misses 635 633 -2
Partials 17 17 ☔ View full report in Codecov by Sentry. |
Idea - could we add a version of this to frontend-build so all the MFEs inherit it by adding a (shorter) script to their package.json? |
package.json
Outdated
@@ -18,6 +18,8 @@ | |||
"postinstall": "patch-package", | |||
"snapshot": "fedx-scripts jest --updateSnapshot", | |||
"start": "fedx-scripts webpack-dev-server --progress", | |||
"start-tutor": "PUBLIC_PATH=/learning/ MFE_CONFIG_API_URL='http://localhost:8000/api/mfe_config/v1' fedx-scripts webpack-dev-server --progress --host apps.local.edly.io", |
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 the localhost:8000 path here for the MFE config API correct? Should that be something in edly.io
? (Tutor newbie question)
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.
It's a URL that Tutor proxies for the LMS. I believe this is correct, and I know that it works. The hostname doesn't matter in this case, as long as it can somehow connect to the LMS to retrieve the config.
https://github.com/search?q=repo%3Aoverhangio%2Ftutor-mfe%20api%2Fmfe_config%2Fv1&type=code
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.
Naming
I remember having a conversation with @arbrandes about the naming for something like this a while back. The general takeaway I remember is "if Tutor is the recommended development environment we should treat it as the default."
Thinking about the naming now I'm not the biggest fan of the name start-tutor
for a couple reasons:
- The aforementioned "treat it as the default"
- Possible confusion as the default behavior when bind-mounting in Tutor is for
start
to be run within the container, notstart-tutor
(unless it makes sense to change that?)
If I were to pick a name today I would follow the pattern Next.js
uses and pick dev
. I figure that way we can keep start
around for legacy/backwards compatibility reasons, and people who want to run an MFE on their dev machine outside of a Tutor docker container can use npm run dev
.
URLs
This one is a question for @kdmccormick - do you know how far off using local.openedx.io
in Tutor is? I figure once this PR lands we'll want to update the READMEs for MFEs across the board to include these instructions. If local.openedx.io
is happening soon we could wait for that and not need to have a round of "replace local.edly.io
with local.openedx.io
" PRs.
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.
@brian-smith-tcril Sure, I like dev
better than start-tutor
as well.
@brian-smith-tcril @kdmccormick Given that it's so easy to change the domain name (see new instructions in the README), we can proactively start using local.openedx.io
now if you want. It means everyone with a default tutor devstack will have to change following the instructions, but lets us start testing it out today and means no need to update this particular MFE's readme in the future. Let me know. I'm fine either way as long as we can merge this PR soon.
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.
Being proactive sounds like a great plan to me!
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.
Alright, I changed this to local.openedx.io
and tested that the revised instructions work.
Yes, this could definitely be integrated into |
22c786b
to
52c06a8
Compare
52c06a8
to
8a0faba
Compare
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.
👍
I generally go through the mounting the repo and re-creating the image route but this seems definitely better and it saves the time to rebuild the image.
- ✅
I tested this: (describe what you tested) - ✅ I read through the code
- ❌ I checked for accessibility issues
- ❌ Includes documentation
- ❌ I made sure any change in configuration variables is reflected in the corresponding client's
configuration-secure
repository.
|
||
.. code-block:: bash | ||
|
||
tutor mounts add /path/to/frontend-app-learning |
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.
We can also add tutor mounts list | grep "learning"
to check if the repo is mounted.
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.
I tested and it's OK to run the command tutor mounts add /path/to/frontend-app-learning
in any case. If the mount is already configured, it's just a no-op. So I don't think it helps anything to check first.
Tutor is now the recommended development environment for Open edX, so this updates the README accordingly.