From 7e335f2fe49efe8935302d858a160c844ea4f0e2 Mon Sep 17 00:00:00 2001 From: "Philipp Heil (zkdev)" Date: Tue, 26 Nov 2024 11:02:27 +0100 Subject: [PATCH] Re-use cfg-factory in delivery-client Especially useful for screnarios where cfg-factory needs custom initialisation, e.g. secret replication. --- ccc/delivery.py | 10 ++++++++-- cli/gardener_ci/_oci.py | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ccc/delivery.py b/ccc/delivery.py index 16997b75d..79536f545 100644 --- a/ccc/delivery.py +++ b/ccc/delivery.py @@ -49,7 +49,10 @@ def default_client_if_available( routes = delivery.client.DeliveryServiceRoutes( base_url=delivery_endpoints.base_url(), ) - return delivery.client.DeliveryServiceClient(routes=routes) + return delivery.client.DeliveryServiceClient( + routes=routes, + cfg_factory=cfg_factory, + ) def client( @@ -69,7 +72,10 @@ def client( base_url=delivery_endpoints.base_url(), ) - return delivery.client.DeliveryServiceClient(routes=routes) + return delivery.client.DeliveryServiceClient( + routes=routes, + cfg_factory=cfg_factory, + ) def endpoints(cfg_set=None): diff --git a/cli/gardener_ci/_oci.py b/cli/gardener_ci/_oci.py index 3a01438cd..01bd45fd1 100644 --- a/cli/gardener_ci/_oci.py +++ b/cli/gardener_ci/_oci.py @@ -502,6 +502,7 @@ def osinfo( routes=delivery.client.DeliveryServiceRoutes( base_url=delivery_cfg.base_url(), ), + cfg_factory=cfg_factory, ) else: delivery_client = None