Repository navigation
[ci] Pin Python 3.12 in the documentation workflow - #4298
Conversation
GitHub's `ubuntu-latest` now resolves to Ubuntu 26.04, whose default `python` is 3.14. The docs venv is created with a bare `python -m venv`, so `ansible-core==2.15.13` now runs under 3.14 and fails in `ansible-doc-extractor` with `'Constant' object has no attribute 's'` (the `ast.Constant.s` alias was removed in 3.14). Pin the workflow to Python 3.12 to restore the previously green combination. Signed-off-by: Vito Castellano <vcastell@redhat.com>
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR |
PR Summary by QodoPin Python 3.12 for documentation CI
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
Build succeeded (check pipeline). ✔️ noop SUCCESS in 0s Warning: |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: evallesp The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The
Documentation checkjob started failing on every PR touching a markdown file after GitHub began rollingubuntu-latestfrom Ubuntu 24.04 to Ubuntu 26.04 (actions/runner-images#14748).The new image ships Python 3.14 as the default
python, anddocs/source/build-docs.shcreates its virtualenv with a barepython -m venv.The job therefore installs the pinned
ansible-core==2.15.13(fromdocs/doc-requirements.txt) under Python 3.14. That release parses module docs through theast.Constant.salias, removed in Python 3.14, somake docsfails on the first module:This is unrelated to the content of the affected PRs: the failure happens at
ansible-doc-extractor, before the Sphinx build.Add
actions/setup-python@v5pinned to3.12in the documentation workflow.build-docs.shpicks it up fromPATH, so the docs virtualenv returns to the interpreter combination that was green until the runner image changed (Python 3.12 +ansible-core==2.15.13).ansible-corestays at 2.15.13, and the broader CI runtime migration to Python 3.12 / ansible-core 2.16 is intentionally left out of this PR.Assisted-By: OpenCode