-
Notifications
You must be signed in to change notification settings - Fork 97
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
Adding new MFEs causes dev start
to fail with image pull error
#111
Comments
@arbrandes or @ghassanmas , would either of you have time to take a look? |
Kyle, would it be acceptable if we just amended the docs to say that developers must build the dev image themselves with |
other way to resolve would be in this patch https://github.com/overhangio/tutor-mfe/blob/master/tutormfe/patches/local-docker-compose-dev-services instead of iterating on all |
@regisb
|
For the record, I like @ghassanmas's idea. The Relatedly, @kdmccormick, FYI @brian-smith-tcril is working on improvements to that plugin, which you may want to look at. |
This would mean that we no longer support adding MFE apps via the "*_MFE_APP" config, right? With @ghassanmas' suggestion we would no longer have issues starting the custom MFEs in development mode, but we would also lose the possibility of running custom MFEs in a development environment. So we need to find a better solution.
Right. But if it did work, would it be an acceptable solution @kdmccormick? Or would we need something more transparent, like auto-build on start? |
I think there are two issues here:
I think we can solve these both, but I want to consider the solutions separately: Smaller proposal: just fix (1)We add a new field to the Implementing this would mean adding some additional conditional logic to the dev/docker-compose.yml template. Bigger proposal: fix (1) and (2)We create a new Filter, call it {
"authn": {
# These are the same values that are in *_MFE_APP today.
"repository": "https://github.com/openedx/frontend-app-authn",
"port": 1999,
"version": "open-release/nutmeg.2", # Optional. Defaults to {{ MFE_COMMON_VERSION }}.
# This is the new dev_image_url proposal.
# Optional. Defaults to None, in which case it's always built instead of pulled.
"dev_image_url": "{{ DOCKER_REGISTRY }}overhangio/openedx/authn-dev",
},
"account": {
"repository": ...,
"port": ...,
},
"profile": {
...,
},
...,
} User plugins could add or modify MFEs like such: # (aside: This would be our first instance of having a plugin-defined hook.
# Here, I suggest a convention: plugins can define custom Actions
# and Filters catalog classes under <pluginpackage>/hooks.py)
# an define their own Actions and Filters catalogs under <package>/hooks.py)
from tutormfe.hooks import Filters as MfeFilters
MfeFilters.MFE_APPS.add()
def _add_cool_new_mfe(mfe_apps: dict) -> dict:
mfe_apps["coolnew"] = {
"repository": "https://github.com/arbrandes/frontend-app-cool-new-feature",
"port": 2023,
}
MfeFilters.MFE_APPS.add()
def _use_custom_profile_version(mfe_apps: dict) -> dict:
mfe_apps["profile"]["repository"] = "https://github.com/arbrandes/frontend-app-profile"
mfe_apps["profile"]["version"] = "arbrandes/profile-rework" Inside tutor-mfe, the One consideration with this proposal is that users could no longer add or modify MFEs just with |
@regisb , I think it would be acceptable if forgetting to build led you to a helpful error message. Something like "image does not exist" seems OK to me, but "pull access denied" does not. Auto-build on start would be even better. |
@kdmccormick re: proposed solution 2 above: |
@brian-smith-tcril Yes. |
I vote for @kdmccormick's "Bigger Proposal". It reads very much in line with the rest of the landscape. |
Yes, Kyle's "bigger proposal©" is great. A couple of notes:
|
💯
@regisb Yeah, I went back and forth on this one. I chose the dict because it lends itself well to partially or fully overriding parameters for an MFE, like: MfeFilters.MFE_APPS.add()
def _use_custom_profile_version(mfe_apps: dict) -> dict:
mfe_apps["profile"]["repository"] = "https://github.com/arbrandes/frontend-app-profile"
mfe_apps["profile"]["version"] = "arbrandes/profile-rework"
return mfe_apps How would you see that working with a list? Perhaps: if multiple MFE_APPS entries exist with the same name, use the last one? |
EDIT: no, this is not a good idea. See below. |
@regisb If we go with that, then changing the repository or branch for an MFE would require something like this: MfeFilters.MFE_APPS.add()
def _use_custom_profile_version(mfe_apps: list[dict]) -> list[dict]:
for mfe_app in mfe_apps:
if mfe_app["name"] == "profile":
mfe_app["repository"] = "https://github.com/arbrandes/frontend-app-profile"
mfe_app["version"] = "arbrandes/profile-rework"
return mfe_apps Do you all like that? Personally, I feel like this is too much code for such a common task. Perhaps I'm overestimating how often users will want to override an MFE's repo & branch. |
I agree, it's too much. You're right, I think we should go with a dict and your initial proposal. |
Hello everyone, I was just going through the same issue that is I was unable to start Error response from daemon: pull access denied for overhangio/openedx-custom_mfe-dev, repository does not exist or may require 'docker login': denied: requested access to the resource is denied Also, I was unable to build the custom-mfe image for dev environment using The reason I found is that in I propose the below solution to that. Add custom_mfe name as a list in tutor config variable like [example: tutor config save --set CUSTOM_MFES="['mfe1', 'mfe2']"]. and then pick its value in Looking forward for your thoughts. |
@Hina-softwareEngineer, I think we're going to go with @kdmccormick initial proposal. It achieves the same results as yours, but with plugins instead of configuration variables. (Which, at this point, we prefer.) The only thing is that currently nobody is working on an implementation. |
Working on this for Palm. |
With this new release, we make use of persistent bind-mounts to make it much easier to work on MFE forks. In addition, adding new MFEs is no longer done with `*_MFE_APP` settings, which was awkward, but with appropriate plugins. Close #111.
Hey @kdmccormick, @arbrandes, The workflow is short and sweet, I think:
Eager to discuss this with you. I'll present this during the next DevEx meetup on Monday. |
With this new release, we make use of persistent bind-mounts to make it much easier to work on MFE forks. In addition, adding new MFEs is no longer done with `*_MFE_APP` settings, which was awkward, but with appropriate plugins. Close #111.
With this new release, we make use of persistent bind-mounts to make it much easier to work on MFE forks. In addition, adding new MFEs is no longer done with `*_MFE_APP` settings, which was awkward, but with appropriate plugins. Close #111.
With this new release, we make use of persistent bind-mounts to make it much easier to work on MFE forks. In addition, adding new MFEs is no longer done with `*_MFE_APP` settings, which was awkward, but with appropriate plugins. Close #111.
I tested the changes, and I approve whole-heartedly! |
With this new release, we make use of persistent bind-mounts to make it much easier to work on MFE forks. In addition, adding new MFEs is no longer done with `*_MFE_APP` settings, which was awkward, but with appropriate plugins. Close #111.
With this new release, we make use of persistent bind-mounts to make it much easier to work on MFE forks. In addition, adding new MFEs is no longer done with `*_MFE_APP` settings, which was awkward, but with appropriate plugins. Close #111. Additional changes: - feat: Add support for the ORA Grading MFE: The MFE is accessible by instructors in ORA exercises that have explicit staff grading steps. The corresponding waffle flag is installed and enabled by default. - feat: Add support for the Communications MFE: The MFE is usable by instructors to send bulk email to learners in a course. The feature itself (the ability to send bulk email) pre-dates this MFE, and must be enabled as usual for the "Email" tab to become visible in the Instructor Dashboard. The difference is that with this change, the tab will include a link to the MFE by default. - chore: upgrade node to v18
With this new release, we make use of persistent bind-mounts to make it much easier to work on MFE forks. In addition, adding new MFEs is no longer done with `*_MFE_APP` settings, which was awkward, but with appropriate plugins. Close overhangio#111. Additional changes: - feat: Add support for the ORA Grading MFE: The MFE is accessible by instructors in ORA exercises that have explicit staff grading steps. The corresponding waffle flag is installed and enabled by default. - feat: Add support for the Communications MFE: The MFE is usable by instructors to send bulk email to learners in a course. The feature itself (the ability to send bulk email) pre-dates this MFE, and must be enabled as usual for the "Email" tab to become visible in the Instructor Dashboard. The difference is that with this change, the tab will include a link to the MFE by default. - chore: upgrade node to v18
With this new release, we make use of persistent bind-mounts to make it much easier to work on MFE forks. In addition, adding new MFEs is no longer done with `*_MFE_APP` settings, which was awkward, but with appropriate plugins. Close overhangio#111.
With this new release, we make use of persistent bind-mounts to make it much easier to work on MFE forks. In addition, adding new MFEs is no longer done with `*_MFE_APP` settings, which was awkward, but with appropriate plugins. Close overhangio#111. Additional changes: - feat: Add support for the ORA Grading MFE: The MFE is accessible by instructors in ORA exercises that have explicit staff grading steps. The corresponding waffle flag is installed and enabled by default. - feat: Add support for the Communications MFE: The MFE is usable by instructors to send bulk email to learners in a course. The feature itself (the ability to send bulk email) pre-dates this MFE, and must be enabled as usual for the "Email" tab to become visible in the Instructor Dashboard. The difference is that with this change, the tab will include a link to the MFE by default. - chore: upgrade node to v18
With this new release, we make use of persistent bind-mounts to make it much easier to work on MFE forks. In addition, adding new MFEs is no longer done with `*_MFE_APP` settings, which was awkward, but with appropriate plugins. Close overhangio#111. Additional changes: - feat: Add support for the ORA Grading MFE: The MFE is accessible by instructors in ORA exercises that have explicit staff grading steps. The corresponding waffle flag is installed and enabled by default. - feat: Add support for the Communications MFE: The MFE is usable by instructors to send bulk email to learners in a course. The feature itself (the ability to send bulk email) pre-dates this MFE, and must be enabled as usual for the "Email" tab to become visible in the Instructor Dashboard. The difference is that with this change, the tab will include a link to the MFE by default. - chore: upgrade node to v18
With this new release, we make use of persistent bind-mounts to make it much easier to work on MFE forks. In addition, adding new MFEs is no longer done with `*_MFE_APP` settings, which was awkward, but with appropriate plugins. Close overhangio#111. Additional changes: - feat: Add support for the ORA Grading MFE: The MFE is accessible by instructors in ORA exercises that have explicit staff grading steps. The corresponding waffle flag is installed and enabled by default. - feat: Add support for the Communications MFE: The MFE is usable by instructors to send bulk email to learners in a course. The feature itself (the ability to send bulk email) pre-dates this MFE, and must be enabled as usual for the "Email" tab to become visible in the Instructor Dashboard. The difference is that with this change, the tab will include a link to the MFE by default. - chore: upgrade node to v18
The README describes how to add extra MFEs to the plugin. I've used this method successfully in the past.
I'm trying to run the tutor-contrib-library-authoring-mfe plugin, which uses that same method in order to add frontend-app-library-authoring. I ran the following:
This all worked fine. However when I try to start the MFE:
I get:
It looks like Tutor is trying to pull the non-existent
docker.io/overhangio/openedx-library-authoring-dev
image. I think it should try to instead build that image, since we wouldn't expect it to exist in the overhangio DockerHub repo.Looking at
$(tutor config printroot)/env/dev/docker-compose.yml
, I see:I suspect this is related the the MFE runtime config change, because up until that change, all MFE images were build locally; none of them were pulled down from DockerHub.
tutor version: 15.2.0-nightly
tutor-mfe version: 15.0.5 nightly
The text was updated successfully, but these errors were encountered: