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

Pip upgrade notice is passed as an error to the workflow summary #809

Closed
2 of 5 tasks
t3chguy opened this issue Jan 31, 2024 · 12 comments
Closed
2 of 5 tasks

Pip upgrade notice is passed as an error to the workflow summary #809

t3chguy opened this issue Jan 31, 2024 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@t3chguy
Copy link

t3chguy commented Jan 31, 2024

Description:

A not up to date pip is installed and an error generated based on the Notice in the logs

image

This should wholly be a warning like the other similar one below in the screenshot.

Action version:
Specify the action version

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
Python 3.12
Pip 23.2.1

Repro steps:
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.

https://github.com/element-hq/element-desktop/actions/runs/7725494597/job/21060231622#step:6:43

Expected behavior:
Either an up to date pip is installed or the Notice should generate a warning, not an error

Actual behavior:
An alarming error is produced

@t3chguy t3chguy added bug Something isn't working needs triage labels Jan 31, 2024
@HarithaVattikuti
Copy link
Contributor

Hello @t3chguy
Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.

@jozefizso
Copy link

jozefizso commented Feb 1, 2024

We see the same error report after upgrading to actions/setup-python@v5 and moving to macos-14-xlarge runner.

We install the python@3.11

@jozefizso
Copy link

Version 3.11 was not found in the local cache
  Version 3.11 is available for downloading
  Download from "https://github.com/actions/python-versions/releases/download/3.11.7-7098196908/python-3.11.7-darwin-arm64.tar.gz"
  Extract downloaded archive
  /usr/bin/tar xz -C /Users/runner/work/_temp/20707576-77b9-4169-8b80-44363ba79fad -f /Users/runner/work/_temp/9a8c1ac0-38d8-4701-865e-149895aecdaf
  Execute installation script
  Check if Python hostedtoolcache folder exist...
  Creating Python hostedtoolcache folder...
  Install Python binaries from prebuilt package
  installer: Package name is Python
  installer: Installing at base path /
  installer: The install was successful.
  Create hostedtoolcach symlinks (Required for the backward compatibility)
  Create Python 3.11.7 folder
  Create additional symlinks (Required for the UsePythonVersion Azure Pipelines task and the setup-python GitHub Action)
  Upgrading pip...
  Looking in links: /var/folders/1k/qq3pcbf12vb6vyblh81736p40000gn/T/tmpg37l778_
  Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (65.5.0)
  Requirement already satisfied: pip in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (23.2.1)
  Collecting pip
  Obtaining dependency information for pip from https://files.pythonhosted.org/packages/15/aa/3f4c7bcee2057a76562a5b33ecbd199be08cdb4443a02e26bd2c3cf6fc39/pip-23.3.2-py3-none-any.whl.metadata
  Downloading pip-23.3.2-py3-none-any.whl.metadata (3.5 kB)
  Downloading pip-23.3.2-py3-none-any.whl (2.1 MB)
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 33.9 MB/s eta 0:00:00
  
  Installing collected packages: pip
  Successfully installed pip-23.2.1
  Install OpenSSL certificates
  Collecting certifi
  Downloading certifi-2023.11.17-py3-none-any.whl.metadata (2.2 kB)
  Downloading certifi-2023.11.17-py3-none-any.whl (162 kB)
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 162.5/162.5 kB 7.2 MB/s eta 0:00:00
  
  Installing collected packages: certifi
  Successfully installed certifi-2023.11.17
  Notice:  A new release of pip is available: 23.2.1 -> 23.3.2
  Notice:  To update, run: /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -m pip install --upgrade pip
  -- pip install --upgrade certifi
   -- removing any existing file or link
   -- creating symlink to certifi certificate bundle
   -- setting permissions
   -- update complete
  Create complete file
  Successfully set up CPython (3.11.7)

@jozefizso
Copy link

As a temporary fix we added environment variable PIP_DISABLE_PIP_VERSION_CHECK=1 to our workflow:

env:
  PIP_DISABLE_PIP_VERSION_CHECK: 1

