Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Auto-sync dependencies between code and virtual env #1028

Open
1 task
rgraber opened this issue Feb 27, 2023 · 0 comments
Open
1 task

Auto-sync dependencies between code and virtual env #1028

rgraber opened this issue Feb 27, 2023 · 0 comments

Comments

@rgraber
Copy link
Contributor

rgraber commented Feb 27, 2023

This issue was created from #1013. Most of the description has been copied over from there, and adapted for this part of the work.

One of the most frequent causes of frustration with devstack is that LMS fails to start because the code is out of sync with the virtualenv. This can happen because either:

The user has run git pull on edx-platform, or
The user has run make dev.pull.lms in devstack

Either of these can leave the LMS image with newer code than dependencies, or newer dependencies than code. Even doing both is not necessarily enough, as the latest built image may be a bit behind the latest edx-platform commit.

The usual solution, and the workflow that experienced devstack users know to do, is to always run make lms-shell and then inside that run make requirements. However, this is unnecessarily manual.

A/C

  • New requirements in the code are automatically installed into the virtual env inside the container

Notes

One suggestion from @timmc-edx :
So, we could put make requirements into the [runserver] loop [which allows the server to pick up changes in code], and ensure that development.txt is one of the watched files.

Perhaps it might be slow, but in that case we could fingerprint the virtualenv and only run it when the stored fingerprint no longer matches. (make requirements takes 20 seconds to run, but find ~/edx-repos/edx-platform/venv-3.8/ -printf '%P %t %s %i %m %U %G\n' | sort | sha256sum takes 0.5 seconds.)

@rgraber rgraber added the backlog Item is on a team's backlog or wish list. label Feb 27, 2023
@rgraber rgraber added this to Arch-BOM Feb 27, 2023
@rgraber rgraber moved this to Todo in Arch-BOM Feb 27, 2023
@robrap robrap removed the backlog Item is on a team's backlog or wish list. label Apr 20, 2023
@jristau1984 jristau1984 moved this from Prioritized to Backlog in Arch-BOM Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants