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

Update README to explain how to run this using Tutor #1472

Merged
merged 4 commits into from
Sep 19, 2024

Conversation

bradenmacdonald
Copy link
Contributor

Tutor is now the recommended development environment for Open edX, so this updates the README accordingly.

@openedx-webhooks
Copy link

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If 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 @openedx/committers-frontend-app-learning. Tag them in a comment and let them know that your changes are ready for review.

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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Sep 12, 2024
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.78%. Comparing base (68a7bf5) to head (824efbb).
Report is 16 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

@davidjoy
Copy link
Contributor

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",
Copy link
Contributor

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)

Copy link
Contributor Author

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

Copy link
Contributor

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, not start-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.

Copy link
Contributor Author

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.

Copy link
Contributor

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!

Copy link
Contributor Author

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.

@bradenmacdonald
Copy link
Contributor Author

Yes, this could definitely be integrated into fedx-scripts or something like that.

@bradenmacdonald bradenmacdonald force-pushed the braden/tutor-docs branch 3 times, most recently from 22c786b to 52c06a8 Compare September 16, 2024 17:30
Copy link
Member

@farhaanbukhsh farhaanbukhsh left a 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
Copy link
Member

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.

Copy link
Contributor Author

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.

@bradenmacdonald bradenmacdonald merged commit f8d35bf into openedx:master Sep 19, 2024
7 checks passed
@bradenmacdonald bradenmacdonald deleted the braden/tutor-docs branch September 19, 2024 16:55
@itsjeyd itsjeyd added the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants