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

Use devpi as PyPI cache #6340

Closed
wants to merge 10 commits into from
Closed

Use devpi as PyPI cache #6340

wants to merge 10 commits into from

Conversation

humitos
Copy link
Member

@humitos humitos commented Oct 30, 2019

This is a working POC to use a devpi-server on development. Anyways, do not merge! This is more a way to share the diff for now and be able to apply it when needed.

Use devpi-server inside docker (when running under docker-compose) to speed up python package installation when triggering builds.

Adds a new service for docker-compose that spin up a devpi-server to cache all the Python packages used by the builders.

If configured, --index-url and --trusted-host is added to all the pip commands.

Closes #3553

Adds a new service for docker-compose that spin up a devpi-server to
cache all the Python packages used by the builders.

If configured, `--index-url` and `--trusted-host` is added to all
the `pip` commands.

Fixes #3553
@humitos humitos added the PR: work in progress Pull request is not ready for full review label Oct 30, 2019
@ericholscher
Copy link
Member

Is this meant to be used in prod, or only on dev? It could perhaps speed up builds if we had it in prod, but I don't know if we want to maintain it, and fastly is likely fast enough already to minimize this being a huge install-time issue.

@humitos
Copy link
Member Author

humitos commented Oct 31, 2019

The original idea was to use when developing since if you are doing some work related to the build process, it takes a lot of time to download each package over and over again (even more now that we are cleaning up after build ends). Also, when working with limited internet access.

Although, I'm not opposite to use this in production if there is a real difference between downloading from internal cache than from internet.

@humitos humitos changed the base branch from humitos/docker-compose to master November 25, 2019 19:36
@humitos humitos marked this pull request as ready for review November 25, 2019 19:36
@humitos humitos removed the PR: work in progress Pull request is not ready for full review label Nov 25, 2019
@humitos humitos mentioned this pull request Dec 5, 2019
@humitos humitos added the PR: work in progress Pull request is not ready for full review label Jan 7, 2020
@humitos
Copy link
Member Author

humitos commented Jan 7, 2020

Marking as WIP for now since the docker file could be moved to common repository now and we want to integrate with invoke commands as well.

@humitos humitos removed the PR: work in progress Pull request is not ready for full review label Jan 13, 2020
@humitos
Copy link
Member Author

humitos commented Jan 13, 2020

This PR is updated and ready for review. Some code was moved to the linked common PR.

@stale
Copy link

stale bot commented Feb 27, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: stale Issue will be considered inactive soon label Feb 27, 2020
@humitos
Copy link
Member Author

humitos commented Feb 28, 2020

This PR needs to be updated with latest changes con common repository for docker compose setup. I will try to do this when I have some time.

@stale stale bot removed the Status: stale Issue will be considered inactive soon label Feb 28, 2020
@humitos humitos added the PR: work in progress Pull request is not ready for full review label Feb 28, 2020
@stale
Copy link

stale bot commented Apr 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: stale Issue will be considered inactive soon label Apr 13, 2020
@humitos humitos removed the PR: work in progress Pull request is not ready for full review label Apr 21, 2020
@humitos humitos removed the Status: stale Issue will be considered inactive soon label Apr 21, 2020
@humitos
Copy link
Member Author

humitos commented Apr 21, 2020

This is ready for review. It should work in a transparent way on development environment. It can be disabled with --no-devpi

@humitos humitos requested review from ericholscher and a team April 21, 2020 13:53
@stsewd
Copy link
Member

stsewd commented Apr 21, 2020

No really sure this is a big improvement, if I'm having a slow connection I just set this setting to false

RTD_CLEAN_AFTER_BUILD = True

Also, this requires to spin another container, docker is already slow for some people.

@humitos
Copy link
Member Author

humitos commented May 11, 2020

No really sure this is a big improvement, if I'm having a slow connection I just set this setting to false

This requires to re-download all the packages again for every different project.

Also, this requires to spin another container, docker is already slow for some people.

You can decide to not use this just by passing --no-devpi. Which is easier than modifying a settings file.

@humitos
Copy link
Member Author

humitos commented May 19, 2020

Any objection on merging this?

@stale
Copy link

stale bot commented Jul 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: stale Issue will be considered inactive soon label Jul 3, 2020
@humitos humitos added Accepted Accepted issue on our roadmap and removed Status: stale Issue will be considered inactive soon labels Jul 3, 2020
@humitos
Copy link
Member Author

humitos commented Jul 3, 2020

I'll try to tackle this next week and merge it.

@humitos
Copy link
Member Author

humitos commented Jul 1, 2021

This didn't have too much traction and nobody has complained about slow connections in a while. Let's come back to this when we are allowed to travel and be behind a cell connection 😄

@humitos humitos closed this Jul 1, 2021
@stsewd stsewd deleted the humitos/use-devpi-cache branch July 1, 2021 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support devpi inside docker containers
3 participants