diff --git a/.github/template_gitref b/.github/template_gitref index 7150dcb43..3d3d9afe4 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-345-g747bcf8 +2021.08.26-347-gc4a2504 diff --git a/.github/workflows/scripts/script.sh b/.github/workflows/scripts/script.sh index 6f15949df..f52edf7be 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 container +jq '(.paths[][].parameters|select(.)) |= sort_by(.name)' < "container-api.json" > "build-api.json" +jq '(.paths[][].parameters|select(.)) |= sort_by(.name)' < "../pulp-openapi-generator/container-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_container.tests.functional -m parallel -n 8" cmd_user_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_container.tests.functional -m 'not parallel'" - fi + fi fi pushd ../pulp-cli pip install -r test_requirements.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c439fe89..371631415 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_container/dist/" - - uses: "actions/download-artifact@v4" + - name: "Download API specs" + uses: "actions/download-artifact@v4" + with: + name: "api_spec" + path: "pulp_container/" + + - name: "Download client packages" + uses: "actions/download-artifact@v4" with: name: "python-client.tar" path: "pulp_container" @@ -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_container/.ci/assets/httpie/" >> $GITHUB_ENV echo ::endgroup:: diff --git a/docs/template_gitref b/docs/template_gitref index 7150dcb43..3d3d9afe4 100644 --- a/docs/template_gitref +++ b/docs/template_gitref @@ -1 +1 @@ -2021.08.26-345-g747bcf8 +2021.08.26-347-gc4a2504 diff --git a/template_config.yml b/template_config.yml index 4afbaa5a1..cff8021ed 100644 --- a/template_config.yml +++ b/template_config.yml @@ -1,7 +1,7 @@ # This config represents the latest values used when running the plugin-template. Any settings that # were not present before running plugin-template have been added with their default values. -# generated with plugin_template@2021.08.26-329-g63d3740 +# generated with plugin_template@2021.08.26-347-gc4a2504 api_root: /pulp/ black: true @@ -32,6 +32,7 @@ kanban: true latest_release_branch: '2.20' lint_requirements: true noissue_marker: '[noissue]' +os_required_packages: [] parallel_test_workers: 8 plugin_app_label: container plugin_default_branch: main