CASMCMS-8978: Fix broken _matches_filter call in patch_v2_components_dict #133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The fix for CASMTRIAGE-5974 modified the
_matches_filter
function insrc/server/cray/cfs/api/controllers/components.py
, adding theid_list
argument. (PR: #82). However, it overlooked the call to this function in thepatch_v2_components_dict
function. So now that function raises an exception when it tries to make that call, due to the omitted argument.Originally, this PR just modified the call so that it included all of the required arguments. But while that did allow my PATCH requests to succeed, I noticed that they were modifying more components than they should be. This led me to discover that there is a bug in the status filtering code for v2 -- specifically, the
_set_status
function is not used, and so the filter is not being correctly applied. This PR corrects that as well.Backport for CSM 1.5:
#134
Partial backport for CSM 1.4:
#135
(the original bug does not exist in CSM 1.4, but the status filtering issue does)
I tested the CSM 1.5 changes on drax.
I tested the CSM 1.4 changes on wasp.