Closed benPearce1 closed 3 weeks ago
This seems to be a result of the way the Deployment Targets page was designed, which has the following behaviour:
isDisabled=false
in the API request)isDisabled=true
in the API request)The API handler was written - probably many years ago - to mirror this behaviour, even though we have the isDisabled property as nullable, we always treat a false value the same way as null.
Fix would be to update the frontend to provide no querystring value when the filter is unticked, and to update the backend to respect the nullability of the property.
Release Note: Infrastructure APIs which use isDisabled
parameter will now return all enabled items when isDisabled=false
:tada: The fix for this issue has been released in:
Release stream | Release |
---|---|
2024.4 | 2024.4.4330 |
2025.1+ | all releases |
Severity
Blocking some customers, no workaround available
Version
Didn't check earlier versions
Latest Version
I could reproduce the problem in the latest build
What happened?
When calling the Machines List endpoint and filtering by
IsDisabled
the results are incorrect when settingIsDisabled=false
.Reproduction
For my current test setup:
http://localhost:8066/api/Spaces-1/machines?skip=0&take=2147483647&isDisabled=false
returns all six targetshttp://localhost:8066/api/Spaces-1/machines?skip=0&take=2147483647&isDisabled=true
returns just the two disabled ones:Error and Stacktrace
More Information
This is affecting the use of the Target Datasources in Terraform https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/issues/624
Workaround
Filter on the client side, if possible.