hiroyuki-komatsu pushed a commit to google/mozc that referenced this issue Feb 6, 2024
This is a follow up commit to my previous commit [1], which upgraded
GitHub Actions runner for macOS builds to 'macos-14' (#868).

While we still support Python 3.9 to build Mozc on macOS environment,
currently we cannot use 'setup-python' to set up Python 3.9 in
'macos-14' runner [2]. Also we don't use 'setup-python' in other
platforms such as Windows build.

For simplicity, let's just use the default python in the runner [3],
which is Python 3.11 as of writing. Then we should no longer see
errors from 'setup-python' in the build summary [4].

#codehealth

 [1]: 4af1a44
 [2]: actions/setup-python#808
 [3]: https://github.com/actions/virtual-environments/blob/main/images/macos/macos-14-Readme.md
 [4]: actions/setup-python#809

PiperOrigin-RevId: 604223079
@gowridurgad gowridurgad self-assigned this Apr 19, 2024
@Paebbels
Copy link

actions/setup-python should run pip install with --disable-pip-version-check.

@gowridurgad
Copy link
Contributor

gowridurgad commented Apr 24, 2024

Hi @t3chguy , The notice which is there in logs of set up python is generating the error messaging in workflow summary. The setup-python action checks for a pip update as part of its process,The actions/setup-python GitHub Action does not check the pip update on all operating systems. The behavior you're seeing is specific to the macOS environment. On macOS, the action checks for the pip update and notifies you if a newer version is available.

The notice is not an error, but an informational message from the actions/setup-python. As long as your workflow is functioning as expected, you can safely ignore this notice. It's just informing you that a newer version of pip is available. If you have a step in your workflow to upgrade pip, then the latest version should be in use despite this message.

And only for python version 3.10 notice message is visible . For versions 3.12 and 3.11 this notice message is not visible.
Screenshot 2024-04-23 at 12 07 28 PM
Screenshot 2024-04-23 at 12 15 04 PM

@Paebbels
Copy link

But why is the action creating an error? GitHub Action also supports warning and even better notice messages. See the documentation here: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-a-notice-message

Independent of a pipeline failing or not, the emitted message level to the pipeline summary is just wrong.

@agriyakhetarpal
Copy link

agriyakhetarpal commented Apr 24, 2024

The notice is not an error, but an informational message from the actions/setup-python. As long as your workflow is functioning as expected, you can safely ignore this notice. It's just informing you that a newer version of pip is available. If you have a step in your workflow to upgrade pip, then the latest version should be in use despite this message.

@gowridurgad, even though it can be safely ignored, which is alright – it should still be flagged as a warning, not an error.

@gowridurgad
Copy link
Contributor

Hi, The notice is simply an informational message from pip stating that a newer version of pip is available. The action has already upgraded pip to version 24.0 as part of the setup process. The notice is displayed because the pip command that checks for updates is still run after the upgrade, and pip is not immediately aware that it has been updated.

If you don't want to see this message, you could add an environment variable PIP_DISABLE_PIP_VERSION_CHECK=1 to your workflow to disable the version check that pip performs. However, this won't impact the functionality of your workflow.

@agriyakhetarpal
Copy link

Thanks for your comment, @gowridurgad. Yes, this does not impact the functionality of the workflow at all, and is indeed an informational message from pip which can be safely ignored or disabled via PIP_DISABLE_PIP_VERSION_CHECK as you mentioned – what I wish to highlight, rather, is that the same notice is passed as a warning for the macos-12 and the macos-13 (amd64) labels in a yellow-coloured admonition, but it gets passed as an apparent error for the macos-14/macos-latest (arm64) label as highlighted by the red-coloured admonitions as noted in the screenshots above (which is the bug at hand). As mentioned by @Paebbels in #809 (comment), the warning is not being tagged correctly.

Synss added a commit to Synss/python-mbedtls that referenced this issue Apr 27, 2024
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue May 12, 2024
- disable pip version check to avoid annotation errors
  (see actions/setup-python#809)
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue May 12, 2024
- disable pip version check to avoid annotation errors
  (see actions/setup-python#809)
- replace deprecated set-ouput command
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue May 12, 2024
- disable pip version check to avoid annotation errors
  (see actions/setup-python#809)
mrbean-bremen added a commit to pytest-dev/pyfakefs that referenced this issue May 12, 2024
- disable pip version check to avoid annotation errors
  (see actions/setup-python#809)
@gowridurgad
Copy link
Contributor

Hi @t3chguy , The issue is now resloved and we are no longer encountering the error message for macos-14/macos-latest. Attached a screenshot for your reference. could you please verify this on your end and confirm?

Screenshot 2024-05-21 at 5 06 25 PM

@t3chguy
Copy link
Author

t3chguy commented May 23, 2024

I can confirm this is no longer happening for me. Thanks

@t3chguy t3chguy closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants