we have an inconsistent behavior for azure pipeline runs/reruns.
Situation:
We have one package in the azure artifact registry, we can import it locally and use it in a normal way.(Let’s assume for this question it is working as expected). Now we want to use that package in a second repository, within the CICD pipeline.
Our CICD pipeline is a classic azure yaml pipeline and makes multiple checks based on python dependencies. One of those is the before mentioned package. Since we use poetry but want to use requirements.txt for installation we do an intermediate step in which we poetry exports to a requirements.txt. After that the pipeline tries to install these dependencies.
This is our bash script in the pipeline:
- bash: pip install --no-cache-dir --upgrade -r requirements.txt --extra-index-url ${{ parameters.EXTRA_INDEX_URL }}
condition: ne('${{ parameters.EXTRA_INDEX_URL }}', '')
displayName: Install dependencies with extra-index-url
The extra index-url is supplied via pipeline.
The error that comes up in the failed pipeline is this one:
ERROR: Could not find a version that satisfies the requirement package_name==0.1.4 (from versions: none)
ERROR: No matching distribution found for package_name==0.1.4
So far so good, an error that may be expected due to different problems(although we have no solution, at the moment).
But here is the weird part, my colleague reran the failed jobs, which includes this one, just a few moments later. And now all of a sudden it works.
Collecting package_name==0.1.4 (from -r requirements.txt (line 34))
Downloading https://pkgs.dev.azure.com/company/6a6a47aa-a6ae-48cf-abc7-e26c12d6f4ab/_packaging/a19cbe6e-aad3-4b9c-857a-786e475efddc/pypi/download/feed-name/0.1.4/package_name-0.1.4-py3-none-any.whl (7.4 kB)
No Errors nothing. How does this happen? We did not change the code in any way. May this be a caching issue? We are not using any cache task in azure devops.
Does anyone have a good way to start debugging?
Thank you in advance, if you new more specifics feel free to ask.