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

Improve edx-platform requirements file structure #33875

Open
iamsobanjaved opened this issue Dec 4, 2023 · 1 comment
Open

Improve edx-platform requirements file structure #33875

iamsobanjaved opened this issue Dec 4, 2023 · 1 comment

Comments

@iamsobanjaved
Copy link
Contributor

iamsobanjaved commented Dec 4, 2023

edx-platform's requirements files pretty closely follow the recommendations in OEP-18. But as Kyle McCormick pointed out recently, the pip-tools README has since been updated to recommend something a little different. Try making the following changes:

  1. Benchmark the performance of make upgrade and make requirements before making any changes.
  2. Instead of basing each .in file on the previous fully pinned output file via -r, use -c instead. This should result in a requirements file that has just the dependencies needed for the packages listed in the file currently being processed, but at versions compatible with the previous layer of dependencies.
  3. Rename the output files generated from an input file that builds on top of a previous layer with a _layer suffix, like testing_layer.txt.
  4. Introduce new files with the original output names that include all the dependencies the previous ones did; for example, the new testing.txt would consist of the lines -r base.txt, -r coverage.txt, and -r testing_layer.txt.
  5. Benchmark the performance of make upgrade and make requirements after the changes.

What we hope to gain from this change are the following:

  • Faster make upgrade performance by not having to process as many dependencies for each layer
  • Better ease of reviewing dependency updates, since most dependency versions will only appear in a single requirements file, whereas many currently appear in 3 or more.

In the process, we will lose having a single file (development.txt) that lists essentially all of the packages used by edx-platform. But we rarely use this, and we could easily reproduce it by running pip-compile on the new development.txt.

If the results are good, write new tickets for the following:

  • An update to OEP-18 to recommend this new structure for requirements files
  • Updating all repos owned by arch-bom to comply with the new structure (these could be either BOM or ARCHBOM tickets)
  • Communicating the change to the rest of the organization

Copied description from this private JIRA issue: https://2u-internal.atlassian.net/browse/BOM-2483

@iamsobanjaved
Copy link
Contributor Author

There is a WIP PR that went stale (re-open the PR and make it ready):

There is a suggestion on the PR about how to continue the work: #31085 (comment)

@robrap robrap removed this from Arch-BOM Dec 4, 2023
@jmbowman jmbowman removed this from Arch-BOM Jan 2, 2024
@UsamaSadiq UsamaSadiq self-assigned this Jan 15, 2024
@UsamaSadiq UsamaSadiq moved this from Todo to In Progress in Arbi-BOM Jan 15, 2024
@UsamaSadiq UsamaSadiq removed their assignment Jan 31, 2024
@UsamaSadiq UsamaSadiq moved this from In Progress to Todo in Arbi-BOM Jan 31, 2024
@iamsobanjaved iamsobanjaved moved this from Todo to Backlog in Arbi-BOM Feb 15, 2024
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

No branches or pull requests

2 participants