Done:

https://github.com/gocd/gocd/issues/6041

Thank you for the quick reply.

On Thursday, 28 March 2019 21:20:30 UTC-4, Ketan Padegaonkar wrote:
>
> This should not be the case. Do you mind logging a bug?
>
> On Fri, Mar 29, 2019, 2:42 AM Jason Smyth <[email protected] 
> <javascript:>> wrote:
>
>> Hi all,
>>
>> Maybe I just don't understand how this API is intended to work and/or be 
>> used but I am trying to build some things that will leverage it and I am 
>> having a hard time understanding the results I am seeing. We have a GoCD 
>> instance that includes maybe a couple hundred pipelines. For my tests thus 
>> far I have only used 2 pipelines but I can definitely expand on that if it 
>> would be helpful.
>>
>> With pipeline 1, when I call the Stage History API (GET 
>> /go/api/stages/:pipeline_name/:stage_name/history), it returns the 
>> *first* 10 instances in reverse order (i.e. 10, 9, 8...1). If I add an 
>> offset of 10, it returns the next 10 instances in reverse order (i.e., 20, 
>> 19...11).
>>
>> With pipeline 2 the same call returns the *last* 10 instances, in 
>> reverse order (e.g. 100, 99, 98...91 [not actual values]) and when I add an 
>> offset of 10 returns the previous 10 (e.g. 90, 89...81).
>>
>> So, essentially when I query pipeline 1 the pager moves forward through 
>> time, starting with the oldest instances and when I query pipeline 2 the 
>> pager moves backwards through time, starting with the most recent 
>> instances. The only difference in the API calls I am making are the the 
>> names of the pipelines and stages I am querying.
>>
>> For comparison, when calling the Pipeline History API for these same 2 
>> pipelines, both return the most recent instances, moving backwards if an 
>> offset is provided.
>>
>> My expectation was that the Stage History API would always behave the way 
>> the Pipeline History API does but if this is not necessarily the case then 
>> I will need to redo the logic around my scripts that are using it.
>>
>> Is this API expected to be inconsistent like this? If not, does anyone 
>> have any suggestions on what troubleshooting steps I might take to be able 
>> to figure out what's going on?
>>
>> Thank you for your time,
>> Jason
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "go-cd" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to