-
Notifications
You must be signed in to change notification settings - Fork 466
Upgrade ansible to v2.20.0 to support Python 3.14 #1894
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
base: main
Are you sure you want to change the base?
Conversation
Otherwise, with newer Python versions, we get the error `Invalid conditional detected: module 'ast' has no attribute 'Str'`.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test ? |
|
@AndiDog: The following commands are available to trigger required jobs: The following commands are available to trigger optional jobs: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/test pull-ova-all |
|
@AndiDog: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Our build pipeline for Azure has nodes that still use Python 3.9, so we've kept this pinned here to avoid breaking that. And in the past when we've bumped this, users have complained it broke their builds. So jumping to 2.20 is likely to be problematic--is the We should also update the minimum Python version in image-builder/images/capi/hack/ensure-python.sh Lines 23 to 24 in d8f7a3c
I agree it's time to move forward with ansible and Python. I'll investigate how we can support a newer python for Azure builds. |
|
The test error says that Python 3.12 is required at least, and that version is exactly two years old. One option to support older Python versions, probably with a very loud warning message, is to fall back to a slightly older Ansible version. Just an idea, even if I don't like it that much. @mboersma can you refer me to the Azure-related code that's problematic? |
The scripts for the pipelines are in images/capi/packer/azure/.pipelines, with It's something I can work around for now just by maintaining a fork. We should merge this so image-builder uses a version of Python that is actually supported. 😄 I was just hoping we could move the requirements forward more slowly, but I see 2.20.0 is the first version to support Python 3.14. Let's do an image-builder release first, so we have an updated release tag that works with Python 3.9 - 3.11. /hold for a checkpoint release |
|
Also it appears we're using Python 3.11 in the OVA build pipeline. 🫤 |
Change description
Otherwise, with newer Python versions, we get the error
Invalid conditional detected: module 'ast' has no attribute 'Str'in playbook runs.Python 3.14, released in October 2025, removes
ast.Str. Upgrading Ansible to a newer version ensures this isn't used anymore – I didn't look for the exact changelog item for that since we should anyway upgrade Ansible.Related issues
n/a