From 4f51fc7da3b5fbe7d384bdc810f35b186360b00a Mon Sep 17 00:00:00 2001 From: Michael Kelly Date: Wed, 17 Aug 2022 21:14:37 -0700 Subject: [PATCH] kopf: Upgrade kopf to at least 1.35.0 Upgrade from 1.30.* to 1.35.0 or later. The minimum bound is introduced because earlier versions of kopf may not work correctly with the operator. Change-Id: I2b40e223f48aca6f45d901e1cc1ee67cf27e486f --- requirements.txt | 2 +- zuul_operator/cmd.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 69276c5..67ee416 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ pbr -kopf<1.31.0 +kopf>=1.35.0 kubernetes jinja2 pymysql diff --git a/zuul_operator/cmd.py b/zuul_operator/cmd.py index d55770f..115a787 100644 --- a/zuul_operator/cmd.py +++ b/zuul_operator/cmd.py @@ -14,7 +14,7 @@ import argparse -from kopf.engines import loggers +import kopf from zuul_operator import ZuulOperator @@ -38,10 +38,10 @@ class ZuulOperatorCommand: args = parser.parse_args() # Use kopf's loggers since they carry object data - loggers.configure(debug=False, verbose=args.debug, - quiet=False, - log_format=loggers.LogFormat['FULL'], - log_refkey=None, log_prefix=None) + kopf.configure(debug=False, verbose=args.debug, + quiet=False, + log_format=kopf.LogFormat['FULL'], + log_refkey=None, log_prefix=None) self.op.run()