Reuse build products / metrics stored in the database

Previously, if the queue monitor thread encounters a build that Hydra has previously built, it downloaded the output paths from the binary cache, just to determine the build products and metrics. This is very inefficient. In particular, when doing something like merging nixpkgs:staging into nixpkgs:master, the queue monitor thread will be locked up for a long time fetching files from S3, causing the build farm to be mostly idle.

Of course this is entirely unnecessary, since the build products/metrics are already in the Hydra database. So now we just look up a previous build with the same output path, and copy the products/metrics.

Created by  Eelco Dolstra  on April 13, 2016
WDGARQ76X6RLSFPJTW52BZYFKBC7DPSTABI7HHIKNYHBYXSUNTHQC
Change contents