Azure / Azure/Azure-DataFactory
Bug in ADF pipeline runs REST API. LatestOnly filter not working when querying ADF pipeline runs
- Dominant language
- PowerShell
- Stars
- 529
- Forks
- 623
- PR merge metrics
- No merged PRs in 30d
Description
When using the [Pipeline runs REST API](https://learn.microsoft.com/en-us/rest/api/datafactory/pipeline-runs/query-by-factory?view=rest-datafactory-2018-06-01&tabs=HTTP) with a `LatestOnly` filter, it is not giving the expected results.
JSON response when `LatestOnly` filter was used with a `True`.
**Body:**
```
{
lastUpdatedAfter: "2024-01-07T21:00:00.0000000Z",
lastUpdatedBefore: "2024-01-11T21:00:00.0000000Z",
"filters":[
{"operand":"LatestOnly","operator":"Equals","values":["True"]},
{"operand":"Status","operator":"In","values":["Failed"]},
{"operand":"PipelineName","operator":"In","values":["pipeline4","mypipeline"]}
]
}
```

It is all the pipeline runs which has `isLatest` value as `false` as well.
**JSON response when filter was not used:**

It is giving the same results with and without the filter. Tried with different values like `"True"`,`"true"`,'1' but it results the same.
Contributor guide
Assessment
This issue has not been assessed yet.