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

CRAYSAT-1945: Fix traceback error of session checks in CFS v2 #306

Merged
merged 1 commit into from
Dec 18, 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.33.7] - 2024-12-18

### Fixed
- Fixed the traceback error encountered during session checks in CFS v2
when using a smaller page size.

## [3.33.6] - 2024-12-12

### Added
Expand Down
31 changes: 16 additions & 15 deletions sat/cli/bootsys/service_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,23 +386,24 @@ def get_active_sessions(self):
cfs_client = CFSClientBase.get_cfs_client(SATSession(), get_config_value('cfs.api_version'))
try:
sessions = cfs_client.get_sessions()
except (APIError, ValueError) as err:
raise self.get_err(str(err))

cfs_session_fields = [
self.id_field_name,
'status.session.status',
'status.session.startTime',
'status.session.succeeded',
'status.session.job'
]
cfs_session_fields = [
self.id_field_name,
'status.session.status',
'status.session.startTime',
'status.session.succeeded',
'status.session.job'
]

return [
get_new_ordered_dict(session, cfs_session_fields, MISSING_VALUE)
for session in sessions
# Possible values are 'pending', 'running', or 'complete'
if get_val_by_path(session, 'status.session.status') != 'complete'
]
return [
get_new_ordered_dict(session, cfs_session_fields, MISSING_VALUE)
for session in sessions
# Possible values are 'pending', 'running', or 'complete'
if get_val_by_path(session, 'status.session.status') != 'complete'
]

except APIError as err:
raise self.get_err(str(err))


class FirmwareActivityChecker(ServiceActivityChecker):
Expand Down
Loading