Skip to content

Add Ubuntu 24.04 Ansible installation and test coverage#4140

Merged
tpdownes merged 3 commits into
GoogleCloudPlatform:developfrom
tpdownes:ansible_add_ubuntu2404
May 19, 2025
Merged

Add Ubuntu 24.04 Ansible installation and test coverage#4140
tpdownes merged 3 commits into
GoogleCloudPlatform:developfrom
tpdownes:ansible_add_ubuntu2404

Conversation

@tpdownes

@tpdownes tpdownes commented May 17, 2025

Copy link
Copy Markdown
Contributor

This PR adds Ansible support for Ubuntu 24.04 by:

  • removing "pip upgrades pip system-wide" step for all Linux distributions
  • switches from python3-distutils to python3-setuptools for all Debian-derived Linux distributions

Switching to python3-setuptools

On Ubuntu 24.04, python3-distutils is no longer separately packaged and python3-setuptools is the recommended alternative. On all recent Debian-derived platforms python3-setuptools is packaged and, if it exists, depends upon python3-distutils. So this PR makes the choice to uniformly install python3-setuptools.

Background: distutils is built into Python while setuptools is a 3rd party solution, but has wider adoption and functionality.

Removing pip self-upgrade

The motivation to upgrade pip system-wide is not very well-founded as it only beneficial to:

  • user-managed system-wide pip installations
  • enabling a high-versioned pip by default in new virtual environments

Because pip can be upgraded within virtual environments, this is not critical. Additionally, PEP 668 is the Python community's official position against using Python package management tools (pip, etc) to manage packages alongside "externally" managed packages (apt, dnf, etc). Recent Debian and Ubuntu releases have adopted PEP 668 by default, thus breaking the ability to use packaged-pip to upgrade pip system-wide.

Blocked by #4139.

Submission Checklist

NOTE: Community submissions can take up to 2 weeks to be reviewed.

Please take the following actions before submitting this pull request.

  • Fork your PR branch from the Toolkit "develop" branch (not main)
  • Test all changes with pre-commit in a local branch #
  • Confirm that "make tests" passes all tests
  • Add or modify unit tests to cover code changes
  • Ensure that unit test coverage remains above 80%
  • Update all applicable documentation
  • Follow Cluster Toolkit Contribution guidelines #

@tpdownes tpdownes added the release-key-new-features Added to release notes under the "Key New Features" heading. label May 17, 2025
@tpdownes tpdownes changed the base branch from main to develop May 17, 2025 06:14
@tpdownes tpdownes force-pushed the ansible_add_ubuntu2404 branch 5 times, most recently from c966799 to b47d7c6 Compare May 19, 2025 15:46
@tpdownes tpdownes requested a review from abbas1902 May 19, 2025 15:48
@tpdownes tpdownes marked this pull request as ready for review May 19, 2025 16:00
@tpdownes tpdownes requested review from a team and samskillman as code owners May 19, 2025 16:00
tpdownes added 3 commits May 19, 2025 16:14
The motivation to upgrade pip system-wide is not very well-founded as it
only beneficial to:

- user-managed system-wide pip installations
- enabling a high-versioned pip by default in new virtual environments

Because pip can be upgraded within virtual environments, this is not
critical. Additionally, PEP 668 is the Python community's official
position against using Python package management tools (pip, etc) to
manage packages alongside "externally" managed packages (apt, dnf, etc).
Recent Debian and Ubuntu releases have adopted PEP 668 by default, thus
breaking the ability to use packaged-pip to upgrade pip system-wide.

- https://peps.python.org/pep-0668/
- https://packaging.python.org/en/latest/specifications/externally-managed-environments/#externally-managed-environments
@tpdownes tpdownes force-pushed the ansible_add_ubuntu2404 branch from b47d7c6 to 8c50261 Compare May 19, 2025 16:14
@tpdownes tpdownes enabled auto-merge May 19, 2025 18:38
@tpdownes tpdownes merged commit 8fb03d2 into GoogleCloudPlatform:develop May 19, 2025
11 of 62 checks passed
@tpdownes tpdownes deleted the ansible_add_ubuntu2404 branch May 19, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-key-new-features Added to release notes under the "Key New Features" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants