From 1fa5922d66fe5f64ef1d35f47f06f25b544b9aec Mon Sep 17 00:00:00 2001 From: Florent 'Skia' Jacquet Date: Tue, 5 Mar 2024 13:52:49 +0100 Subject: [PATCH] p/autopkgtest: fix v3 swift auth configuration check In swift v3, the tenant is replaced by the project, so better update the check accordingly. This fixes a stacktrace in production happening because the `ADT_SWIFT_TENANT` config had been dropped for some reasons. Stacktrace: ``` Traceback (most recent call last): File "/var/lib/security-britney/britney2-ubuntu/britney.py", line 1623, in Britney().main() File "/var/lib/security-britney/britney2-ubuntu/britney.py", line 400, in __init__ self._policy_engine.initialise(self, self.hints) File "/var/lib/security-britney/britney2-ubuntu/britney2/policies/policy.py", line 35, in initialise policy.initialise(britney) File "/var/lib/security-britney/britney2-ubuntu/britney2/policies/autopkgtest.py", line 256, in initialise not self.options.adt_swift_tenant or AttributeError: 'Values' object has no attribute 'adt_swift_tenant' ``` --- britney2/policies/autopkgtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index f21b85f..260a720 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -253,7 +253,7 @@ class AutopkgtestPolicy(BasePolicy): if self.options.adt_swift_user: if (not self.options.adt_swift_pass or not self.options.adt_swift_auth_url or - not self.options.adt_swift_tenant or + not self.options.adt_swift_project or not self.options.adt_swift_region): raise RuntimeError('Incomplete swift credentials given')