Skip to content

Commit

Permalink
CRAYSAT-1945: Fix traceback error of session checks in CFS v2
Browse files Browse the repository at this point in the history
  • Loading branch information
annapoorna-s-alt committed Dec 17, 2024
1 parent b9766f5 commit 11cb4db
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ 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).

## [2.3.2] - 2024-11-26
## [2.3.3] - 2024-12-17

### Fixed
- Fixed issue that did not allow for paths containing `~` to be parsed correctly
- Fixed the traceback error encountered during session checks in CFS v2
when using a smaller page size.

## [2.3.2] - 2024-12-02

### Fixed
- Fixed issue that did not allow for paths containing `~` to be parsed correctly

## [2.3.1] - 2024-12-02

Expand Down
2 changes: 1 addition & 1 deletion csm_api_client/service/cfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ def get_resource(self, resource: str, params: Dict = None) -> Generator[Dict, No
try:
yield from self.get(resource, params=params).json()
except APIError as err:
raise APIError(f'Failed to get CFS {resource}: {err}')
LOGGER.warning(f'Failed to get CFS {resource}: {err}')
except ValueError as err:
raise APIError(f'Failed to parse JSON in response from CFS when getting '
f'{resource}: {err}')
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "csm-api-client"
version = "2.3.2"
version = "2.3.3"
description = "Python client library for CSM APIs"
authors = [
"Ryan Haasken <[email protected]>",
Expand Down
5 changes: 4 additions & 1 deletion tests/service/test_cfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1799,9 +1799,12 @@ def test_get_component_ids_using_config_failure(self):
config_name = 'some-config-name'

with patch.object(cfs_client, 'get', side_effect=APIError(err_msg)) as mock_get:
with self.assertRaisesRegex(APIError, 'Failed to get components '):
with self.assertLogs(level=logging.WARNING) as log:
cfs_client.get_component_ids_using_config(config_name)

self.assertIn("Failed to get CFS components:",
log.output[0])

mock_get.assert_called_once_with('components', params={'configName': config_name})

def test_update_component_no_changes(self):
Expand Down

0 comments on commit 11cb4db

Please sign in to comment.