Pip upgrade notice is passed as an error to the workflow summary
Description:
A not up to date pip is installed and an error generated based on the Notice in the logs
This should wholly be a warning like the other similar one below in the screenshot.
Action version: Specify the action version
Platform:
- [ ] Ubuntu
- [x] macOS
- [ ] Windows
Runner type:
- [x] 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
Hello @t3chguy Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.
We see the same error report after upgrading to actions/setup-python@v5 and moving to macos-14-xlarge runner.
We install the [email protected]
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)
As a temporary fix we added environment variable PIP_DISABLE_PIP_VERSION_CHECK=1 to our workflow:
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
actions/setup-python should run pip install with --disable-pip-version-check.
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.
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.
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.
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.
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 https://github.com/actions/setup-python/issues/809#issuecomment-2074071271, the warning is not being tagged correctly.
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?
I can confirm this is no longer happening for me. Thanks