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

fix: avoid using pip caching #225

Closed
wants to merge 10 commits into from
Closed

Conversation

emmettbutler
Copy link
Contributor

This change attempts to fix a rare error from dd-trace-py's main-branch CI (example) in which the following is output from riot:

Running riot hash: 55a0f54
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
INFO:riot.riot:Generating virtual environments for interpreters Interpreter(_hint='3.7')
INFO:riot.riot:Skipping creation of virtualenv '/root/project/.riot/venv_py3716' as it already exists.
INFO:riot.riot:Skipping global deps install.
INFO:riot.riot:Running with Interpreter(_hint='3.7')
INFO:riot.riot:Installing venv dependencies .riot/requirements/55a0f54.txt at /root/project/.riot/venv_py3716_mock_pytest_pytest-mock_coverage_pytest-cov_opentracing_hypothesis6451_responses~0160_cryptography39_pytest-randomly_snowflake-connector-python~230.
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    unknown package:
        Expected sha256 11f7ff1c01b2aaa52c0030300b89e446a3eac2168642331c73557946e8498963
             Got        69e2889d822b7820d193d394d584a59fc86773dce09de752429b0bc5164d9ff9

The fix is based on the accepted answer to this StackOverflow question: https://stackoverflow.com/questions/40183108/python-packages-hash-not-matching-whilst-installing-using-pip

@brettlangdon
Copy link
Member

Does this have any impact on CI runtime? I'm guessing no since we don't copy dependencies between jobs anyways..?

but would it impact multiple riot runs on a single node?

@emmettbutler
Copy link
Contributor Author

@brettlangdon It would impact sequential riot runs on the same CircleCI executor when those runs use the same version of a given package. I think that's a pretty marginal impact.

@emmettbutler emmettbutler deleted the emmett.butler/no-cache branch June 28, 2024 18:19
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

Successfully merging this pull request may close these issues.

2 participants