Page MenuHomePhabricator

[builds-api] Create GET /build endpoint to retrieve all the builds
Closed, ResolvedPublic

Description

We want an endpoint to get the list of builds for a user.

This endpoint (that should be fully GET /v1/build on the API, and GET /builds/v1/build on the API-Gateway) will return the list of builds that a user has.

The current information we show on the client is:

tools.wm-lol@tools-sgebastion-10:~$ toolforge build list
run_image                            status    start_time            end_time              source_url                                      ref           repo_url                              image_name    image_tag    builder_image
wm-lol-buildpacks-pipelinerun-zlv84  ok        2023-06-22T09:56:58Z  2023-06-22T09:58:11Z  https://github.com/david-caro/wm-lol                          tools-harbor.wmcloud.org/tool-wm-lol  tool-wm-lol   latest       tools-harbor.wmcloud.org/toolforge/heroku-builder-classic:22
wm-lol-buildpacks-pipelinerun-98ngd  ok        2023-06-22T09:32:09Z  2023-06-22T09:33:14Z  https://github.com/david-caro/wm-lol                          tools-harbor.wmcloud.org/tool-wm-lol  wm-lol        latest       tools-harbor.wmcloud.org/toolforge/heroku-builder-classic:22
wm-lol-buildpacks-pipelinerun-46mjc  ok        2023-06-21T08:03:23Z  2023-06-21T08:04:27Z  https://github.com/david-caro/wm-lol                          tools-harbor.wmcloud.org/tool-wm-lol  wm-lol        latest       tools-harbor.wmcloud.org/toolforge/heroku-builder-classic:22
wm-lol-buildpacks-pipelinerun-7t4rc  ok        2023-06-20T11:56:35Z  2023-06-20T11:57:47Z  https://github.com/david-caro/wm-lol            test_aptfile  tools-harbor.wmcloud.org/tool-wm-lol  wm-lol        latest       tools-harbor.wmcloud.org/toolforge/heroku-builder-classic:22
wm-lol-buildpacks-pipelinerun-fkptr  ok        2023-06-20T11:54:06Z  2023-06-20T11:55:32Z  https://github.com/david-caro/wm-lol                          tools-harbor.wmcloud.org/tool-wm-lol  wm-lol        latest       tools-harbor.wmcloud.org/toolforge/heroku-builder-classic:22
wm-lol-buildpacks-pipelinerun-h8fvn  error     2023-04-11T14:51:58Z  2023-04-11T14:52:19Z  https://github.com/david-caro/wm-lolidontexist  no ref        tools-harbor.wmcloud.org/wm-lol       wm-lol        latest       tools-harbor.wmcloud.org/toolforge/heroku-builder-classic:22

So we'd want something similar (we can trim down some things, and join others, for example return the expected image url instead of the parts).
Note that only source_url and ref are parameters for the POST /build endpoint, so the others are not user-provided anymore.

Details

ReferenceSource BranchDest BranchAuthorTitle
repos/cloud/toolforge/toolforge-deploy!73bump_builds_apimaindcarobuilds-api: bump to 0.0.85-20230817105952-25c2b55f
repos/cloud/toolforge/builds-api!28add_get_builds_endpointmainraymond-ndibebuilds-api: Create GET /build endpoint
Customize query in GitLab

Event Timeline

Raymond_Ndibe changed the task status from Open to In Progress.Jun 27 2023, 4:14 AM
Raymond_Ndibe changed the task status from In Progress to Stalled.Jul 20 2023, 5:31 PM
dcaro changed the task status from Stalled to In Progress.Aug 8 2023, 12:51 PM