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

Optimize and reorganize GitHub-hosted dependencies #30719

Merged
merged 6 commits into from
Sep 19, 2022

Conversation

kdmccormick
Copy link
Member

@kdmccormick kdmccormick commented Jul 11, 2022

Description

The TL;DR is that this will decrease the amount of time & bandwidth it takes to run pip install -r requirements/edx/base.txt and therefore reduce the size and build time of Tutor's openedx image. It will do so by optimizing the pins in github.in and encouraging developers to only add PyPI-hosted dependencies instead of GitHub-hosted ones.

For a longer description, see the commits.

Supporting information

None

Testing instructions

If we can run make upgrade from this branch, and the result builds, then we're good.

Deadline

None

Other information

Follow-up:

Post-merge: Open a new GH issue for turning all these pins into PyPI requirements, and potentially deleting github.in altogether.

@kdmccormick kdmccormick self-assigned this Jul 11, 2022
@kdmccormick kdmccormick marked this pull request as draft September 7, 2022 15:25
@kdmccormick kdmccormick force-pushed the kdmccormick/github-in-reorganize branch from cc6ef59 to 5126a44 Compare September 7, 2022 15:44
@kdmccormick kdmccormick marked this pull request as ready for review September 7, 2022 15:47
@kdmccormick kdmccormick marked this pull request as draft September 7, 2022 15:48
@kdmccormick kdmccormick force-pushed the kdmccormick/github-in-reorganize branch from 3c4198a to 05b8885 Compare September 7, 2022 16:11
@kdmccormick kdmccormick changed the title build: use openedx org in github.in + other cleanup build: clean up github.in to use proper openedx-org pins Sep 7, 2022
@kdmccormick kdmccormick force-pushed the kdmccormick/github-in-reorganize branch from 05b8885 to 8f07577 Compare September 8, 2022 16:11
@kdmccormick kdmccormick changed the title build: clean up github.in to use proper openedx-org pins build: optimize github.in & improve its docs Sep 12, 2022
@kdmccormick kdmccormick force-pushed the kdmccormick/github-in-reorganize branch from 8f07577 to 318fcc0 Compare September 19, 2022 17:14
They have fallen out of date since we switched from Jenkins-
run upgrades to GitHub Actions -run upgrades.
They give the impression that, for example,
third-party XBlocks belong in github.in.
In reality, GitHub-hosted requirements should be avoided
in all circumstances. Third-party XBlocks are best
added to base.in as a PyPI-hosted dependency.

Furthermore, the existing section headers are not
even being followed.
We update github.in to use the proper git-based depencency
format specified in the file comment. This format installs
a package as a pre-built wheel:

    git+https://github.com/...

instead of a development-mode editable requirement:

   -e https://github.com/...

Installing packages in editable mode increases the amount of time
it takes to install edx-platform  dependencies, increases the
resulting virtual environment's size, and installs packages in a
way that has several subtle differences compared to the way
wheels are installed:
https://setuptools.pypa.io/en/latest/userguide/development_mode.html#limitations
@kdmccormick kdmccormick force-pushed the kdmccormick/github-in-reorganize branch from 318fcc0 to 02bf6ea Compare September 19, 2022 17:28
@kdmccormick kdmccormick changed the title build: optimize github.in & improve its docs optimize and reorganize github.in Sep 19, 2022
@kdmccormick kdmccormick changed the title optimize and reorganize github.in Optimize and reorganize GitHub-hosted dependencies Sep 19, 2022
I would expect the post-pip-compile steps in `make upgrade`
to have taken care of chaninging `-e file://...`
into `-e .`, but it didn't for some reason.

Normally I would debug this, but
#30890
is going to merge in a week or two and it
will remove `-e .` from the requirement pins
entirely, so I'm just going to fix it manually for now.
@kdmccormick kdmccormick marked this pull request as ready for review September 19, 2022 17:39
@kdmccormick kdmccormick merged commit f42427a into master Sep 19, 2022
@kdmccormick kdmccormick deleted the kdmccormick/github-in-reorganize branch September 19, 2022 17:54
@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been rolled back from the production environment.

@kdmccormick
Copy link
Member Author

Rerverted in #31021

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

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

Successfully merging this pull request may close these issues.

4 participants