Skip to content

Commit ec2fa2e

Browse files
authored
Split tox environments by pdns version (#183)
* Split tox environments by pdns version PowerDNS Auth 'master' has a significantly upgraded OpenAPI schema, and requires a different combination of Bravado and its dependencies. This commit reconfigures tox.ini and the test.yml workflow to provide separate test environments for specific PowerDNS versions. * Remove testing against pdns-auth 'master'. * Linter fix. * Add CHANGELOG entry.
1 parent 965684c commit ec2fa2e

5 files changed

Lines changed: 23 additions & 13 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
show-progress: false
3030
- name: start pdns_server
3131
run: workflow-support/start_server.sh ${{ inputs.pdns }}
32-
- uses: kpfleming/composite-actions/ci-tox@v3
33-
with:
34-
python: ${{ inputs.python }}
32+
- name: run CI tests
33+
run: tox run -e${{ inputs.python }}-pdns${{ inputs.pdns }}-ci-action
34+
shell: bash
3535
env:
3636
pdns_version: ${{ inputs.pdns }}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ for emergencies).
2020

2121
- Improved rrsets and zone modules to eliminate unnecessary 'changed' reporting.
2222

23+
- Removed testing against the 'master' branch of PowerDNS Auth, as the API
24+
schema in that branch has been converted to OpenAPI 3.1 format and
25+
the Bravado API client package used in this collection does not
26+
support OpenAPI. This also means that this collection will not
27+
support PowerDNS Auth 5.1.0 or later versions until a new API client
28+
package has been chosen and incorporated into the collection.
29+
2330
## [25.2.0] - 2025-10-19
2431

2532
### Added

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ commands=
6363
ruff check --output-format=full --fix --show-fixes src
6464
ansible-lint --fix all --strict --profile production -v
6565

66-
[testenv:py310-ci-action]
66+
[testenv:py310-pdns{4.8,4.9,5.0}-ci-action]
6767
deps=
6868
{[galaxy-setup]deps}
6969
ansible-core
@@ -84,7 +84,7 @@ commands_pre=
8484
commands=
8585
bash -c 'workflow-support/run_test_playbooks.sh 2.15'
8686

87-
[testenv:py{311,312,313,314}-ci-action]
87+
[testenv:py{311,312,313,314}-pdns{4.8,4.9,5.0}-ci-action]
8888
deps=
8989
{[galaxy-setup]deps}
9090
ansible-core

workflow-support/make_ci_image.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ lint_deps=(shellcheck)
1515
publish_deps=(yq)
1616

1717
toxenvs=(lint-action ci-action publish-action)
18-
cimatrix=(py3{10,11,12,13,14})
18+
py_versions=(py3{10,11,12,13,14})
19+
pdns_versions=(pdns{4.8,4.9,5.0})
1920

2021
c=$(buildah from "${base_image}")
2122

@@ -34,12 +35,12 @@ build_cmd apt install --yes --quiet=2 "${proj_build_deps[@]}" "${lint_deps[@]}"
3435
for pdns_ver in "${@}"; do
3536
case "${pdns_ver}" in
3637
master)
37-
pdns_url=https://github.com/PowerDNS/pdns/archive/refs/heads/master.tar.gz
38-
pdns_dir=pdns-master
38+
pdns_url="https://github.com/PowerDNS/pdns/archive/refs/heads/master.tar.gz"
39+
pdns_dir="pdns-master"
3940
;;
4041
*)
41-
pdns_url=https://github.com/PowerDNS/pdns/archive/refs/heads/rel/auth-"${pdns_ver}".x.tar.gz
42-
pdns_dir=pdns-rel-auth-"${pdns_ver}".x
42+
pdns_url="https://github.com/PowerDNS/pdns/archive/refs/heads/rel/auth-${pdns_ver}.x.tar.gz"
43+
pdns_dir="pdns-rel-auth-${pdns_ver}.x"
4344
;;
4445
esac
4546

@@ -58,8 +59,10 @@ buildah config --env TOX_USER_CONFIG_FILE=/tox/config.ini "${c}"
5859
for env in "${toxenvs[@]}"; do
5960
case "${env}" in
6061
ci-action)
61-
for py in "${cimatrix[@]}"; do
62-
build_cmd_with_source tox exec -e "${py}-${env}" -- uv pip list
62+
for py in "${py_versions[@]}"; do
63+
for pdns in "${pdns_versions[@]}"; do
64+
build_cmd_with_source tox exec -e "${py}-${pdns}-${env}" -- uv pip list
65+
done
6366
done
6467
;;
6568
*)

workflow-support/versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
versions={"pdns":["4.8", "4.9", "5.0", "master"], "python": ["py310", "py311", "py312", "py313", "py314"]}
1+
versions={"pdns":["4.8", "4.9", "5.0"], "python": ["py310", "py311", "py312", "py313", "py314"]}

0 commit comments

Comments
 (0)