commit | 22886bd1b229d02e28330e43b495bbeb86592ac4 | [log] [tgz] |
---|---|---|
author | Anthony Fandrianto <atyfto@google.com> | Mon Jun 22 17:42:25 2020 +0000 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Mon Jun 22 17:42:25 2020 +0000 |
tree | ce63514ce611da2a3b8385571ddfe1e989420217 | |
parent | c17ffddf23280693c932c2c535bca4baff5cfb84 [diff] |
[lkg] Add tool to compute last-known-good build/revision This tool is a skeleton which is intended to consolidate all "last-known-good" retrieval. This change currently implements "build" and "revision". We probably don't need snapshot anymore after "revision" is integrated with recipes. The algorithm to find the LKGR for n builders is: 1) For 1:n builders' latest SUCCESS builds, create a set of revisions which are common to all those builders. 2) Iterate through 0th builder's latest SUCCESS builds and return the first revision which is in the set. We only use one (batched) buildbucket query, so this is more efficient than the current LKGS implementation. (Overall ~10x faster than the current application of LKGS). Also, a single buildbucket query makes this code much easier to mock and unit test, which is partially why I decided a rewrite would be a better use of time than to retrofit LKGS and LKGB with unit tests. Bug: 53486 Change-Id: Ic5e5f9069a837ef58176be00f8d9449e08f0aaca Reviewed-on: https://fuchsia-review.googlesource.com/c/infra/infra/+/398653 Commit-Queue: Anthony Fandrianto <atyfto@google.com> Reviewed-by: Nathan Mulcahey <nmulcahey@google.com>
This repo contains tools and config files necessary to run infrastructure related to builds, code review, version control, and continuous integrations.
In order to build the Go code, you must clone this repo into an appropriately named directory. This should do the trick:
REPO=fuchsia.googlesource.com/infra/infra git clone https://${REPO} $(go env GOPATH)/src/${REPO}