Skip to content
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

pip-compile workflows failing #2177

Open
oraNod opened this issue Nov 18, 2024 · 4 comments
Open

pip-compile workflows failing #2177

oraNod opened this issue Nov 18, 2024 · 4 comments
Assignees
Labels
tooling This PR affects tooling (CI, pr_labeler, noxfile, linters, etc.) but not the docs builds themselves.

Comments

@oraNod
Copy link
Contributor

oraNod commented Nov 18, 2024

from @felixfontein in #1920 (comment)

it's no longer possible to run the update dependency tasks for stable-2.17 and stable-2.16 in CI. On these two branches the workflows have been deleted, and if you try to run them from devel, it tries to run the update for Python 3.11, while both branches use other Python versions. This makes the workflow fail:

https://github.com/ansible/ansible-documentation/actions/runs/11872098104/job/33085392232
https://github.com/ansible/ansible-documentation/actions/runs/11872098212/job/33085392580
@oraNod oraNod added the tooling This PR affects tooling (CI, pr_labeler, noxfile, linters, etc.) but not the docs builds themselves. label Nov 18, 2024
@ansible-documentation-bot ansible-documentation-bot bot added the needs_triage Needs a first human triage before being processed. label Nov 18, 2024
@oraNod
Copy link
Contributor Author

oraNod commented Nov 18, 2024

@felixfontein and @gotmax23

What about adding an input to set the Python version?

python-version:
        required: true
        type: choice
        options:
          - '3.11'
          - '3.10'
        default: '3.11'

Then we should be able to update the nox args with something like this:

nox-args: >-
  -e
  'pip-compile-${{ inputs.python-version || '3.11' }}(requirements)'
  'pip-compile-${{ inputs.python-version || '3.11' }}(requirements-relaxed)'

@felixfontein
Copy link
Collaborator

I've thought about that; alternatively we could automatically figure out the right version from the branch. But I guess making the Python version configurable would be a first step, we can always improve it later on :)

@samccann samccann removed the needs_triage Needs a first human triage before being processed. label Nov 19, 2024
@gotmax23
Copy link
Collaborator

I think we can actually fix the noxfile to not require specifying a Python version in the session name. I'll take a look (probably this weekend).

@gotmax23 gotmax23 self-assigned this Nov 20, 2024
@gotmax23
Copy link
Collaborator

I think we can actually fix the noxfile to not require specifying a Python version in the session name.

diff --git a/noxfile.py b/noxfile.py
index 9b53bc1d65..7904ab49e8 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -155,7 +155,7 @@ requirements_files = list(
 )
 
 
-@nox.session(name="pip-compile", python=["3.11"])
+@nox.session(name="pip-compile", python="3.11")
 @nox.parametrize(["req"], requirements_files, requirements_files)
 def pip_compile(session: nox.Session, req: str):
     """

and then

$ nox -l | grep pip-compile
- pip-compile(requirements-relaxed)
- pip-compile(requirements)
- pip-compile(pr_labeler)
- pip-compile(spelling)
- pip-compile(formatters)
- pip-compile(tag)
- pip-compile(static)
- pip-compile(typing)

as opposed to the previous

$ nox -l | grep pip-compile
- pip-compile-3.11(typing)
- pip-compile-3.11(pr_labeler)
- pip-compile-3.11(spelling)
- pip-compile-3.11(static)
- pip-compile-3.11(formatters)
- pip-compile-3.11(tag)
- pip-compile-3.11(requirements)
- pip-compile-3.11(requirements-relaxed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling This PR affects tooling (CI, pr_labeler, noxfile, linters, etc.) but not the docs builds themselves.
Projects
Status: 🆕 Triage
Development

No branches or pull requests

4 participants