Commit graph

50 commits

Author SHA1 Message Date
5c9ec28cb5 Query for outputs when build events arrive
This will keep the substitute information more up to date.
2023-06-09 16:11:06 +01:00
3734a85650 Use the package_derivations system id in a query
Rather than the derivations system id, as this helps PostgreSQL run the query
faster.
2023-05-04 08:32:43 +01:00
788571f53f Set builds derivation output details set id if information available
The build event information can now contain the derivation outputs, as well as
the name of the derivation. This allows the Guix Data Service to join builds
up with derivations, even if it doesn't know about the derivation being built.
2022-07-08 13:48:08 +01:00
9607bcedfe Move the builds.derivation_output_details_set_id update
To the end of the main revision processing transaction.

Currently, I think there are issues when this query does update some builds,
as those rows in the build table remain locked until the end of the
transaction. This then causes build event submission to hang. Moving this part
of the revision loading process to the end of the transaction should help to
mitigate this.
2022-04-16 18:47:54 +01:00
8a48960fa7 Use derivations.system_id in select-builds-with-context
As that table is always included in the query.
2021-06-09 10:35:29 +01:00
2a4b16f5e4 Fix incorrect query parameters in a couple of builds queries
The parameters must be strings rather than numbers.
2021-05-12 08:28:06 +01:00
b430c632b7 Create a table for systems
And use it for the systems in the derivations and package derivations tables.

