-
Notifications
You must be signed in to change notification settings - Fork 7
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
chore: add algoliasearch dependency [BB-8083] #606
chore: add algoliasearch dependency [BB-8083] #606
Conversation
Sandbox deploy request received. Deployment will start soon. |
Sandbox deployment started. |
Sandbox deployment failed. Check failure logs here https://grove-stage-build-logs.nyc3.digitaloceanspaces.com/34602668-5566750713.log Please check the settings and requirements and retry deployment by updating the pull request or posting a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although it's designed to be able to run separately from edx-platform
I didn't check this, but I thought edx-enterprise
was an extension/plugin (like the edx-completion
, etc.).
I don't understand why we need this change. When you install edx-enterprise
(e.g., with pip install git+https://github.com/open-craft/edx-enterprise.git@0x29a/bb8083/per-user-algolia-key-nutmeg
), the install_requires
argument is verified. It should pull the dependencies from the package's requirements/base.in
(you already added algoliasearch
there in open-craft/edx-enterprise#12. The same thing happens when we install platform dependencies.
If the problem is that it tries to install 3.0.0
, we could pin this dependency to "<3.0.0" in the base.in
file (I know that the pins should be in the constraints
files, but the setup.py
of the edx-enterprise
repo doesn't support the constraint files, so this is faster).
@Agrendalath, I guess what I wrote in the description is a poor re-phrasal of this comment: edx-platform/lms/envs/common.py Lines 4579 to 4583 in a521936
Give this comment and that I didn't find Anyway, I uninstalled |
Done. |
Sandbox update request received. Deployment will start soon. |
TL;DR: It's intentional because we use the same Python environment for the IDAs and all their dependencies. It would be too hard to manage dependencies without this. In some repos, we even omit compiled dependency lists while building Python packages to avoid using them by mistake. ExampleDuring the deployment, additional dependencies are installed sequentially, so every minor version change would reinstall tons of packages, which is not something we ever want to do. Let's say we bump the Django patch version in This process would make all previous version tags unusable, as they would downgrade other packages (I don't even want to imagine managing the compatibility with older named Open edX releases). We could mitigate this by compiling dependencies for all packages (from the whole dependency graph, not only from the explicit requirements) in the deployment pipelines (right before their installation). However, with this many dependencies, it would be very slow and very error-prone. Perhaps other package installers have some native ways to handle such use cases, but migrating to them would be challenging (though the part after convincing everyone to use them could be rather straightforward). |
@Agrendalath, ah, I think I understand now. Since
Perhaps another option is what |
Yep, exactly. No problem!
That's an interesting approach. However:
|
This is needed for open-craft/edx-enterprise#12 and open-craft/frontend-app-learner-portal-enterprise#2.
We can't add this dependency directly to
edx-enterprise
, because although it's designed to be able to run separately fromedx-platform
, currently it uses platform's dependencies.