diff --git a/.ci/scripts/check_requirements.py b/.ci/scripts/check_requirements.py index c3d0e118c..0edfaccc0 100755 --- a/.ci/scripts/check_requirements.py +++ b/.ci/scripts/check_requirements.py @@ -62,7 +62,10 @@ def main(): else: if check_prereleases and req.specifier.prereleases: # Do not even think about begging for more exceptions! - if req.name != "pulp-rpm-client": + if ( + not req.name.startswith("opentelemetry") + and req.name != "pulp-rpm-client" + ): errors.append(f"{filename}:{nr}: Prerelease versions found in {line}.") ops = [spec.operator for spec in req.specifier] if "~=" in ops: diff --git a/.github/template_gitref b/.github/template_gitref index 483b6b6b3..70eef8995 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-401-g1346b63 +2021.08.26-405-g3845bbc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84c16d81a..0325b23f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,9 @@ jobs: test: needs: "build" uses: "./.github/workflows/test.yml" + with: + matrix_env: | + [{"TEST": "pulp"}, {"TEST": "azure"}, {"TEST": "s3"}, {"TEST": "lowerbounds"}] deprecations: runs-on: "ubuntu-latest" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 3ab77ff8c..4ed408054 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -29,6 +29,9 @@ jobs: test: needs: "build" uses: "./.github/workflows/test.yml" + with: + matrix_env: | + [{"TEST": "pulp"}, {"TEST": "azure"}, {"TEST": "s3"}, {"TEST": "lowerbounds"}, {"PERFORMANCE_TEST": "sync", "TEST": "performance"}, {"PERFORMANCE_TEST": "publish", "TEST": "performance"}, {"PERFORMANCE_TEST": "pulp_to_pulp", "TEST": "performance"}] changelog: runs-on: ubuntu-latest @@ -65,124 +68,4 @@ jobs: branch: "changelog/update" delete-branch: true path: "pulp_rpm" - - performance: - runs-on: ubuntu-latest - needs: test - - strategy: - fail-fast: false - matrix: - env: - - TEST: performance - PERFORMANCE_TEST: sync - - TEST: performance - PERFORMANCE_TEST: publish - - TEST: performance - PERFORMANCE_TEST: pulp_to_pulp - - steps: - - uses: "actions/checkout@v4" - with: - fetch-depth: 1 - path: "pulp_rpm" - - - uses: "actions/checkout@v4" - with: - fetch-depth: 1 - repository: "pulp/pulp-openapi-generator" - path: "pulp-openapi-generator" - - - uses: actions/download-artifact@v4 - with: - name: "plugin_package" - path: "pulp_rpm/dist/" - - - name: "Download API specs" - uses: "actions/download-artifact@v4" - with: - name: "api_spec" - path: "pulp_rpm/" - - - name: "Download client packages" - uses: "actions/download-artifact@v4" - with: - name: "python-client.tar" - path: "pulp_rpm" - - - name: "Unpack client packages" - working-directory: "pulp-openapi-generator" - run: | - mkdir -p "pulp_rpm-client" - pushd "pulp_rpm-client" - tar xvf "../../pulp_rpm/rpm-python-client.tar" - popd - - - uses: "actions/setup-python@v5" - with: - python-version: "3.11" - - - name: "Set environment variables" - run: | - echo "TEST=${{ matrix.env.TEST }}" >> $GITHUB_ENV - echo "PERFORMANCE_TEST=${{ matrix.env.PERFORMANCE_TEST }}" >> $GITHUB_ENV - - - name: "Install python dependencies" - run: | - echo ::group::PYDEPS - pip install towncrier twine wheel httpie docker netaddr boto3 ansible mkdocs - echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/pulp_rpm/.ci/assets/httpie/" >> $GITHUB_ENV - echo ::endgroup:: - - - name: "Before Install" - run: | - .github/workflows/scripts/before_install.sh - shell: "bash" - env: - PY_COLORS: "1" - ANSIBLE_FORCE_COLOR: "1" - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}" - - - name: "Install" - run: | - .github/workflows/scripts/install.sh - shell: "bash" - env: - PY_COLORS: "1" - ANSIBLE_FORCE_COLOR: "1" - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}" - - - name: "Before Script" - run: | - .github/workflows/scripts/before_script.sh - shell: "bash" - env: - PY_COLORS: "1" - ANSIBLE_FORCE_COLOR: "1" - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}" - REDIS_DISABLED: "${{ contains('', matrix.env.TEST) }}" - - - name: "Performance Test" - run: | - .github/workflows/scripts/script.sh - shell: "bash" - env: - PY_COLORS: "1" - ANSIBLE_FORCE_COLOR: "1" - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}" - - - name: "Logs" - if: always() - run: | - echo "Need to debug? Please check: https://github.com/marketplace/actions/debugging-with-tmate" - http --timeout 30 --check-status --pretty format --print hb "https://pulp${PULP_API_ROOT}api/v3/status/" || true - docker images || true - docker ps -a || true - docker logs pulp || true - docker exec pulp ls -latr /etc/yum.repos.d/ || true - docker exec pulp cat /etc/yum.repos.d/* || true - docker exec pulp bash -c "pip3 list" || true +... diff --git a/.github/workflows/scripts/publish_plugin_pypi.sh b/.github/workflows/scripts/publish_plugin_pypi.sh index 7c7a48644..d1fc5ee23 100755 --- a/.github/workflows/scripts/publish_plugin_pypi.sh +++ b/.github/workflows/scripts/publish_plugin_pypi.sh @@ -28,6 +28,6 @@ then fi twine upload -u __token__ -p "$PYPI_API_TOKEN" \ -"dist/pulp_rpm-$VERSION-py3-none-any.whl" \ -"dist/pulp-rpm-$VERSION.tar.gz" \ +dist/pulp?rpm-"$VERSION"-py3-none-any.whl \ +dist/pulp?rpm-"$VERSION".tar.gz \ ; diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c87be590..22fce11fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,10 @@ name: "Test" on: workflow_call: + inputs: + matrix_env: + required: true + type: string defaults: run: @@ -20,11 +24,7 @@ jobs: strategy: fail-fast: false matrix: - env: - - TEST: pulp - - TEST: azure - - TEST: s3 - - TEST: lowerbounds + env: ${{ fromJSON(inputs.matrix_env) }} steps: - uses: "actions/checkout@v4" @@ -78,6 +78,10 @@ jobs: - name: "Set environment variables" run: | echo "TEST=${{ matrix.env.TEST }}" >> $GITHUB_ENV + if [ "${{ matrix.env.TEST }}" = "performance" ] + then + echo "PERFORMANCE_TEST=${{ matrix.env.PERFORMANCE_TEST }}" >> $GITHUB_ENV + fi - name: "Before Install" run: | @@ -88,10 +92,6 @@ jobs: ANSIBLE_FORCE_COLOR: "1" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}" - - uses: ruby/setup-ruby@v1 - if: ${{ env.TEST == 'pulp' }} - with: - ruby-version: "2.6" - name: "Install" run: |