build: updated ubuntu version to latest#99
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Actions runner operating system from the specific ubuntu-20.04 version to ubuntu-latest across workflow files. This ensures the workflows automatically use the latest Ubuntu LTS version supported by GitHub Actions.
Key Changes:
- Updated CI and PyPI publishing workflows to use
ubuntu-latestinstead ofubuntu-20.04
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/publish_pypi.yml |
Updated PyPI publishing job runner to use ubuntu-latest |
.github/workflows/ci.yml |
Updated CI test matrix to use ubuntu-latest for test execution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| commands = | ||
| pip install -U pip | ||
| pytest --basetemp={envtmpdir} |
There was a problem hiding this comment.
The removal of "pip install -U pip" from the commands section appears to be unintentional. While setuptools and wheel are now upgraded in the commands_pre section, pip itself is no longer being upgraded. Consider adding "pip install -U pip" to the commands_pre section to ensure pip is also up-to-date before running tests.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (2)
.github/workflows/publish_pypi.yml:16
- The workflow still uses deprecated GitHub Actions majors (
actions/checkout@v2/actions/setup-python@v2). These are out of support and may miss security fixes; update to the current supported majors (e.g., checkout v4 and setup-python v5).
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
.github/workflows/publish_pypi.yml:30
- Publishing uses
pypa/gh-action-pypi-publish@master, which is a moving target and a supply-chain risk (the code you run can change without review). Pin this action to a specific release tag or, preferably, a commit SHA.
run: python setup.py sdist bdist_wheel
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@master
with:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| jobs: | ||
| push: | ||
| runs-on: ubuntu-20.04 | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
Using ubuntu-latest makes the build non-deterministic because the underlying OS image will change over time (and can break CI/publishing unexpectedly). Prefer pinning to a specific Ubuntu version (e.g., ubuntu-24.04) and updating it intentionally when needed.
| runs-on: ubuntu-latest | |
| runs-on: ubuntu-24.04 |
| - name: Install build tools | ||
| run: pip install --upgrade "setuptools>=65" "wheel>=0.38" | ||
|
|
There was a problem hiding this comment.
The added "Install build tools" step installs setuptools/wheel with a >= spec and --upgrade immediately after installing pinned versions from requirements/pip.txt. This can silently override your pinned/toolchain versions and reduce reproducibility; either rely on requirements/pip.txt alone or pin the versions in this step to match that file.
| - name: Install build tools | |
| run: pip install --upgrade "setuptools>=65" "wheel>=0.38" |
| strategy: | ||
| matrix: | ||
| os: [ubuntu-20.04] | ||
| os: [ubuntu-latest] |
There was a problem hiding this comment.
Switching CI to ubuntu-latest can introduce unexpected OS-level changes over time. Prefer pinning the runner image to a specific Ubuntu version (e.g., ubuntu-24.04) to keep CI stable and upgrades deliberate.
| os: [ubuntu-latest] | |
| os: [ubuntu-24.04] |
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-20.04] | ||
| os: [ubuntu-latest] | ||
| python-version: ['3.8'] | ||
| toxenv: [quality, py38] | ||
|
|
There was a problem hiding this comment.
Even with the runner change here, this workflow is still pinned to deprecated GitHub Actions majors (actions/checkout@v2 and actions/setup-python@v2 later in the file). Update them to the current supported majors (e.g., checkout v4, setup-python v5) to stay supported and receive security fixes.
Description
Updating the latest version of ubuntu
Ticket Reference
https://2u-internal.atlassian.net/browse/BOMS-285
Deprecated universal = 1 in setup.cfg - This setting for Python 2/3 universal wheels is obsolete and causes TypeError with modern wheel versions