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

nightly: fix: installation of local requirements #728

Merged
merged 1 commit into from
Oct 3, 2022

Conversation

regisb
Copy link
Contributor

@regisb regisb commented Oct 3, 2022

The compilejsi18n command was failing during image building because the Open-edX package was not installed properly. The reason for that was an earlier change where we got rid of the pip install -r requirements/edx/local.in command. Installing the Open-edX package was part of this requirement file.

The local.in requirements file no longer exists, but we still need to pip install -e . the edx-platform repo. To run this command we need both the edx-platform repo and the virtualenv.

The good news is that there are no more local requirements in the base.txt requirements file. This means that we no longer have to COPY the edx-platform repo in the requirements installation step. Thus, changes in edx-platform will no longer trigger a rebuild of the pip requirements; this means that re-builds will be much faster when making changes to edx-platform.

Note that plugins that implemented the
"openedx-dockerfile-post-python-requirements" patch and that needed access to the edx-platform repo will no longer work. Instead, these plugins should implement the "openedx-dockerfile-pre-assets" patch. This scenario should be very rare, though.

Close #726

The `compilejsi18n` command was failing during image building because the
Open-edX package was not installed properly. The reason for that was an earlier
change where we got rid of the `pip install -r requirements/edx/local.in`
command. Installing the Open-edX package was part of this requirement file.

The local.in requirements file no longer exists, but we still need to `pip
install -e .` the edx-platform repo. To run this command we need both the
edx-platform repo and the virtualenv.

The good news is that there are no more local requirements in the base.txt
requirements file. This means that we no longer have to COPY the edx-platform
repo in the requirements installation step. Thus, changes in edx-platform will
no longer trigger a rebuild of the pip requirements; this means that re-builds
will be much faster when making changes to edx-platform.

Note that plugins that implemented the
"openedx-dockerfile-post-python-requirements" patch and that needed access to
the edx-platform repo will no longer work. Instead, these plugins should
implement the "openedx-dockerfile-pre-assets" patch. This scenario should be
very rare, though.

Close #726
@regisb regisb force-pushed the regisb/fix-edx-platform-reqs branch from 3add196 to 49ce8b8 Compare October 3, 2022 10:53
@regisb
Copy link
Contributor Author

regisb commented Oct 3, 2022

FYI @kdmccormick @Carlos-Muniz

@regisb
Copy link
Contributor Author

regisb commented Oct 3, 2022

I believe that with this change we can close openedx-unsupported/wg-developer-experience#86 right @kdmccormick?

Comment on lines +79 to +80
COPY --from=code /openedx/edx-platform/requirements/edx/base.txt /tmp/base.txt
RUN pip install -r /tmp/base.txt
Copy link
Collaborator

@kdmccormick kdmccormick Oct 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally stylistic, but you could still copy the base.txt file to its typical location. Docker will create all the parent directories for you. Up to you.

Suggested change
COPY --from=code /openedx/edx-platform/requirements/edx/base.txt /tmp/base.txt
RUN pip install -r /tmp/base.txt
COPY --from=code /openedx/edx-platform/requirements/edx/base.txt /openedx/edx-platform/requirements/edx/base.txt
WORKDIR /openedx/edx-platform
RUN pip install -r ./requirements/edx/base.txt

@kdmccormick
Copy link
Collaborator

Yup, this will take care of openedx-unsupported/wg-developer-experience#86!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants