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

refactor: moves the openedx pip requirements into a patch #670

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

pomegranited
Copy link
Contributor

@pomegranited pomegranited commented Mar 19, 2024

Uses a patch to add extra python requirements to Open edX instead of using the OPENEDX_EXTRA_PIP_REQUIREMENTS variable.

I've been running into issues with using Aspects with other Tutor plugins that also overwrite OPENEDX_EXTRA_PIP_REQUIREMENTS , and someone on my team suggested this patch approach.

This change allows Tutor operators to use this variable to override or add their own extra requirements without disrupting Aspects.

Testing instructions

Rebuild your openedx(-dev) image using this branch.
Note that the platform-plugin-aspects and edx-event-routing-backends packages get installed as expected.

instead of using the OPENEDX_EXTRA_PIP_REQUIREMENTS variable. This
allows Tutor operators to use this variable to add their own extra
requirements.
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 19, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @pomegranited! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@pomegranited pomegranited requested review from Ian2012 and bmtcril March 19, 2024 00:09
@@ -0,0 +1,2 @@
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \
pip install "platform-plugin-aspects==0.3.1" "edx-event-routing-backends==v8.1.1"
Copy link
Contributor

@Ian2012 Ian2012 Mar 19, 2024

Choose a reason for hiding this comment

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

Thanks for this change. Can you split every requirement into a separate line?
Have you tested this with mounts and verify that the dev installation remains as the one installed instead of the defined version here?
Is this compatible with older versions of tutor?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we tried this before and it didn't work on Nutmeg Tutor, but my memory is hazy.

Copy link
Contributor

Choose a reason for hiding this comment

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

That said, since we've effectively slipped a whole release we may wish to move support to Olive and up if necessary.

Copy link
Contributor Author

@pomegranited pomegranited Mar 19, 2024

Choose a reason for hiding this comment

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

Can you split every requirement into a separate line?

Absolutely: e84ff53

Have you tested this with mounts and verify that the dev installation remains as the one installed instead of the defined version here?

I have not tested this with dev mounts, no. But this patch gets applied before OPENEDX_EXTRA_PIP_REQUIREMENTS are installed, so you can always override that variable in your dev env to install different versions.

Is this compatible with older versions of tutor?

Yes. This patch has been around since Tutor v11.2.7, and is definitely in v14.0.0 / Nutmeg.

I think we tried this before and it didn't work on Nutmeg Tutor, but my memory is hazy.

I don't remember trying it.. but I can test it if we need to make sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bmtcril are you ok with this change?

Copy link
Contributor

@bmtcril bmtcril left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@bmtcril bmtcril merged commit 85508c1 into main Mar 20, 2024
9 checks passed
@bmtcril bmtcril deleted the jill/openedx-requirements-patch branch March 20, 2024 01:52
@openedx-webhooks
Copy link

@pomegranited 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@itsjeyd itsjeyd added the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Mar 22, 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.

5 participants