Commit graph

82 commits

Author SHA1 Message Date
4461a91f87 Update to caqti>=2.1.1
The tuple type constructors are renamed from tupN to tN. Also, except
for migrations, use the wider tuple types (up to 12 since caqti.2.1.0).
2024-08-13 13:16:31 +02:00
cc6b084d7a Check version in visualizations.sh
If builder-web is upgraded and not restarted the visualizations script
will assume the new database schema while the still-running builder-web
binary will be using the old schema (until restarted).
2024-03-25 16:46:52 +01:00
878acf002f Implement builder-db vacuum except-latest-successful
And some minor things.
2024-02-13 14:07:16 +01:00
d4da5a199f Implement builder-db vacuum {older-than,latest-n}
- `builder-db vacuum older-than [--job JOBNAME] RFC3339` removes all
  builds in `JOBNAME` (defaults to all jobs) that were built before
  `RFC3339`.
- `builder-db vacuum except-latest [--job JOBNAME] LATEST-N` removes all
  builds in `JOBNNAME` (defaults to all jobs) except for the latest
  `LATEST-N` builds (successful or not).
2024-02-12 15:09:08 +01:00
46df7f92a7 Aggregate all builds (even failed builds) 2024-02-12 12:19:52 +01:00
Robur
082f2582dd Add a comment on LIMIT -1 OFFSET n 2024-02-12 12:19:52 +01:00
Robur
6594c6b912 Rename get_builds_and_exclude_the_first 2024-02-12 12:19:52 +01:00
Robur
73e1bf81ce Fix comparison: less than or equal, not strict equal 2024-02-12 12:19:52 +01:00
53f1c4958c Use our own ptime serializer 2024-02-12 12:19:52 +01:00
fb49d8eae2 Add two SQL requests to collect older builds according to a parameter 2024-02-12 12:19:52 +01:00
Robur
5d4d84f705 builder-db: update current database version 2024-01-09 16:28:03 +00:00
5ec5cb66df Update tests and fix bug discovered 2024-01-09 13:32:13 +00:00
a56bd28e64 Add missing right paren 2024-01-09 13:32:13 +00:00
f636280f10 WIP content addressing 2024-01-09 13:32:08 +00:00
e262ae9d90 Rewrite query to not use LEFT JOIN
Since we now consider only builds with main binaries successfull we can
rewrite get_latest_successful_with_binary to not use a LEFT JOIN.
2023-11-22 13:43:09 +01:00
6c4f36bfba fix get_latest_successful_with_binary to only return builds with main_binary
so-called successful builds. in a756f2c..3b98605f there were regressions
(missing this condition in get_latest_succesful_with_binary,
get_next_successful_different_output, get_previous_successful_different_output).
2023-11-22 12:28:19 +01:00
3fe8bcb997 Add migration for modified index 2023-09-11 12:31:11 +02:00
3b98605fb7 redefine successful vs not successful build:
a successful build is when the main_binary is NOT NULL, an unsuccessful is when
main_binary is NULL
2023-09-11 11:28:38 +02:00
b27570ef11 Builder_db: get_all_failed, get_failed_builds: reconsider failed builds
As remarked by @reynir, consider builds with no main_binary as failed.
2023-09-11 11:28:38 +02:00
8a70e76032 regard a successful build only these with a main_artifact present 2023-09-11 11:28:38 +02:00
e6ac6834e7 on the front page, order the builds by platform name 2022-07-27 09:45:01 +02:00
397eb29d81 Update database version 2022-05-17 12:24:24 +02:00
6e75a653bc Update to caqti 1.8.0 2022-04-22 12:20:43 +01:00
rand00
5897484cb2 Fixed that Builder_db_app.job_remove didn't take all related tables into account
+ Added a function for making a db-id into an int64 for printing
2022-02-22 13:16:42 +01:00
68237ef382 Rewrite queries to take optional platform
A number of queries were the same except one would take another string
argument and add `AND platform = $N` in its WHERE clause. This commit
merges them and does `AND ($N IS NULL OR platform = $N)` and the client
code in Model doesn't have to check the string option.
2021-11-18 11:56:17 +01:00
e57d880c44 sql: use $N instead of ?N as numbered placeholder 2021-11-18 11:40:15 +01:00
Robur
088b55acc3 remove failed builds from job page
add a job page with failed builds, link to it
2021-11-17 16:39:49 +00:00
Robur
2e82778e87 Only show successful builds on the front page
Failed builds can be viewed on the linked /failed-builds/ page.
2021-11-17 16:00:58 +00:00
Robur
e1d950ad5b link to failed-builds, paginate failed-builds 2021-11-17 15:54:13 +00:00
Robur
0910a05bbd builds: improve comparisons (text and query) to earlier and later builds
only take into consideration the builds that have a different output
2021-11-17 15:28:15 +00:00
Robur
c6128ca24b /failed-builds/: fix query and improve page 2021-11-17 14:33:05 +00:00
Robur
8ee69d7211 Work around caqti assertion failure 2021-11-17 14:06:18 +00:00
Robur
c566cd0215 Work towards failed-builds page 2021-11-17 14:02:04 +00:00
Robur
16748b8995 Show builds by platform 2021-11-08 15:03:19 +00:00
Robur
594c6d5917 remove unused queries 2021-11-05 12:49:16 +00:00
Robur
e69d1beb9f Add platform to build table 2021-11-05 10:45:26 +00:00
a249eb0572 Fix broken query remove_all_by_username 2021-10-26 13:22:31 +02:00
Robur
edcbf73386 Add /job/<job>/build/<build>/main-binary redirect endpoint
Fixes #52
2021-09-08 09:10:30 +00:00
Robur
16c403b6b5 Fix query column ambiguity 2021-09-07 09:35:26 +00:00
Robur
17420c389b WIP 2021-09-07 09:35:26 +00:00
Robur
9195c91ab5 remove result_kind from build table (de-duplicate information), add some indexes 2021-07-12 13:31:36 +00:00
Robur
aa4db9b6a8 in /job/:job/build/:build output links to:
- builds that reproduced the binary with the same inputs
- builds that reproduced the binary with different inputs (only one for each input_id)
- builds with same input that produced a different output

/job/:job group by hash
2021-07-12 13:31:35 +00:00
Robur
6ec40365ab Add input_id to build table
The input_id column is a checksum of the files relevant for reproducibility.
2021-07-06 13:54:25 +00:00
Robur
be26e56fd4 Output links to comparisons of other builds with the identical main binary
in /job/:job/build/:build
2021-07-06 10:23:29 +00:00
7c7282894b Typed database IDs (#47)
Typed database IDs

Reviewed-on: https://git.robur.io/robur/builder-web/pulls/47
Co-Authored-By: Reynir Björnsson <reynir@reynir.dk>
Co-Committed-By: Reynir Björnsson <reynir@reynir.dk>
2021-07-05 12:45:08 +00:00
21065c9f44 Use initially deferred foreign key constraint
On build.main_binary.
2021-07-01 11:02:41 +02:00
Robur
009fa49e9e render README from latest build (preserved as a tag value in job_tag table) 2021-06-30 12:47:30 +00:00
Robur
b4996939af Job_tag: try to retrieve the tag value - insert if none, update if some 2021-06-30 11:09:01 +00:00
Robur
1e190e42c7 Builder_db.Job_tag: provide next to add also an update
Model: if Job_tag.add fails, use Job_tag.update
2021-06-30 10:40:52 +00:00
Robur
eb786088e7 Builder_db.Job_tag.add: use INSERT OR REPLACE to avoid constraint violation 2021-06-30 09:56:47 +00:00