-
Notifications
You must be signed in to change notification settings - Fork 567
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
Caching does not work when using an internal package repo #984
Comments
|
Hello @screig, |
Hy, After investigating we found the following issues were causing the caching to fail, such as secret handling, syntax error in the "pip install -r requirements.txt --extra-index-url https://${ado_token}@OUR_INETERNAL_ADO_PACKAGE REPO/_packaging/sepypi/pypi/simple/" which was an invalid format for pip install. So, the initial fix was made in the following way: pip install -r requirements.txt --extra-index-url https://${{secrets.ado_token}}@OUR_INETERNAL_ADO_PACKAGE_REPO.git@main#egg=simple&subdirectory=_packaging/sepypi/pypi/simple Caching was working when we tried it this way but there some deprecation happening while using --extra-index-url , so we fixed it using the following: pip install -r requirements.txt --extra-index-url https://${{ secrets.ado_token }}@https://github.com pip install git+@OUR_INETERNAL_ADO_PACKAGE_REPO.git@main#egg=simple&subdirectory=_packaging/sepypi/pypi/simple So, we have addressed the following issues while trying to fix the caching problem. If these workarounds do not resolve the issue, please provide a link to the build or the public repository to help us further investigate. |
Description:
The caching feature wont work if one is pip installing from another python package repository.
Action version:
actions/setup-python@v5
Platform:
Runner type:
Current runner version: '2.321.0'
Runner Image
Image: ubuntu-22.04
Version: 20241201.1.0
Tools version:
I think it applies across Python versions
Repro steps:
The code is on our internal repo so I can share a link, here is the yaml
First we set up Python, and specify that we wish to cache.
Next I install two sets of requirements
requirements_for_testing.txt contains packages that we can get from pypi. Now here the caching works fine.
Next we need to install requirements that include our internal packages on our internal ADO package repo.
pip install -r requirements.txt --extra-index-url https://${ado_token}@OUR_INETERNAL_ADO_PACKAGE REPO/_packaging/sepypi/pypi/simple/
Here the caching never works.
Expected behaviour:
I would expect it to cache.
Actual behaviour:
Its not caching...
The text was updated successfully, but these errors were encountered: