From dfa508867a6705c35b2ae6d164a01a36ed457490 Mon Sep 17 00:00:00 2001 From: pulpbot Date: Fri, 27 Mar 2026 16:05:33 +0000 Subject: [PATCH] Bump minor version --- .ci/ansible/Containerfile.j2 | 4 ++ .ci/ansible/build_container.yaml | 21 ++++++++-- .ci/ansible/settings.py.j2 | 4 -- .ci/ansible/start_container.yaml | 44 ++++++++++++++------- .github/workflows/scripts/before_install.sh | 11 ++---- .github/workflows/scripts/install.sh | 19 +++------ .github/workflows/test.yml | 2 +- .github/workflows/update_ci.yml | 31 +++++++++++++++ CHANGES/+pypi-path-prefix.feature | 1 - CHANGES/1159.feature | 2 - CHANGES/1162.feature | 5 --- pulp_python/app/__init__.py | 2 +- pyproject.toml | 4 +- template_config.yml | 5 ++- 14 files changed, 97 insertions(+), 58 deletions(-) delete mode 100644 CHANGES/+pypi-path-prefix.feature delete mode 100644 CHANGES/1159.feature delete mode 100644 CHANGES/1162.feature diff --git a/.ci/ansible/Containerfile.j2 b/.ci/ansible/Containerfile.j2 index fb9ed4a1c..a446f3394 100644 --- a/.ci/ansible/Containerfile.j2 +++ b/.ci/ansible/Containerfile.j2 @@ -44,4 +44,8 @@ RUN PULP_STATIC_ROOT=/var/lib/operator/static/ PULP_CONTENT_ORIGIN=localhost \ RUN mkdir /var/lib/pulp/.config USER root:root +# Lots of plugins try to use this path, and throw warnings if they cannot access it. +RUN mkdir /.pytest_cache +RUN chown pulp:pulp /.pytest_cache + ENTRYPOINT ["/init"] diff --git a/.ci/ansible/build_container.yaml b/.ci/ansible/build_container.yaml index 0a188cba9..0ffd21d4f 100644 --- a/.ci/ansible/build_container.yaml +++ b/.ci/ansible/build_container.yaml @@ -1,6 +1,7 @@ # Ansible playbook to create the pulp service containers image --- -- hosts: "localhost" +- name: "Build CI Container Image" + hosts: "localhost" gather_facts: false vars_files: - "vars/main.yaml" @@ -9,6 +10,7 @@ ansible.builtin.template: src: "Containerfile.j2" dest: "Containerfile" + - name: "Build pulp image" # We build from the ../.. (parent dir of pulpcore git repo) Docker build # "context" so that repos like pulp-smash are accessible to Docker @@ -18,9 +20,20 @@ # 1-off-builds and CI purposes (which has no cache across CI runs.) # Run build.yaml with -e cache=false if your builds are using outdated # layers. - command: "docker build --network host --no-cache={{ not cache | default(true) | bool }} -t {{ image.name }}:{{ image.tag }} -f {{ playbook_dir }}/Containerfile ../../.." + ansible.builtin.command: + argv: + - "docker" + - "build" + - "--network" + - "host" + - "--no-cache={{ not cache | default(true) | bool }}" + - "-t" + - "{{ image.name }}:{{ image.tag }}" + - "-f" + - "{{ playbook_dir }}/Containerfile" + - "../../.." - name: "Clean image cache" - docker_prune: - images : true + community.docker.docker_prune: + images: true ... diff --git a/.ci/ansible/settings.py.j2 b/.ci/ansible/settings.py.j2 index dfe2851de..ab8ebb3dc 100644 --- a/.ci/ansible/settings.py.j2 +++ b/.ci/ansible/settings.py.j2 @@ -10,10 +10,6 @@ REDIS_HOST = "localhost" REDIS_PORT = 6379 ANALYTICS = False -{% if api_root is defined %} -API_ROOT = {{ api_root | repr }} -{% endif %} - {% if pulp_settings %} {% for key, value in pulp_settings.items() %} {{ key | upper }} = {{ value | repr }} diff --git a/.ci/ansible/start_container.yaml b/.ci/ansible/start_container.yaml index acdc22ad3..e0891b7ab 100644 --- a/.ci/ansible/start_container.yaml +++ b/.ci/ansible/start_container.yaml @@ -1,6 +1,7 @@ # Ansible playbook to start the pulp service container and its supporting services --- -- hosts: "localhost" +- name: "Start CI Containers" + hosts: "localhost" gather_facts: false vars_files: - "vars/main.yaml" @@ -14,16 +15,16 @@ - "settings" - name: "Generate Pulp Settings" - template: + ansible.builtin.template: src: "settings.py.j2" dest: "settings/settings.py" - name: "Setup docker networking" - docker_network: + community.docker.docker_network: name: "pulp_ci_bridge" - name: "Start Service Containers" - docker_container: + community.docker.docker_container: name: "{{ item.name }}" image: "{{ item.image }}" auto_remove: true @@ -39,12 +40,12 @@ loop: "{{ services | default([]) }}" - name: "Retrieve Docker Network Info" - docker_network_info: + community.docker.docker_network_info: name: "pulp_ci_bridge" register: "pulp_ci_bridge_info" - name: "Update /etc/hosts" - lineinfile: + ansible.builtin.lineinfile: path: "/etc/hosts" regexp: "\\s{{ item.value.Name }}\\s*$" line: "{{ item.value.IPv4Address | ansible.utils.ipaddr('address') }}\t{{ item.value.Name }}" @@ -55,16 +56,27 @@ amazon.aws.s3_bucket: aws_access_key: "{{ minio_access_key }}" aws_secret_key: "{{ minio_secret_key }}" - s3_url: "http://minio:9000" + endpoint_url: "http://minio:9000" region: "eu-central-1" name: "pulp3" state: "present" when: "s3_test | default(false)" - - block: + - name: "Wait on Services" + block: + - name: "Wait for azurite" + ansible.builtin.uri: + url: "http://ci-azurite:10000/" + status_code: + - 200 + - 400 + when: "azure_test | default(false)" + retries: 2 + delay: 5 + - name: "Wait for Pulp" - uri: - url: "http://pulp{{ lookup('env', 'PULP_API_ROOT') | default('\/pulp\/', True) }}api/v3/status/" + ansible.builtin.uri: + url: "http://pulp{{ pulp_scenario_settings.api_root | default(pulp_settings.api_root | default('\/pulp\/', True), True) }}api/v3/status/" follow_redirects: "all" validate_certs: "no" register: "result" @@ -73,11 +85,12 @@ delay: 5 rescue: - name: "Output pulp container log" - command: "docker logs pulp" + ansible.builtin.command: + cmd: "docker logs pulp" failed_when: true - name: "Check version of component being tested" - assert: + ansible.builtin.assert: that: - "(result.json.versions | items2dict(key_name='component', value_name='version'))[item.app_label] | canonical_semver == (component_version | canonical_semver)" fail_msg: | @@ -86,14 +99,15 @@ loop: "{{ 'plugins' | ansible.builtin.extract(lookup('ansible.builtin.file', '../../template_config.yml') | from_yaml) }}" - name: "Set pulp password in .netrc" - copy: + ansible.builtin.copy: dest: "~/.netrc" content: | machine pulp login admin password password -- hosts: "pulp" +- name: "Prepare Pulp Application Container" + hosts: "pulp" gather_facts: false tasks: - name: "Create directory for pulp-smash config" @@ -108,6 +122,6 @@ dest: "/var/lib/pulp/.config/pulp_smash/settings.json" - name: "Set pulp admin password" - command: + ansible.builtin.command: cmd: "pulpcore-manager reset-admin-password --password password" ... diff --git a/.github/workflows/scripts/before_install.sh b/.github/workflows/scripts/before_install.sh index 168fe4af7..b34f7e944 100755 --- a/.github/workflows/scripts/before_install.sh +++ b/.github/workflows/scripts/before_install.sh @@ -29,7 +29,7 @@ if [ "$TEST" = "s3" ]; then COMPONENT_SOURCE="${COMPONENT_SOURCE} pulpcore[s3] git+https://github.com/gerrod3/botocore.git@fix-100-continue" fi if [ "$TEST" = "azure" ]; then - COMPONENT_SOURCE="${COMPONENT_SOURCE} pulpcore[azure]" + COMPONENT_SOURCE="${COMPONENT_SOURCE} pulpcore[azure,uvloop]" fi if [[ "$TEST" = "pulp" ]]; then @@ -39,10 +39,6 @@ if [[ "$TEST" = "lowerbounds" ]]; then python3 .ci/scripts/calc_constraints.py pyproject.toml > lowerbounds_constraints.txt fi -export PULP_API_ROOT=$(test "${TEST}" = "s3" && echo "/rerouted/djnd/" || echo "/pulp/") - -echo "PULP_API_ROOT=${PULP_API_ROOT}" >> "$GITHUB_ENV" - # Compose the scenario definition. mkdir -p .ci/ansible/vars @@ -54,9 +50,8 @@ legacy_component_name: "pulp_python" component_name: "python" component_version: "${COMPONENT_VERSION}" pulp_env: {} -pulp_settings: {"allowed_export_paths": "/tmp", "allowed_import_paths": "/tmp", "orphan_protection_time": 0, "pypi_api_hostname": "https://pulp:443"} +pulp_settings: {"allowed_export_paths": "/tmp", "allowed_import_paths": "/tmp", "api_root": "/pulp/", "orphan_protection_time": 0, "pypi_api_hostname": "https://pulp:443"} pulp_scheme: "https" -api_root: "${PULP_API_ROOT}" image: name: "pulp" tag: "ci_build" @@ -93,7 +88,7 @@ if [ "$TEST" = "s3" ]; then s3_test: true minio_access_key: "${MINIO_ACCESS_KEY}" minio_secret_key: "${MINIO_SECRET_KEY}" -pulp_scenario_settings: {"MEDIA_ROOT": "", "STORAGES": {"default": {"BACKEND": "storages.backends.s3boto3.S3Boto3Storage", "OPTIONS": {"access_key": "AKIAIT2Z5TDYPX3ARJBA", "addressing_style": "path", "bucket_name": "pulp3", "default_acl": "@none", "endpoint_url": "http://minio:9000", "region_name": "eu-central-1", "secret_key": "fqRvjWaPU5o0fCqQuUWbj9Fainj2pVZtBCiDiieS", "signature_version": "s3v4"}}, "staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}}, "domain_enabled": true} +pulp_scenario_settings: {"MEDIA_ROOT": "", "STORAGES": {"default": {"BACKEND": "storages.backends.s3boto3.S3Boto3Storage", "OPTIONS": {"access_key": "AKIAIT2Z5TDYPX3ARJBA", "addressing_style": "path", "bucket_name": "pulp3", "default_acl": "@none", "endpoint_url": "http://minio:9000", "region_name": "eu-central-1", "secret_key": "fqRvjWaPU5o0fCqQuUWbj9Fainj2pVZtBCiDiieS", "signature_version": "s3v4"}}, "staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}}, "api_root": "/rerouted/djnd/", "domain_enabled": true} pulp_scenario_env: {} VARSYAML fi diff --git a/.github/workflows/scripts/install.sh b/.github/workflows/scripts/install.sh index 9df47ccde..bfdcc8d9e 100755 --- a/.github/workflows/scripts/install.sh +++ b/.github/workflows/scripts/install.sh @@ -15,7 +15,7 @@ REPO_ROOT="$PWD" source .github/workflows/scripts/utils.sh -PIP_REQUIREMENTS=("pulp-cli") +PIP_REQUIREMENTS=("pulp-cli" "yq") # This must be the **only** call to "pip install" on the test runner. pip install ${PIP_REQUIREMENTS[*]} @@ -23,7 +23,7 @@ pip install ${PIP_REQUIREMENTS[*]} if [[ "$TEST" = "s3" ]]; then for i in {1..3} do - ansible-galaxy collection install "amazon.aws:8.1.0" && s=0 && break || s=$? && sleep 3 + ansible-galaxy collection install "amazon.aws:11.1.0" && s=0 && break || s=$? && sleep 3 done if [[ $s -gt 0 ]] then @@ -36,18 +36,15 @@ fi PULP_CLI_VERSION="$(pip freeze | sed -n -e 's/pulp-cli==//p')" git clone --depth 1 --branch "$PULP_CLI_VERSION" https://github.com/pulp/pulp-cli.git ../pulp-cli -cd .ci/ansible/ +PULP_API_ROOT="$(yq -r '.pulp_scenario_settings.api_root // .pulp_settings.api_root // "/pulp/"' < .ci/ansible/vars/main.yaml)" pulp config create --base-url https://pulp --api-root "${PULP_API_ROOT}" --username "admin" --password "password" -cp ~/.config/pulp/cli.toml "${REPO_ROOT}/../pulp-cli/tests/cli.toml" +cp ~/.config/pulp/cli.toml "../pulp-cli/tests/cli.toml" + +cd .ci/ansible/ ansible-playbook build_container.yaml ansible-playbook start_container.yaml - -# Plugins often write to ~/.config/pulp/cli.toml from the host -chmod 777 ~/.config/pulp -chmod 666 ~/.config/pulp/cli.toml -sudo chown -R 700:700 ~/.config echo ::group::SSL # Copy pulp CA sudo docker cp pulp:/etc/pulp/certs/pulp_webserver.crt /usr/local/share/ca-certificates/pulp_webserver.crt @@ -72,7 +69,3 @@ fi # Needed for some functional tests cmd_prefix bash -c "echo '%wheel ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/nopasswd" cmd_prefix bash -c "usermod -a -G wheel pulp" - -# Lots of plugins try to use this path, and throw warnings if they cannot access it. -cmd_prefix mkdir /.pytest_cache -cmd_prefix chown pulp:pulp /.pytest_cache diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f7e14cac..00d2c3ecf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -134,7 +134,7 @@ jobs: 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 + pulp status || true docker images || true docker ps -a || true docker logs pulp || true diff --git a/.github/workflows/update_ci.yml b/.github/workflows/update_ci.yml index 5f5cbfd8f..4a4969429 100644 --- a/.github/workflows/update_ci.yml +++ b/.github/workflows/update_ci.yml @@ -196,4 +196,35 @@ jobs: env: GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}" continue-on-error: true + - uses: "actions/checkout@v6" + with: + fetch-depth: 0 + path: "pulp_python" + ref: "3.28" + + - name: "Run update" + working-directory: "pulp_python" + run: | + ../plugin_template/scripts/update_ci.sh --release + + - name: "Create Pull Request for CI files" + uses: "peter-evans/create-pull-request@v8" + id: "create_pr_3_28" + with: + token: "${{ secrets.RELEASE_TOKEN }}" + path: "pulp_python" + committer: "pulpbot " + author: "pulpbot " + title: "Update CI files for branch 3.28" + branch: "update-ci/3.28" + base: "3.28" + delete-branch: true + - name: "Mark PR automerge" + working-directory: "pulp_python" + run: | + gh pr merge --rebase --auto "${{ steps.create_pr_3_28.outputs.pull-request-number }}" + if: "steps.create_pr_3_28.outputs.pull-request-number" + env: + GH_TOKEN: "${{ secrets.RELEASE_TOKEN }}" + continue-on-error: true ... diff --git a/CHANGES/+pypi-path-prefix.feature b/CHANGES/+pypi-path-prefix.feature deleted file mode 100644 index 4b00c814a..000000000 --- a/CHANGES/+pypi-path-prefix.feature +++ /dev/null @@ -1 +0,0 @@ -Added new setting PYPI_PATH_PREFIX to allow for customizing the path prefix for the PyPI API. diff --git a/CHANGES/1159.feature b/CHANGES/1159.feature deleted file mode 100644 index 82940a2a8..000000000 --- a/CHANGES/1159.feature +++ /dev/null @@ -1,2 +0,0 @@ -Added the name_normalized field to PythonPackageContent model with a database index to replace -runtime regex normalization, reducing database load for package name lookups. diff --git a/CHANGES/1162.feature b/CHANGES/1162.feature deleted file mode 100644 index 75e0616bb..000000000 --- a/CHANGES/1162.feature +++ /dev/null @@ -1,5 +0,0 @@ -Added a new `allow_package_substitution` boolean field to PythonRepository (default: True). -When set to False, any new repository version that would implicitly replace existing content -with content that has the same filename but a different sha256 checksum is rejected. This -applies to all repository version creation paths including uploads, modify, and sync. Content -with a matching checksum is allowed through idempotently. diff --git a/pulp_python/app/__init__.py b/pulp_python/app/__init__.py index 46f4aa972..9c430387f 100644 --- a/pulp_python/app/__init__.py +++ b/pulp_python/app/__init__.py @@ -10,7 +10,7 @@ class PulpPythonPluginAppConfig(PulpPluginAppConfig): name = "pulp_python.app" label = "python" - version = "3.28.0.dev" + version = "3.29.0.dev" python_package_name = "pulp-python" domain_compatible = True diff --git a/pyproject.toml b/pyproject.toml index bf53cf7fa..a96630c22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = 'setuptools.build_meta' [project] name = "pulp-python" -version = "3.28.0.dev" +version = "3.29.0.dev" description = "pulp-python plugin for the Pulp Project" readme = "README.md" authors = [ @@ -79,7 +79,7 @@ ignore = [ [tool.bumpversion] # This section is managed by the plugin template. Do not edit manually. -current_version = "3.28.0.dev" +current_version = "3.29.0.dev" commit = false tag = false parse = "(?P\\d+)\\.(?P\\d+)\\.(?P0a)?(?P\\d+)(\\.(?P[a-z]+))?" diff --git a/template_config.yml b/template_config.yml index 2b03d23bc..8a0a44820 100644 --- a/template_config.yml +++ b/template_config.yml @@ -6,7 +6,6 @@ # After editing this file please always reapply the plugin template before committing any changes. --- -api_root: "/pulp/" black: true check_commit_message: true check_gettext: true @@ -27,7 +26,7 @@ extra_files: [] flake8: true flake8_ignore: [] github_org: "pulp" -latest_release_branch: "3.27" +latest_release_branch: "3.28" lint_requirements: true os_required_packages: [] parallel_test_workers: 8 @@ -45,6 +44,7 @@ pulp_scheme: "https" pulp_settings: allowed_export_paths: "/tmp" allowed_import_paths: "/tmp" + api_root: "/pulp/" orphan_protection_time: 0 pypi_api_hostname: "https://pulp:443" pulp_settings_azure: @@ -81,6 +81,7 @@ pulp_settings_s3: signature_version: "s3v4" staticfiles: BACKEND: "django.contrib.staticfiles.storage.StaticFilesStorage" + api_root: "/rerouted/djnd/" domain_enabled: true pydocstyle: true release_email: "pulp-infra@redhat.com"