QueryByFactory using functions RRS feed

  • Question

  • I'm trying to query all the latest pipeline runs (one for each pipeline), and I figured RunQueryFilter's LatestOnly operand should do the trick. The other operands (like 'RunStart', 'RunEnd', 'ActivityName') work nicely, but I'm unable to get LatestOnly to do what I think it should do. As always, documentation is very minimal and no examples are available, unless you can point me to some secret link?

    Here's what I tried:

          var lLatestonly = new List<string>();
                lLatestonly.Add("True"); //also tried with 1 and true values
                var latest = new RunQueryFilter("LatestOnly", "Equals", lLatestonly);

    Any help appreciated,


    Monday, May 20, 2019 12:25 PM

All replies

  • Hello AzureNick and thank you for your inquiry.  What did you expect LatestOnly to do, and how did it compare to what you got?
    When I try that feature in the GUI, the difference I find, is whether re-run history is shown.  This means that if I run the same pipeline two distinct times, I see both wither or not (Hide All Rerun History / LatestOnly) is turned on.
    Then if I go and re-run an existing pipeline run, another entry is added.  Enabling (Hide All Rerun History / LatestOnly) hides all but the most recent.
    I haven't explained very well, so here are some pictures.
    Monday, May 20, 2019 7:47 PM