zuul-jobs/roles/test-upload-logs-swift
Clark Boylan a9a2f5ab50 Be more cautious initing mimetypes
We use mimetypes to set file mime types for upload to log server
locations. We also override yaml files mime type to text/plain when
doing so. If we then call mimetypes.init() again this overrides the
previous yaml update to text/plain. This wasn't a problem until
python3.12 but python3.12 (on Ubuntu Noble specifically) seems to import
test cases in a different order which results in the mimetypes.init()
call in generate_manifest.py overriding the yaml mimetype set by the log
upload test cases.

Simply check if mimetypes is already inited before we init it again
which should avoid the problem entirely.

Note that this is likely to only ever by a testing issues as typically
ansible wouldn't import all of this code together but the unittest
runner does.

Change-Id: Ifb9137ddd89713cad546129c462ad94315100940
2024-06-26 15:07:32 -07:00
..
defaults test-upload-logs-swift: revert download script 2020-03-30 12:32:02 +11:00
library Be more cautious initing mimetypes 2024-06-26 15:07:32 -07:00
tasks Standarise block/when ordering 2022-11-07 10:37:53 +11:00
__init__.py Test role for upload-logs-swift 2019-10-11 11:32:11 -07:00
README.rst test-upload-logs-swift: revert download script 2020-03-30 12:32:02 +11:00

THIS IS FOR TESTING ONLY

Upload logs to a swift container

This uploads logs to an OpenStack Object Store (Swift) container.

Role Variables

Complex argument which contains the cloud configuration in os-cloud-config (clouds.yaml) format. It is expected that this argument comes from a Secret.