Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle cases where build list in a buildBlock is incomplete #327

Open
ekelen opened this issue Jun 4, 2020 · 5 comments
Open

Handle cases where build list in a buildBlock is incomplete #327

ekelen opened this issue Jun 4, 2020 · 5 comments
Assignees

Comments

@ekelen
Copy link
Collaborator

ekelen commented Jun 4, 2020

Assumes are sorted by build.created_at. If limit=1 is passed as a query param and the first build has a merge request that is associated with 20 builds, API will still only return that first build.

Best solution is probably just to make a second API call with merge request ID as a parameter for the last (oldest) unique MR ID in the initial build list response.

@ekelen ekelen self-assigned this Jun 4, 2020
@ekelen
Copy link
Collaborator Author

ekelen commented Jul 12, 2020

Not forgotten. Note to self, I will need some kind of flag to indicate second request has been made but I would rather not further pollute global state.

@moul
Copy link
Member

moul commented Oct 1, 2020

Is this issue still relevant, or can we close it?

@ekelen
Copy link
Collaborator Author

ekelen commented Oct 2, 2020

Depends if you think it's a bad experience (I do) to ask for buildlist with "limit=10" and if you get two blocks (two merge requests) in your result, with one block potentially containing incomplete list of builds.

Is there a (planned) route to get a mergerequest list? This would make this less messy to handle, but can still be done on the front.

@moul
Copy link
Member

moul commented Oct 2, 2020

do you need just the list of mergerequests or do you need the builds and artifacts, but grouped by mergerequests?

@ekelen
Copy link
Collaborator Author

ekelen commented Oct 5, 2020

Given the way we use it now, the easiest to implement on front is probably build list grouped by merge request (plus the idea of a "build list" is central, after all).

If possible, an extra field in server response with 'n_builds' for the MR would be helpful, so the front can tell user if the MR block has more builds than requested.

  • /build-list?grouped_by=mergerequest&limit=25 --> if builds[25th] is the first of 3 builds for that MR, front needs to hear that from server somehow.

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

No branches or pull requests

2 participants