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

(Ubuntu 22.04) pip version discrepancy #10346

Closed
2 of 13 tasks
melange396 opened this issue Jul 25, 2024 · 8 comments
Closed
2 of 13 tasks

(Ubuntu 22.04) pip version discrepancy #10346

melange396 opened this issue Jul 25, 2024 · 8 comments

Comments

@melange396
Copy link

Description

Recent ubuntu-latest (22.04) runner image changed to include pip version 24.x instead of 22.0.2 as claimed.

This seems unintended. If not, consider updating the image's release notes and readme.

See explanation and workaround here: cmu-delphi/delphi-epidata#1503

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20240721.1.0 failed: https://github.com/cmu-delphi/delphi-epidata/actions/runs/10095233705/job/27915622079#step:1:10

Is it regression?

yes; most recent run with 20240526.1.0 succeeded: https://github.com/cmu-delphi/delphi-epidata/actions/runs/9290024871/job/25565314861#step:1:9

Expected behavior

i expect pip version 22.0.2 as noted here:
https://github.com/actions/runner-images/blob/ubuntu22/20240721.1/images/ubuntu/Ubuntu2204-Readme.md?plain=1#L39

Actual behavior

we get pip version 24.1.2 as seen here:
https://github.com/cmu-delphi/delphi-epidata/actions/runs/10096915539/job/27920539469#step:5:10

Repro steps

  1. run a GH action with runs-on: ubuntu-latest
  2. execute a step with run: pip -V
  3. observe version mismatch
@RaviAkshintala
Copy link
Contributor

@melange396 Thank you for bringing this issue to us. We are looking into this issue and will update you on this issue after investigating.

@xchen218
Copy link

Same issue in Ubuntu20.04.
Pip is declared to be 20.0.2 but some cmds that are legal with pip < 22 are reporting errors.

@RaviAkshintala
Copy link
Contributor

Hi @melange396 We have followed your repro steps for ubuntu-latest. Kindly confirm.

name: Check pip Version

on: [push, pull_request]

jobs:
  check-pip-version:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v4

    - name: Check pip version
      run: pip -V

image

@melange396
Copy link
Author

looks like you may also need:

    - name: Set up Python 3.8
      uses: actions/setup-python@v2
      with:
        python-version: 3.8

just as we use, to get this output:
image

@RaviAkshintala
Copy link
Contributor

Hi @melange396 We have followed your repro steps for ubuntu-latest. Kindly confirm.


name: Check pip Version
on: [push, pull_request]

jobs:
  check-pip-version:
    runs-on: ubuntu-22.04
    steps:
    - name: Checkout repository
      uses: actions/checkout@v4
    
    - name: Set up Python 3.8
      uses: actions/setup-python@v2
      with:
        python-version: 3.8
    
    - name: Install pip version 22
      run: |
        python -m pip install --upgrade pip==22.0.0
        
    
    - name: Check pip version
      run: pip -V
image

@melange396
Copy link
Author

i think thats almost it, except that if you remove this section

    - name: Install pip version 22
      run: |
        python -m pip install --upgrade pip==22.0.0

it will show that you get pip version 24.1.2 instead of the promised 22.0.2

@RaviAkshintala
Copy link
Contributor

@melange396
Scenario 1: With actions/setup-python
When you use actions/setup-python@v2 to set up Python 3.8, it installs a specific version of Python and its associated pip. By default, this setup installs the latest version of pip that is compatible with Python 3.8. This is why you're seeing pip version 24.
Scenario 2: Without actions/setup-python
When you do not use actions/setup-python, the workflow uses the system-installed Python and pip, which may be an older version. In this case, it defaults to pip version 22.

@melange396
Copy link
Author

Fair enough! Apologies, i guess i should have filed a bug with https://github.com/actions/setup-python (actions/setup-python#901 seems related). It looks like we will need to either keep the step that downgrades pip, or do something else to sort out our dependencies to avoid the error.

@melange396 melange396 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants