Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.

Order of PRs when set every to true #27

Closed
halimacc opened this issue Aug 8, 2016 · 7 comments
Closed

Order of PRs when set every to true #27

halimacc opened this issue Aug 8, 2016 · 7 comments
Labels

Comments

@halimacc
Copy link

halimacc commented Aug 8, 2016

Hi, when set every: true in source, the PRs returned by check should be ordered from latest to oldest. Because when set version: every at get, it starts from the version after the most recently used and move forward. In current order(oldest to latest), new PRs can never be iterated to.

@jtarchie
Copy link
Owner

jtarchie commented Aug 9, 2016

Order doesn't matter to Concourse. Given a list it just iterates through them one at a time with version: every.

I don't quite understand new PRs can never be iterated. Can you give an example to help recreate the issue you are seeing?

@halimacc
Copy link
Author

halimacc commented Aug 9, 2016

Sorry but it seems the mechanism of version: every for get is not just iterating every version through, it is as described in this issue.

My problem here is while testing example pipeline of this repo with version: every and every: true, when the resource changed, from [pr1] to [pr1, pr2, pr3] (by adding 2 new prs), no new builds will be triggered.

And I tested similar case with concourse git resource, when the resource changed from [commit1] to [commit3, commit2, commit1] (by adding 2 new commits),
with version: every, 2 new builds will be triggered in order commit2, commit3;
with version: latest, 1 new builds will be triggered for commit3.

@jtarchie jtarchie added the bug label Aug 10, 2016
@jtarchie
Copy link
Owner

I see. Alright, I'll get a fix out for this soon.

@jtarchie
Copy link
Owner

jtarchie commented Sep 9, 2016

I don't think just putting them in reverse order will solve this problem. The github api is returning the PRs in descending updated order, so it should already be doing the proposed newest to oldest.

I think we are experiencing a different issue.

@vito
Copy link

vito commented Sep 9, 2016

Concourse expects chronological order, so the most-recently-updated version should be last. Not sure if that's what GitHub's API does - I'd think it'd be the opposite.

@jtarchie
Copy link
Owner

Alright, let's see if aa6b97c resolves this.

@jtarchie
Copy link
Owner

Please reopen this issue if you have problems with it passed v15.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants