New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 879256 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 879242



Sign in to add a comment

[Findit] Get step logs using buildbucket v2 API

Project Member Reported by chanli@chromium.org, Aug 30

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
 
Cc: no...@chromium.org
we already have the step names from Milo build metadata?
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, 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

Sign in to add a comment