From 0a9c50f1c5bd357213ef638a46ea4748ebe1893a Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Fri, 30 Aug 2024 15:09:39 +0000 Subject: [PATCH] Fix the upload-logs-s3 test playbook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change fixes the following error: :stderr: error: externally-managed-environment × This environment is externally managed Change-Id: I779b68aa6bfd5cc4a5831c727e820f49ed946a97 --- roles/upload-logs-base/library/zuul_s3_upload.py | 4 +++- test-playbooks/upload-logs-s3.yaml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/upload-logs-base/library/zuul_s3_upload.py b/roles/upload-logs-base/library/zuul_s3_upload.py index 7e5240de7..87b57e48d 100755 --- a/roles/upload-logs-base/library/zuul_s3_upload.py +++ b/roles/upload-logs-base/library/zuul_s3_upload.py @@ -114,7 +114,9 @@ class Uploader(): CORSConfiguration=cors) except Exception as e: # MinIO (which we use in testing) doesn't implement this method - if 'MalformedXML' not in str(e): + minio_cors = "PutBucketCors operation: A header you provided " + \ + "implies functionality that is not implemented" + if 'MalformedXML' not in str(e) and minio_cors not in str(e): raise def upload(self, file_list): diff --git a/test-playbooks/upload-logs-s3.yaml b/test-playbooks/upload-logs-s3.yaml index 8fd70adbd..22f3d5822 100644 --- a/test-playbooks/upload-logs-s3.yaml +++ b/test-playbooks/upload-logs-s3.yaml @@ -11,6 +11,7 @@ tasks: - name: Install boto pip: + extra_args: "--break-system-packages" name: - boto3 - botocore