From eeeb195b747d5a4e2fefea0c5d28fabde70dcd09 Mon Sep 17 00:00:00 2001 From: "Mitch Harding (the weird one)" Date: Fri, 5 Apr 2024 17:56:36 -0400 Subject: [PATCH 1/2] CASMCMS-8962: Properly handle response from DB.get_all (cherry picked from commit caa5a7663b81d74eb4caa389e8701c411f58a8c7) --- CHANGELOG.md | 2 ++ src/server/cray/cfs/api/controllers/components.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1ff792..17d6ea4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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 +- Fix bug in `patch_v2_components_dict` to properly handle response from `DB.get_all()` ## [1.19.2] - 04/04/2024 ### Fixed diff --git a/src/server/cray/cfs/api/controllers/components.py b/src/server/cray/cfs/api/controllers/components.py index bc27d87..8685f2a 100644 --- a/src/server/cray/cfs/api/controllers/components.py +++ b/src/server/cray/cfs/api/controllers/components.py @@ -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"), @@ -302,7 +302,7 @@ def patch_v2_components_dict(data): else: # On large scale systems, this response may be too large # use v3 for smaller responses - components = DB.get_all() + components = [ (component_data["id"], component_data) for component_data in DB.get_all()[0] ] response = [] patch = data.get("patch", {}) From c4f4a9318ef4bef9923bcbac1eaca3eb7770e257 Mon Sep 17 00:00:00 2001 From: "Mitch Harding (the weird one)" Date: Fri, 5 Apr 2024 17:45:36 -0400 Subject: [PATCH 2/2] Release 1.19.3 for CSM 1.6 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17d6ea4..9406644 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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] + +## [1.19.3] - 04/05/2024 ### Fixed - Fix bug in `patch_v2_components_dict` to properly handle response from `DB.get_all()`