[Findit] Get step logs using buildbucket v2 API |
||
Issue description
We can use buildbucket v2 API to get step logs more easily.
Basic Steps:
1. Get logdog info of a build: send a request to GetBuild API with data
{
'id': <build_id>,
'fields': 'infra.logdog'
}
2. Get the needed step's log stream:
send a request to GetBuild API with data
{
'id': <build_id>,
'fields': 'steps'
} then search for the step and get stream
3. Download the log
,
Aug 30
we already have the step names from Milo build metadata?
,
Sep 13
,
Nov 8
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/ea15ed4b6a50788cc1a19cc19016db0f4c5e1eeb commit ea15ed4b6a50788cc1a19cc19016db0f4c5e1eeb Author: Chan <chanli@chromium.org> Date: Thu Nov 08 00:01:22 2018 [Findit] Add function to get a log from its view_url. This is to simplify the way to get a Logdog log. Before we need to 1. get annotation for the build; 2. parse annotation to get stream of the step log and other info like host, project and prefix; 3. Download the step log from the constructed url using info from step 2. Now we can directly get view_url of the desired log from build_info using buildbucket v2 API and then download the log. Bug: 879256 Change-Id: I7016b9f0b314b55f472b3619e15a3d68846081ea Reviewed-on: https://chromium-review.googlesource.com/c/1319986 Commit-Queue: Chan Li <chanli@chromium.org> Reviewed-by: Roberto Carrillo <robertocn@chromium.org> Cr-Commit-Position: refs/heads/master@{#18853} [modify] https://crrev.com/ea15ed4b6a50788cc1a19cc19016db0f4c5e1eeb/appengine/findit/services/step_util.py [modify] https://crrev.com/ea15ed4b6a50788cc1a19cc19016db0f4c5e1eeb/appengine/findit/infra_api_clients/logdog_util.py [modify] https://crrev.com/ea15ed4b6a50788cc1a19cc19016db0f4c5e1eeb/appengine/findit/common/waterfall/buildbucket_client.py [modify] https://crrev.com/ea15ed4b6a50788cc1a19cc19016db0f4c5e1eeb/appengine/findit/services/test/step_util_test.py [modify] https://crrev.com/ea15ed4b6a50788cc1a19cc19016db0f4c5e1eeb/appengine/findit/infra_api_clients/test/logdog_util_test.py
,
Nov 8
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/ab884a12534fe2e37f1cee2a1e5303cbf58b3618 commit ab884a12534fe2e37f1cee2a1e5303cbf58b3618 Author: Chan <chanli@chromium.org> Date: Thu Nov 08 00:55:38 2018 [Findit] Get step_logs using buildbucket v2 API by default. For LUCI builds, get step_logs using buildbucket v2 API by default. Bug: 879256 Change-Id: I5aa5f8c591567739778057b0bfd4b3100deb02bf Reviewed-on: https://chromium-review.googlesource.com/c/1319987 Commit-Queue: Chan Li <chanli@chromium.org> Reviewed-by: Roberto Carrillo <robertocn@chromium.org> Cr-Commit-Position: refs/heads/master@{#18857} [modify] https://crrev.com/ab884a12534fe2e37f1cee2a1e5303cbf58b3618/appengine/findit/services/step_util.py [modify] https://crrev.com/ab884a12534fe2e37f1cee2a1e5303cbf58b3618/appengine/findit/waterfall/build_util.py [modify] https://crrev.com/ab884a12534fe2e37f1cee2a1e5303cbf58b3618/appengine/findit/model/base_build_model.py [modify] https://crrev.com/ab884a12534fe2e37f1cee2a1e5303cbf58b3618/appengine/findit/services/test/step_util_test.py [modify] https://crrev.com/ab884a12534fe2e37f1cee2a1e5303cbf58b3618/appengine/findit/waterfall/test/build_util_test.py |
||
►
Sign in to add a comment |
||
Comment 1 by chanli@chromium.org
, Aug 30