Hi all,
I have been doing changes to the MFE authn via the @edx/brand package. I have created the plugin respectively and have been able to see the changes on my login page, mainly following the instructions from the following post.
The problem I’m facing is getting to update the changes from the plugin to the local and dev deployments. When running “tutor images build mfe”, the process don’t always gets the changes on the gitbhub repository. Sometime I got the following messages on the CLI
=> CACHED [authn-common 5/7] RUN npm install '@edx/brand@git+https://github.com/ib 0.0s
Which show me that they have not updated the repository and got it from the CACHE version. I have run “tutor images build mfe --no-cache” but the process taks a lot of time and I want to know if there is another better approach.
I have tried to create my local copy of the frontend-app-authn followinf the instruction from the following post and running o dev mode.
But with this approach I haven’t been able to see changes neither. When getting to the login page, all I can see is a blank page.
Finally, my goal is to personalized the login page, I have tried both approaches described above but I haven’t gotten the results expects.
Is there any other approach, step, or information I am missing?
My npm version was wrong, I updated and was able to do changes on the login page with the _overrides.scss files, I can see those changes on dev, thanks for your help.
I guess my last questions, is how can I push those changes to the production instance running with local?, Do I have to do a tutor images build openedx
I did a tutor images build mfe --no-cache and it didn’t updated the login page with the changes.
Another thing I noticed, is that the changes on dev for the login page didn’t apply language configuration, all the website is in spanish, but the new login page with the changes on style is now in english.
Do I need to build openedx?
I really appreciate your help Juan Carlos, any other idea?
Yes, it is correct has you said. I was able to do changes on my tutor dev start environments after mounting the repository and changing the brand package, but those changes didn’t appear in production after running tutor images build mfe --no-cache, neither when running tutor images build openedx --no-cache
It might be your local/production isn’t using your repository. If that’s the case, you have to verify the below steps for prod.
Fork the authn repo and make changes to it what you exactly want. (that’s what you already did)
Now, create a custom plugin or you can make changes to existing plugin (tutor-indigo). Add this line of code. For further info,
from tutormfe.hooks import MFE_APPS
@MFE_APPS.add()
def _add_my_mfe(mfes):
mfes["authn"] = {
"repository": "https://github.com/myorg/mymfe.git", # your public/private repo link
"port":1999,
"version": "me/my-custom-branch-or-tag", # optional, will default to the Open edX current tag.
}
return mfes
Run tutor config save
The above code is for using authn repository. Now, for brand package installation.
In your custom or existing plugin, write the below code: For further info,
from tutor import hooks
hooks.Filters.ENV_PATCHES.add_items(
[
(
"mfe-dockerfile-post-npm-install-authn",
"""
RUN npm install '@edx/brand@npm:@edly-io/indigo-brand-openedx@^2.1.1' OR
RUN npm install '@edx/brand@git+https://github.com/edx/brand-edx.org.git'
""",
]
)
tutor config save
Now, build the mfe image using tutor images build mfe