Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CASMCMS-8946: Update base operator to handle case where all nodes to act on have exceeded their retry limit #264

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ 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).

## [Unreleased]
### Fixed
- Update base operator to handle case where all nodes to act on have exceeded their retry limit

## [2.10.7] - 2024-03-08
### Changed
Expand Down
5 changes: 4 additions & 1 deletion src/bos/operators/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# MIT License
#
# (C) Copyright 2021-2023 Hewlett Packard Enterprise Development LP
# (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -117,6 +117,9 @@ def _run(self) -> None:
LOGGER.info('Found {} components that require action'.format(len(components)))
if self.retry_attempt_field: # Only check for failed components if we track retries for this operator
components = self._handle_failed_components(components)
if not components:
LOGGER.debug('After removing components that exceeded their retry limit, 0 components require action')
return
for component in components: # Unset old errors components
component['error'] = ''
try:
Expand Down
Loading