Remove SHA-1 hash from BuildProducts

[?]
Jul 27, 2020, 4:24 PM
HPXFXHFSOC4CR5CQYY67EY57DUPMQA2JAR4MLIL5YN64W4PFQQZQC

Dependencies

  • [2] RO5E66ZC make filesize field for buildproducts a bigint to support big files
  • [3] D3TQWCLV Stupid capitalization scheme
  • [4] RHMUFX4R product list: convert to a proper table
  • [5] GRMV5GEW Adds documentation for the external API (#441)
  • [6] 6ZXL5UOP Add a plugin to execute arbitrary commands when a build finishes
  • [7] IGR322YP sql: Generate models from postgresql
  • [8] DKR2GXSA Update libpqxx usage to move away from deprecated API interactions.
  • [9] LX326CB7 Add hydra OpenAPI description (#750)
  • [10] WYN733ST * Store build duration, handle cached builds.
  • [11] D3DIBMOK * For products that are directories (like manuals), allow a default
  • [12] BAFICF73 Support hydra-build-products on binary cache stores
  • [13] OAGCZHK6 Allow for precisely one instance of RunCommand plugin
  • [14] S5PV6IIM * Represent jobs explicitly in the DB.
  • [15] FHF6IZJQ * Basic release management: releases are now dynamically computed as
  • [16] RUTFLXFQ Drop unused BuildProducts.description column
  • [17] Y6AHH4TH Remove the logfile and logSize columns from the database
  • [18] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [19] TQKGQ5R3
  • [20] ZEHSSVFG
  • [21] RU7AQO7U * Role-based access control. Only admins can create projects. Only
  • [22] MOX7XJ2E Merge the BuildSchedulingInfo table into the Builds table
  • [23] T5BIOVJE Add support for tracking custom metrics
  • [24] N74SRHS6 Remove the "releases" feature
  • [25] CLJQCY2X * Store info about all the build actions and allow them to be
  • [26] L2E6EVE2 * Merged the Build and Job tables.
  • [27] KOTB7BKV
  • [28] R5D7DZPE
  • [29] LCKWLQW3 * In Sqlite "release" is now a keyword, so use "release_" instead.
  • [30] WDGARQ76 Reuse build products / metrics stored in the database
  • [31] ECBA3GQO * Make the schema class names match the case of the SQL table names.
  • [32] 37R34XJO * Negative caching: don't perform a build if a dependency already
  • [33] TLZ2SPBR
  • [34] SHBLLAVH * More global substitution.
  • [35] H7CNGK4O * Log evaluation errors etc. in the DB.
  • [36] VJHIHMEH * Store the meta.longDescription and meta.license attributes in the
  • [37] JM3DPYOM generated schema with new dbix class schema loader, grrrrrr
  • [38] SB2V735V Keep track of the database schema version
  • [39] M552HLIA * Support variant builds.
  • [40] 6BLUKEQ2 * Caching of "path" inputs, and fake a revision number for those.
  • [41] EYNG4EL4 * Regenerate the bindings from a clean sqlite database.
  • [42] 67P45PY4
  • [43] 3E6IP3R3 * Add the name of the jobset to ReleaseSetJobs, otherwise we can't
  • [44] TWVSALRL * Allow the maximum number of concurrent builds per platform to be
  • [45] P5X4P6VK * Renaming "release sets" to "views" (not finished yet). Having
  • [46] PW4TLMWS Sync with latest Nix
  • [47] 3ZCEPLNO
  • [48] B72GLND4
  • [49] 3HCBU2FA
  • [50] LZVO64YG Merge in the first bits of the API work
  • [51] GWCV3TQV * BuildInputs table: link to dependencies, include store paths.
  • [52] X27GNHDV * Basic job info in the database.
  • [53] GD2WBYPT RunCommand: Return metrics as a float
  • [54] AHTEIK7G * Added a maintainers field to the Builds table.
  • [55] V4RNHJNR * Add a link to each project's homepage. Suggested by karltk.
  • [56] 24BMQDZA Start of single-process hydra-queue-runner
  • [57] IK53RV4V
  • [58] RBNQKATL * Adding persistant releases. A release is a named set of builds.
  • [59] CMU3YKOU * Store the release name.
  • [60] XOPHD47Y Fix JSON output for builds
  • [61] KN3VYE5P * Cleaned up the foreign key constraints.
  • [62] S66BOMVU * Added authentication.
  • [63] BHZXGT2H * Channels: provide an index page that lists all the packages in the
  • [64] YAPITGB3 * Boolean inputs.
  • [65] J5UVLXOK * Start of a basic Catalyst web interface.
  • [66] 3ZAJ2ZRP Use popovers for the product list help/details
  • [67] BVOPAMLS
  • [68] DVNWJXWW * Generic declaration of build products.
  • [69] S6OISBQ3 * Mark the "current" builds in a jobset, i.e. those corresponding to
  • [70] UFR64PJ7 Hide contents links
  • [71] JTRG7RDQ add support for git as jobinput
  • [72] PHX2HIVG * Store info about the build inputs in the build record.
  • [73] ZVTSOVHN * Support Subversion checkouts.
  • [74] 4D4U5IPY * Allow jobsets to be disabled.
  • [75] LKEX7GZ4 Show buildinput and buildproduct information in the Builds API
  • [76] 7YBYT2LQ
  • [77] GNIEG2GC * Disambiguate jobs by jobset name. I.e. jobs with the same name in
  • [78] YTZOC7C5 * Editing of jobset inputs.
  • [*] MHVIT4JY Split hydra-queue-runner.cc more
  • [*] JFZNAYJX * Showing releases.
  • [*] N22GPKYT * Put info about logs / build products in the DB.
  • [*] D5QIOJGP * Move everything up one directory.

Change contents

  • edit in doc/manual/api.xml at line 314
    [5.6955][5.6955:6979]()
    "sha1hash": null,
  • edit in hydra-api.yaml at line 675
    [9.20492][9.20492:20603]()
    sha1hash:
    nullable: true
    description: sha1 hash of the file
    type: string
  • edit in hydra-api.yaml at line 862
    [9.26022][9.26022:26049]()
    sha1hash: null
  • edit in src/hydra-queue-runner/build-result.cc at line 81
    [10.1050][10.1050:1115]()
    product.sha1hash = hashString(htSHA1, contents);
  • replacement in src/hydra-queue-runner/build-result.hh at line 14
    [10.4510][10.4510:4546]()
    nix::Hash sha1hash, sha256hash;
    [10.4510]
    [10.4546]
    nix::Hash sha256hash;
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 417
    [8.5636][8.5636:5818]()
    ("insert into BuildProducts (build, productnr, type, subtype, fileSize, sha1hash, sha256hash, path, name, defaultPath) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)",
    [8.5636]
    [8.5818]
    ("insert into BuildProducts (build, productnr, type, subtype, fileSize, sha256hash, path, name, defaultPath) values ($1, $2, $3, $4, $5, $6, $7, $8, $9)",
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 423
    [8.6011][8.6011:6122]()
    product.isRegular ? std::make_optional(product.sha1hash.to_string(Base16, false)) : std::nullopt,
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 635
    [8.9578][8.9578:9727]()
    ("select type, subtype, fileSize, sha1hash, sha256hash, path, name, defaultPath from BuildProducts where build = $1 order by productnr",
    [8.9578]
    [8.9727]
    ("select type, subtype, fileSize, sha256hash, path, name, defaultPath from BuildProducts where build = $1 order by productnr",
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 649
    [10.1702][10.327:402]()
    product.sha1hash = Hash(row[3].as<std::string>(), htSHA1);
    [10.1702]
    [10.1782]
    product.sha256hash = Hash(row[3].as<std::string>(), htSHA256);
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 651
    [10.1817][10.403:482](),[10.482][10.1901:2145](),[10.1901][10.1901:2145]()
    product.sha256hash = Hash(row[4].as<std::string>(), htSHA256);
    if (!row[5].is_null())
    product.path = row[5].as<std::string>();
    product.name = row[6].as<std::string>();
    if (!row[7].is_null())
    product.defaultPath = row[7].as<std::string>();
    [10.1817]
    [10.2145]
    product.path = row[4].as<std::string>();
    product.name = row[5].as<std::string>();
    if (!row[6].is_null())
    product.defaultPath = row[6].as<std::string>();
  • edit in src/lib/Hydra/Plugin/RunCommand.pm at line 93
    [6.2645][6.2645:2697]()
    sha1hash => $product->sha1hash,
  • edit in src/lib/Hydra/Schema/BuildProducts.pm at line 62
    [10.2832][10.2010:2027](),[10.4026][10.2010:2027](),[10.2010][10.2010:2027](),[10.2041][10.2041:2059](),[10.2059][10.2833:2853]()
    is_nullable: 1
    =head2 sha1hash
    data_type: 'text'
  • edit in src/lib/Hydra/Schema/BuildProducts.pm at line 97
    [10.2897][10.502:516](),[10.3218][10.502:516](),[10.4074][10.502:516](),[10.502][10.502:516](),[10.516][10.3219:3264]()
    "sha1hash",
    { data_type => "text", is_nullable => 1 },
  • replacement in src/lib/Hydra/Schema/BuildProducts.pm at line 139
    [10.5065][7.1113:1255]()
    # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-06 12:22:36
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iI0gmKqQxiPBTy5QsM6tpQ
    [10.5065]
    [10.5065]
    # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-07-27 18:21:03
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:O4R8b/GukNaUmmAErb3Jlw
  • edit in src/lib/Hydra/Schema/BuildProducts.pm at line 148
    [3.20][10.249:269](),[10.249][10.249:269]()
    'sha1hash',
  • edit in src/root/product-list.tt at line 194
    [4.5619][4.5619:5703]()
    <tr><th>SHA-1 hash:</th><td><tt>[% product.sha1hash %]</tt></td></tr>
  • edit in src/sql/hydra.sql at line 333
    [2.26][10.4637:4661](),[10.4637][10.4637:4661]()
    sha1hash text,
  • file addition: upgrade-68.sql (----------)
    [83.3004]
    alter table BuildProducts drop column sha1hash;