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-8962: Properly handle response from DB.get_all #121

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.19.3] - 04/05/2024
### Fixed
- Fix bug in `patch_v2_components_dict` to properly handle response from `DB.get_all()`

## [1.19.2] - 04/04/2024
### Fixed
- Corrected errors in the API spec to make it properly follow OAS 3.0.2 and to
Expand Down
8 changes: 4 additions & 4 deletions src/server/cray/cfs/api/controllers/components.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# MIT License
#
# (C) Copyright 2020-2023 Hewlett Packard Enterprise Development LP
# (C) Copyright 2020-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 @@ -300,9 +300,9 @@ def patch_v2_components_dict(data):
if component_data:
components.append((component_id, component_data))
else:
# On large scale systems, this response may be too large
# use v3 for smaller responses
components = DB.get_all()
# TODO: On large scale systems, this response may be too large
# and require paging to be implemented
components = [ (component_data["id"], component_data) for component_data, _ in DB.get_all() ]

response = []
patch = data.get("patch", {})
Expand Down
Loading