microsoft / azure-devops-rust-api

Rust API crate for the Azure DevOps API
MIT License
60 stars 20 forks source link

`azure_devops_rust_api::test::results::Client::update()` stalls indefinitely or fails to deserialize. #484

Open mTsBucy1 opened 1 month ago

mTsBucy1 commented 1 month ago

Sorry, this isn't a very pretty report, I sadly don't have the time to investigate this further right now.

But running this request with a body with an state enum value that doesn't exist results in this call not returning at all. Additionally, the lastUpdatedBy field in the response will contain null values and this breaks some deserialization.

johnbatty commented 1 month ago

On your second point, I see that the example response in the REST API docs shows lastUpdatedBy with an id of null:

{
  "count": 2,
  "value": [
    {
      "id": 100000,
      "project": {},
      "testRun": {},
      "lastUpdatedBy": {
        "id": null
      },
      "url": ""
    },
    {
      "id": 100001,
      "project": {},
      "testRun": {},
      "lastUpdatedBy": {
        "id": null
      },
      "url": ""
    }
  ]
}

Currently the code expects id to always defined. I'll fix this to make it an Option.

johnbatty commented 1 month ago

Fix to make IdentityRef id optional: https://github.com/microsoft/azure-devops-rust-api/pull/485 Released in 0.23.0.