From 8c57b0956b9f2124fc3cb98ea4c01535e7903323 Mon Sep 17 00:00:00 2001 From: NITESH SINGH Date: Mon, 30 Mar 2026 20:26:36 +0530 Subject: [PATCH] =?UTF-8?q?fix(rollback):=20use=20=3D=3D=20instead=20of=20?= =?UTF-8?q?is=20for=20boolean=20check=20in=20execute=5Froll=E2=80=A6=20(#1?= =?UTF-8?q?207)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(rollback): use == instead of is for boolean check in execute_rollback_version_files Signed-off-by: Nitesh * fix(rollback): fix indentation in execute_rollback_version_files and add license header Signed-off-by: Nitesh --------- Signed-off-by: Nitesh Co-authored-by: Nitesh Co-authored-by: Paige Patton <64206430+paigerube14@users.noreply.github.com> --- krkn/rollback/handler.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/krkn/rollback/handler.py b/krkn/rollback/handler.py index cd671201..0b0cfdb0 100644 --- a/krkn/rollback/handler.py +++ b/krkn/rollback/handler.py @@ -1,3 +1,19 @@ +#!/usr/bin/env python +# +# Copyright 2025 The Krkn Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from __future__ import annotations import logging @@ -132,8 +148,8 @@ def execute_rollback_version_files( :param ignore_auto_rollback_config: Flag to ignore auto rollback configuration. Will be set to True for manual execute-rollback calls. """ if not ignore_auto_rollback_config and RollbackConfig().auto is False: - logger.warning(f"Auto rollback is disabled, skipping execution for run_uuid={run_uuid or '*'}, scenario_type={scenario_type or '*'}") - return + logger.warning(f"Auto rollback is disabled, skipping execution for run_uuid={run_uuid or '*'}, scenario_type={scenario_type or '*'}") + return # Get the rollback versions directory version_files = RollbackConfig.search_rollback_version_files(run_uuid, scenario_type)