From 0e48bf94cad849d3481adbf86e2c7b0e2951694d Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 23 Aug 2026 03:45:46 +0000 Subject: [PATCH] Update CI files --- .ci/ansible/start_container.yaml | 36 +++++++++++++++++---- .github/workflows/scripts/before_install.sh | 3 +- .github/workflows/scripts/install.sh | 12 ------- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/.ci/ansible/start_container.yaml b/.ci/ansible/start_container.yaml index 4ef94c8..f0b4d43 100644 --- a/.ci/ansible/start_container.yaml +++ b/.ci/ansible/start_container.yaml @@ -55,13 +55,35 @@ become: true - name: "Create Pulp Bucket" - amazon.aws.s3_bucket: - aws_access_key: "{{ minio_access_key }}" - aws_secret_key: "{{ minio_secret_key }}" - endpoint_url: "http://minio:9000" - region: "eu-central-1" - name: "pulp3" - state: "present" + ansible.builtin.command: + argv: + - "python3" + - "-c" + - | + import boto3 + from botocore.exceptions import ClientError + client = boto3.client( + "s3", + aws_access_key_id="{{ minio_access_key }}", + aws_secret_access_key="{{ minio_secret_key }}", + endpoint_url="http://minio:9000", + region_name="eu-central-1", + ) + try: + client.create_bucket( + Bucket="pulp3", + CreateBucketConfiguration={"LocationConstraint": "eu-central-1"}, + ) + except ClientError as exc: + if exc.response["Error"]["Code"] not in ( + "BucketAlreadyOwnedByYou", + "BucketAlreadyExists", + ): + raise + register: "create_bucket" + retries: 6 + delay: 5 + until: "create_bucket is succeeded" when: "s3_test | default(false)" - name: "Wait on Services" diff --git a/.github/workflows/scripts/before_install.sh b/.github/workflows/scripts/before_install.sh index c83ed89..12766a7 100755 --- a/.github/workflows/scripts/before_install.sh +++ b/.github/workflows/scripts/before_install.sh @@ -83,7 +83,8 @@ 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"}}, "api_root": "/rerouted/djnd/", "domain_enabled": true} -pulp_scenario_env: {} +# MinIO omits 100-continue on 0-byte PUTs; stock botocore hangs without this (boto/botocore#3123). +pulp_scenario_env: {"BOTO_EXPERIMENTAL__NO_EMPTY_CONTINUE": "true"} VARSYAML fi diff --git a/.github/workflows/scripts/install.sh b/.github/workflows/scripts/install.sh index fe2b854..c9dbab2 100755 --- a/.github/workflows/scripts/install.sh +++ b/.github/workflows/scripts/install.sh @@ -20,18 +20,6 @@ PIP_REQUIREMENTS=("pulp-cli" "yq") # This must be the **only** package install on the test runner. uv pip install ${PIP_REQUIREMENTS[*]} -if [[ "$TEST" = "s3" ]]; then -for i in {1..3} -do - ansible-galaxy collection install "amazon.aws:11.1.0" && s=0 && break || s=$? && sleep 3 -done -if [[ $s -gt 0 ]] -then - echo "Failed to install amazon.aws" - exit $s -fi -fi - 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"