dev pip-compile: switch devel branch pip-compile to 3.11
This adjusts the devel branch to use Python 3.11 to generate dependencies with pip-compile. This also adjusts the pip-compile-dev workflow to run separate jobs for the stable branches, which will still use Python 3.10 for requirements files. It's not a very DRY approach; Github Actions does not support loops.
Fixes: https://github.com/ansible/ansible-documentation/issues/1614 Fixes: https://github.com/ansible/ansible-documentation/issues/1450
It's not a very DRY approach; Github Actions does not support loops.
That's not really true: you can have a matrix definition that calls a reusable workflow and passes matrix factors in. This does work, both me and Don have used this approach in the past.
UPD: What doesn't work is skipping some jobs in an event-dependent manner with just declarative syntax. This can be solved by a separate job that pre-computes the matrix, though.
you can have a matrix definition that calls a reusable workflow
That's true. I'm not sure why I completely forgot about matrices. I'll try to refactor this.
I'll work on this later this month, after I get back from vacation.
@gotmax23 Hello. Friendly reminder on this PR. Do you think you'd have some time to look at refactoring this? Maybe it's not that big of a deal but I think it'd be nice to bump to 3.11 fairly soon so there's plenty of time before 2.18 etc. Cheers!
Thanks for the ping. I'm back from Flock to Fedora, so I should have a draft ready early this week. I'm thinking that allowing manual triggering with custom input makes this too complicated, so I think I'll remove that part and make this into a more simple matrix that runs on a scheduled basis and can also be triggered all at once with the default (hard-coded) inputs.
This is ready for review now.
- https://github.com/ansible/ansible-documentation/pull/1752
- https://github.com/ansible/ansible-documentation/pull/1754
- https://github.com/ansible/ansible-documentation/pull/1751
- https://github.com/ansible/ansible-documentation/pull/1753
were all created with this new job!
@gotmax23 I also like the fact it's not too complicated. I guess you probably could get rid of some repetition and make it fancy but I feel like that might make it harder for folks to grok and could put off maintainers. Thanks again.
I also like the fact it's not too complicated. I guess you probably could get rid of some repetition and make it fancy but I feel like that might make it harder for folks to grok and could put off maintainers.
We could use YAML anchors or something to reuse the nox-args values (one anchor for Python 3.11 + the devel-only tag script and one for Python 3.10) or automatically generate pr-branch based on base-branch, but yeah, that adds extra complexity and I think what we have is pretty maintainable.
I'll merge this now and we can always iterate on this further as needed. I opened a separate issue to create the necessary documentation that you mentioned.