Azure / Azure/Azure-DataFactory

Bug in ADF pipeline runs REST API. LatestOnly filter not working when querying ADF pipeline runs

Open
#639 1 comment 0 reactions 0 assignees View on GitHub
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"]}
]
}
```

![](https://i.imgur.com/9bX4Rp0.png)

It is all the pipeline runs which has `isLatest` value as `false` as well.

**JSON response when filter was not used:**

![](https://i.imgur.com/l5g7XmN.png)

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.