From 13ac003dbfa510b39ae3f9358df8910744c04ae1 Mon Sep 17 00:00:00 2001 From: annapoorna-s-alt Date: Thu, 8 Aug 2024 11:42:24 +0000 Subject: [PATCH] CRAYSAT-1706: To stop waiting if BOS session is deleted IM:CRAYSAT-1706 Reviewer:Ryan --- CHANGELOG.md | 6 ++++++ sat/cli/bootsys/bos.py | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42cd326e..26a27c91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.30.1] - 2024-08-12 + +### Fixed +- Stop waiting till `sat bootsys` execution, if BOS session has deleted in + `bos-operations` stage. + ## [3.30.0] - 2024-08-09 ### Changed diff --git a/sat/cli/bootsys/bos.py b/sat/cli/bootsys/bos.py index c6346363..113bdb04 100644 --- a/sat/cli/bootsys/bos.py +++ b/sat/cli/bootsys/bos.py @@ -45,7 +45,7 @@ from sat.config import get_config_value from sat.session import SATSession from sat.util import pester, prompt_continue -from sat.waiting import Waiter +from sat.waiting import Waiter, WaitingFailure from sat.xname import XName LOGGER = logging.getLogger(__name__) @@ -277,7 +277,10 @@ def has_completed(self): return False except APIError as err: - LOGGER.warning('Failed to query session status: %s', err) + if '404' in str(err): + raise WaitingFailure(f'Failed to query session status: {err}') + else: + LOGGER.warning('Failed to query session status: %s', err) except KeyError as err: LOGGER.warning('BOS session status query response missing key %s', err)