The primary motivation here is to allow quickly working out what systems the
database contains, and having a small table with just the right data seems a
good way to do that.
2021-04-23 11:14:51 +01:00
f2d98b626d Support more query parameters on the /builds page 2021-02-08 21:31:39 +00:00
1fd5c8e379 Tweak the select-required-builds-that-failed query
I think this makes a little more sense.
2020-12-26 10:00:35 +00:00
89a3843fa5 Fix status in select-builds-with-context-by-derivation-file-name
The latest_build_status table should be used, not build_status.
2020-12-21 17:38:18 +00:00
3e15900c56 Fix build links on the derivation page
In the case where the build is for a different derivation with the same
outputs.
2020-11-20 21:01:09 +00:00
fa6e4ac842 Use the status for ordering, as well as timestamp
As this will handle cases where the timestamps from Cuirass don't make sense,
like a build being canceled with a timestamp of 0 (1970).
2020-10-21 19:47:11 +01:00
efb26a616d Add a view build link on the build page 2020-10-21 19:26:18 +01:00
e273e22042 Switch queries across to use latest_build_status 2020-10-13 19:35:40 +01:00
af40c1ac13 Speed up a query for derivation builds
This change removes a sequential scan from the query plan, making it much
faster.
2020-10-02 17:51:55 +01:00
a1af644310 Change select-required-builds-that-failed to exclude succeeded builds
Only include a failed build if that build server hasn't had any success
building that output. The Guix Build Coordinator can build one output with
many different builds, so this helps avoid showing lots of spurious failures.
2020-07-13 18:55:50 +01:00
e9d4e74e56 Add builds to the store item page 2020-07-04 09:31:12 +01:00
69d3c83986 Improve select-builds-with-context
Support specifying the limit, and improve the ordering.
2020-07-03 20:32:45 +01:00
dc8b442e12 Improve the linking to build servers
Add a build-url function that returns the URL to use, and use this where
appropriate.
2020-07-01 19:51:21 +01:00
1e2fefa7cf Change select-build procedures to avoid join issues
The number of build_status rows coming back was being amplified by the INNER
JOIN, using a subquery guards against this.
2020-07-01 19:42:42 +01:00
9192550331 Implement more support for builds from the Guix Build Coordinator
Builds from the Guix Build Coordinator might not have timestamps, and the id
from the build server is more important, as one build server can build the
same derivation many times.
2020-07-01 09:35:29 +01:00
b19227c086 Order build statuses by id, not timestamp
Some builds from Cuirass change status at the same timestamp, so use the id
for ordering instead.
2020-03-01 15:57:35 +00:00
c355c42584 Enhance ensure-build-exists
Support calling it with derivation-output-details-set-id, which can be used
when querying for builds.
2020-02-15 21:28:09 +00:00
7326e8b3bb Remove the restriction on cross build derivation querying
As some build servers do build cross derivations.
2020-02-11 22:48:12 +00:00
bd52629674 Fix insert-build when derivation_output_details_set_id is NULL
I can't figure out how to insert NULL through a param, so just construct a
query to insert the values directly.
2020-01-16 20:37:02 +00:00
54baf32be6 Fix select-build-id-by-build-server-and-derivation-file-name
The id will be wrapped in a list.
2020-01-16 20:34:44 +00:00
0e3c28ffbd Fix more cases where equivalent builds were missed 2019-12-26 23:22:54 +00:00
0cea51cc79 Add copyright and license headers to a bunch of source files
That were missing them.
2019-12-26 10:16:55 +00:00
e359cfea2b Fix the derivations list on the builds page 2019-12-23 22:36:53 +00:00
5c643e09e5 Fix the unknown build counts on the builds pages 2019-12-23 21:30:36 +00:00
14b7993636 Allow filtering the revision builds page by system 2019-12-22 14:27:59 +00:00
e4a7f221c9 Filter builds on the revision builds page by revision 2019-12-22 14:27:49 +00:00
89e34f3df8 Ignore cross built derivations for the build stats 2019-12-22 14:27:49 +00:00
5b54259974 Fix matching equivalent derivations in another function 2019-12-16 20:11:57 +00:00
5337b171ea Add a function to find the builds required for a build that failed 2019-12-16 15:19:02 +00:00
771b01ef80 Link to the build pages from the derivation page 2019-12-16 15:19:02 +00:00
308d1d7102 Add a page for each build 2019-12-16 15:18:14 +00:00
a59f352046 Split out select-build-by-build-server-and-derivation-file-name
Create select-build-id-by-build-server-and-derivation-file-name, which just
returns the id, and then a variant that returns more fields for making a page
for each build.
2019-12-15 10:32:40 +00:00
b693d3e57d Improve select-builds-with-context-by-derivation-file-name
To find builds for equivalent derivations.
2019-12-15 08:51:31 +00:00
a84fc954d1 Extend select-build-stats to allow filtering by revision 2019-12-14 20:59:54 +00:00
633e757fe8 Break down the build stats by build server 2019-12-14 20:17:53 +00:00
156b7eea7e Improve the select-build-stats function
Account for equivalent derivations, rather than counting them as unknown.
2019-12-12 20:07:22 +00:00
c8b93cb0d0 Add new derivation_output_details_set_id column to the builds table
As this will hopefully provide a faster way of associating derivations with
builds.
2019-12-12 20:07:22 +00:00
1e040010fc Fix the match statement in select-build-by-build-server-and… 2019-12-12 20:07:22 +00:00
a0ce016c02 Support querying builds by build servers 2019-12-12 20:07:22 +00:00
f7069456b5 Support querying builds by status 2019-12-12 20:01:30 +00:00
5663235048 Rework the builds and build_status tables as well as related code
Allow for build status information to be submitted by POST request. This
required some changes to the builds and build_status tables, as for example,
the Cuirass build id may not be available, and the derivation may not be know
yet, so just record the derivation file name.
2019-11-24 20:18:08 +00:00
7b3bc5bcfa Improve some derivation model functions
Return integer values for ids, rather than strings (as this type is more
appropriate). Also, better parse the derivation arguments and environment
variables.
2019-11-09 20:39:47 +00:00
a1e481cc4d
Continue improving pages and linking things together 2019-03-07 23:50:51 +00:00
4d0d6f2e82
Add new models relating to builds and build servers
These will allow tracking what's going on with build servers.
2019-03-06 22:56:10 +00:00