Skip to content

Failure to install older pip versions (24.2) where 25.1 is the default when actions/cache@v4 hit a cache #1101

Closed
@shachafl

Description

@shachafl

Description:
Workflow failure after getting error (see below) when trying to install a specific pip version. The same workflow worked without issues about 3 weeks ago, and no new changes were made on my end.
In this iteration, it worked once when no cache was used.
Now fails every time when Run actions/cache@v4 hit a cache.

Action version:
'actions/checkout@v4' (SHA:11bd71901bbe5b1630ceea73d27597364c9af683)
'actions/setup-python@v5' (SHA:a26af69be951a213d495a4c3e4e4022e16d87065)
'actions/cache@v4' (SHA:5a3ec84eff668545956fd18022155c47e93e2684)

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Repro steps:
https://github.com/spacetx/starfish/actions/runs/14877629662/job/41778019051?pr=2063

Expected behavior:
python -m pip install --upgrade pip==24.2
Collecting pip==24.2
Downloading pip-24.2-py3-none-any.whl.metadata (3.6 kB)
Downloading pip-24.2-py3-none-any.whl (1.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 28.2 MB/s eta 0:00:00
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 25.0.1
Uninstalling pip-25.0.1:
Successfully uninstalled pip-25.0.1
Successfully installed pip-24.2

Actual behavior:
python -m pip install --upgrade pip==24.2

Notice: A new release of pip is available: 24.2 -> 25.1.1
Notice: To update, run: pip install --upgrade pip
ERROR: Exception:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
status = _inner_run()
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run
return self.run(options, args)
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 67, in wrapper
return func(self, options, args)
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 363, in run
resolver = self.make_resolver(
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 175, in make_resolver
import pip._internal.resolution.resolvelib.resolver
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 8, in
from pip._vendor.resolvelib import BaseReporter, ResolutionImpossible
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_vendor/resolvelib/init.py", line 19, in
from .resolvers import (
File "/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers/init.py", line 1, in
from ..structs import RequirementInformation
ImportError: cannot import name 'RequirementInformation' from 'pip._vendor.resolvelib.structs' (/opt/hostedtoolcache/Python/3.9.22/x64/lib/python3.9/site-packages/pip/_vendor/resolvelib/structs.py)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions