diff options
author | Christopher Baines <mail@cbaines.net> | 2019-12-26 23:22:54 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-12-26 23:22:54 +0000 |
commit | 0e3c28ffbd3df31d805bc7f16acc76a8f6201d0e (patch) | |
tree | 7452c5501f21faf9f42f62ae6a7e7984240c1551 | |
parent | 5163398e5454601208214c52207d93b49117b0ed (diff) | |
download | data-service-0e3c28ffbd3df31d805bc7f16acc76a8f6201d0e.tar data-service-0e3c28ffbd3df31d805bc7f16acc76a8f6201d0e.tar.gz |
Fix more cases where equivalent builds were missed
-rw-r--r-- | guix-data-service/model/build.scm | 7 | ||||
-rw-r--r-- | guix-data-service/model/derivation.scm | 11 |
2 files changed, 14 insertions, 4 deletions
diff --git a/guix-data-service/model/build.scm b/guix-data-service/model/build.scm index 728c70c..c81fda8 100644 --- a/guix-data-service/model/build.scm +++ b/guix-data-service/model/build.scm @@ -279,9 +279,12 @@ WITH RECURSIVE all_derivations(id, file_name) AS ( ) SELECT all_derivations.file_name, latest_build_status.status FROM all_derivations +INNER JOIN derivations_by_output_details_set + ON all_derivations.id = derivations_by_output_details_set.derivation_id LEFT OUTER JOIN builds - ON all_derivations.file_name = builds.derivation_file_name AND - builds.build_server_id = $2 + ON derivations_by_output_details_set.derivation_output_details_set_id = + builds.derivation_output_details_set_id + AND builds.build_server_id = $2 LEFT OUTER JOIN ( SELECT DISTINCT ON (build_id) * FROM build_status diff --git a/guix-data-service/model/derivation.scm b/guix-data-service/model/derivation.scm index 38947ba..ca21525 100644 --- a/guix-data-service/model/derivation.scm +++ b/guix-data-service/model/derivation.scm @@ -119,7 +119,11 @@ INNER JOIN guix_revision_package_derivations ON package_derivations.id = guix_revision_package_derivations.package_derivation_id INNER JOIN guix_revisions ON guix_revision_package_derivations.revision_id = guix_revisions.id -LEFT OUTER JOIN builds ON derivations.file_name = builds.derivation_file_name +INNER JOIN derivations_by_output_details_set + ON derivations.id = derivations_by_output_details_set.derivation_id +LEFT OUTER JOIN builds + ON derivations_by_output_details_set.derivation_output_details_set_id = + builds.derivation_output_details_set_id LEFT OUTER JOIN ( SELECT DISTINCT ON (build_id) * FROM build_status @@ -1115,8 +1119,11 @@ SELECT FROM derivations INNER JOIN package_derivations ON derivations.id = package_derivations.derivation_id +INNER JOIN derivations_by_output_details_set + ON derivations.id = derivations_by_output_details_set.derivation_id LEFT OUTER JOIN builds - ON derivations.file_name = builds.derivation_file_name + ON derivations.derivation_output_details_set_id = + builds.derivation_output_details_set_id LEFT OUTER JOIN ( SELECT DISTINCT ON (build_id) * FROM build_status |