Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/hydra
base: 1be7de15a8be
Choose a base ref
...
head repository: NixOS/hydra
compare: 2b4658b6eaee
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Jun 5, 2019

  1. Allow to search builds by hash

    Currently, a full store path has to be provided to search in
    builds. This patch permits to search jobs with a output path or
    derivation hash.
    
    Usecase: we are building Docker images with Hydra. The tag of the
    Docker image is the hash of the image output path. This patch would
    allow us to find back the build job from the tag of a running
    container image.
    nlewo committed Jun 5, 2019
    Copy the full SHA
    778fc03 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2019

  1. Create a pg_trgm index on builds.drvpath

    The search query uses the LIKE operator which requires a sequential
    scan (it can't use the already existing B-tree index). This new
    index (trigram) avoids a sequential scan of the builds table when the
    LIKE operator is used.
    
    Here is the analyze of a request on the builds table with this index:
    
         explain analyze select * from builds where drvpath like '%k3r71gz0gv16ld8rhcp2bb8gb5w1xc4b%';
                                                                     QUERY PLAN
         -----------------------------------------------------------------------------------------------------------------------------------
          Bitmap Heap Scan on builds  (cost=128.00..132.01 rows=1 width=492) (actual time=0.070..0.077 rows=1 loops=1)
            Recheck Cond: (drvpath ~~ '%k3r71gz0gv16ld8rhcp2bb8gb5w1xc4b%'::text)
            ->  Bitmap Index Scan on indextrgmbuildsondrvpath  (cost=0.00..128.00 rows=1 width=0) (actual time=0.047..0.047 rows=3 loops=1)
                  Index Cond: (drvpath ~~ '%k3r71gz0gv16ld8rhcp2bb8gb5w1xc4b%'::text)
          Total runtime: 0.206 ms
         (5 rows)
    nlewo committed Jun 6, 2019
    Copy the full SHA
    7935cff View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2019

  1. Merge pull request #654 from nlewo/lewo-search-by-hash

    Allow to search builds by hash
    edolstra committed Jun 13, 2019
    Copy the full SHA
    2b4658b View commit details
    Browse the repository at this point in the history