diff --git a/.github/template_gitref b/.github/template_gitref index 90ac2c05..3d3d9afe 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-346-g8368e4c +2021.08.26-347-gc4a2504 diff --git a/.github/workflows/scripts/script.sh b/.github/workflows/scripts/script.sh index 7b26aa7e..8e670d69 100755 --- a/.github/workflows/scripts/script.sh +++ b/.github/workflows/scripts/script.sh @@ -57,6 +57,8 @@ cmd_prefix bash -c "chmod 600 ~pulp/.netrc" # Generate bindings ################### +echo "::group::Generate bindings" + touch bindings_requirements.txt pushd ../pulp-openapi-generator # Use app_label to generate api.json and package to produce the proper package name. @@ -79,10 +81,10 @@ pushd ../pulp-openapi-generator # there, because we did not merge plugins into pulpcore back then. MODULE="$(jq -r '.module // (.package|gsub("-"; "_"))' <<<"${ITEM}")" PACKAGE="${MODULE%%.*}" + cmd_prefix pulpcore-manager openapi --bindings --component "${COMPONENT}" > "${COMPONENT}-api.json" if [[ ! " ${BUILT_CLIENTS} " =~ "${COMPONENT}" ]] then rm -rf "./${PACKAGE}-client" - cmd_prefix pulpcore-manager openapi --bindings --component "${COMPONENT}" > "${COMPONENT}-api.json" ./gen-client.sh "${COMPONENT}-api.json" "${COMPONENT}" python "${PACKAGE}" pushd "${PACKAGE}-client" python setup.py sdist bdist_wheel --python-tag py3 @@ -100,6 +102,16 @@ pushd ../pulp-openapi-generator done popd +echo "::endgroup::" + +echo "::group::Debug bindings diffs" + +# Bindings diff for ostree +jq '(.paths[][].parameters|select(.)) |= sort_by(.name)' < "ostree-api.json" > "build-api.json" +jq '(.paths[][].parameters|select(.)) |= sort_by(.name)' < "../pulp-openapi-generator/ostree-api.json" > "test-api.json" +jsondiff --indent 2 build-api.json test-api.json || true +echo "::endgroup::" + # Install test requirements ########################### @@ -140,7 +152,7 @@ else else cmd_user_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_ostree.tests.functional -m parallel -n 8" cmd_user_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_ostree.tests.functional -m 'not parallel'" - fi + fi fi pushd ../pulp-cli-ostree pip install -r test_requirements.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 043662c8..b334b6c9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,12 +43,20 @@ jobs: with: python-version: "3.11" - - uses: "actions/download-artifact@v4" + - name: "Download plugin package" + uses: "actions/download-artifact@v4" with: name: "plugin_package" path: "pulp_ostree/dist/" - - uses: "actions/download-artifact@v4" + - name: "Download API specs" + uses: "actions/download-artifact@v4" + with: + name: "api_spec" + path: "pulp_ostree/" + + - name: "Download client packages" + uses: "actions/download-artifact@v4" with: name: "python-client.tar" path: "pulp_ostree" @@ -64,7 +72,7 @@ jobs: - name: "Install python dependencies" run: | echo ::group::PYDEPS - pip install towncrier twine wheel httpie docker netaddr boto3 ansible mkdocs + pip install towncrier twine wheel httpie docker netaddr boto3 ansible mkdocs jq jsonpatch echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/pulp_ostree/.ci/assets/httpie/" >> $GITHUB_ENV echo ::endgroup:: diff --git a/docs/template_gitref b/docs/template_gitref index 7150dcb4..3d3d9afe 100644 --- a/docs/template_gitref +++ b/docs/template_gitref @@ -1 +1 @@ -2021.08.26-345-g747bcf8 +2021.08.26-347-gc4a2504