aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/datastore.scm
Commit message (Collapse)AuthorAge
* Expose the derived priorities for buildsChristopher Baines2024-01-30
|
* Switch to a more rigorous method for finding potential source refsChristopher Baines2023-08-10
|
* Change listing builds to work as a streamChristopher Baines2023-05-19
| | | | | | | | | | Both in terms of getting the data from the database, and sending it to the client. This avoids the use of the after-id and ordering by id when listing builds, which makes listing builds faster. It does mean that the database reads may last for a while (which can be a problem), but maybe that can be addressed in other ways.
* Don't log as much about "expected" exceptions in worker threadsChristopher Baines2023-05-02
|
* Remove datastore-select-allocated-buildsChristopher Baines2023-04-11
| | | | As it's a less well named copy of datastore-list-agent-builds.
* Include the last agent statuses in the overall statusChristopher Baines2023-03-22
|
* Implement and extend the agent status functionalityChristopher Baines2023-03-22
| | | | | | | Previously, updating the status was used by the agent just to get back the list of builds it was already allocated. Now the status sent is actually stored, along with the 1min load average.
* Tweak updating derived priorities when canceling buildsChristopher Baines2023-02-21
| | | | | Move the action in to the coordinator module, so that it happens outside of the main write transaction.
* Provide a mechanism to gracefully abort transactionsChristopher Baines2023-02-21
|
* Guard against canceling builds required by othersChristopher Baines2022-10-11
|
* Send more information on derivation outputs to the Guix Data ServiceChristopher Baines2022-07-07
| | | | | | This will enable it to join builds to derivations, even if it doesn't know about the derivation being built, since it'll be able to match the outputs with other derivations it knows about.
* Support updating the priorities of buildsChristopher Baines2022-07-07
|
* Support processing hook events in parallelChristopher Baines2022-06-30
| | | | | | | | | | Forcing hooks to be sequential simplifies them, and the implementation, but it doesn't always scale well. I'm particularly thinking about the build-submitted hook and built-success hooks, the processing of which can back up if there's lots of builds being submitted or finishing successfully. This new functionality allows hooks to be processed in parallel, which should allow to manage this more effectively.
* Guard against inserting unnecessary related buildsChristopher Baines2022-04-23
|
* More efficiently filter and select builds in the allocatorChristopher Baines2022-01-31
| | | | Specifically the derivation ordered allocator.
* Support activating and deactivating agentsChristopher Baines2021-11-13
| | | | | | | | | Not sure these are the best terms to use, but I want a way to pause agents, effectively removing them from the build allocation plan. This is mostly motivated by the lack of disk space on bayfront, as deactivating agents provides a way to stop the system from filling up with builds, but I think there's more general uses as well.
* Refactor how unprocessed builds are trackedChristopher Baines2021-11-07
| | | | | | | | | | | | Previously, the allocator worked out the derived priorities for each build. Unfortunately this is quite a complex query, and took lots of time. As a result of this, I think the WAL could grow excessively while this long query was running. To try and mitigate this, add a new table to keep track of the derived priorities for unprocessed builds. This requires some maintenance to keep up to date, which in turn will make things like submitting builds slower, but I think this might help keep transaction length and WAL size down overall.
* Make some SQLite related improvementsChristopher Baines2021-04-20
| | | | | Don't keep database connections around forever as this relates to cached query plans, and also run the optimize pragma when closing connections.
* Add a new dynamic authentication approachChristopher Baines2021-02-28
| | | | | | This avoids the need to create agents upfront, which could be useful when creating many childhurd VMs or using scheduling tools to dynamically run agents.
* Trigger build allocations when necessary for deferred buildsChristopher Baines2021-02-06
|
* Add tags for agentsChristopher Baines2021-01-17
| | | | | This will allow doing things like restricting builds by matching up there tags to the tags of the agents.
* Add datastore-list-unbuilt-derivation-outputsChristopher Baines2021-01-16
|
* Move the build result storing logic in to the coordinator moduleChristopher Baines2021-01-16
| | | | | And out of the datastore. This means that datastore code doesn't have too much logic in it.
* Move build allocation complexity out of the datastoreChristopher Baines2021-01-16
| | | | | And in to the coordinator module. This will make adding more datastore's easier.
* Change how some submit build options handle canceled buildsChristopher Baines2020-12-26
| | | | | | Don't include canceled builds in the build-for-derivation-exists? or build-for-output-already-exists? options. I think it makes sense to not include canceled builds in these options.
* Add datastore-list-buildsChristopher Baines2020-12-21
|
* Move cancel build logic in to the coordinatorChristopher Baines2020-12-16
|
* Move more logic around submitting builds in to the coordinatorChristopher Baines2020-12-16
| | | | | | | | | | Originally I was trying to keep the implementation details of the datastore in the datastore modules, but this approach starts to crack as you cope with more and more complicated transactions. This change should help resolve issues around getting the coordinator logic in to the coordinator module, and simplifying the SQLite datastore in preparation for adding PostgreSQL support.
* Implement build cancelationChristopher Baines2020-12-16
|
* Move some metrics out of base-datastore-metrics-updaterChristopher Baines2020-12-04
| | | | | | | Some parts of this were quite slow with anything other than a small database, so instead of doing slow queries on every request, do some slow queries to setup the metrics, and then change them as part of the regular changes to the database.
* Manually handle WAL checkpointingChristopher Baines2020-12-02
| | | | | SQLite's usual approach doesn't seem to always contain the size of the WAL, so move this logic in to the application and regularly run a checkpoint.
* Add metrics for the database and WAL sizeChristopher Baines2020-12-01
| | | | | I particularly want to monitor the WAL growth, as I don't think SQLite's usual approach to keeping the size down is sufficient.
* Add datastore-fetch-build-tagsChristopher Baines2020-11-24
|
* Rework how the derivation ordered allocator gets buildsChristopher Baines2020-11-06
| | | | | | Use a temporary table to avoid computing the priorities for all builds. This speeds up the allocation to only take a few seconds on the database I'm testing against.
* Don't assume the missing input to a build is a direct inputChristopher Baines2020-10-24
| | | | | | | | | | | | Substitutes could be available for all direct inputs, but be missing for things they reference. This could happen if those builds happened on a machine with the store items available for example. Therefore, search the entire graph for the relevant derivation when looking for the derivation to build to provide the missing input. This change matches up with the similar improvement around handling fetching substitutes.
* Add datastore-list-builds-for-output-and-systemChristopher Baines2020-07-04
|
* Add datastore-find-build-derivation-systemChristopher Baines2020-07-03
|
* Record what systems agents fetch builds forChristopher Baines2020-07-03
| | | | | This can then be used by allocators to avoid allocating builds to agents that they're never going to fetch.
* Add datastore-for-each-buildChristopher Baines2020-07-01
|
* Support storing when builds startChristopher Baines2020-07-01
| | | | | | | This isn't particularly accurate, what's actually being stored is the current time when the record is inserted in to the coordinator database, but that should happen just before the agent starts the build, so hopefully that's good enough.
* Add datastore-call-with-transactionChristopher Baines2020-06-20
|
* Support showing blocking buildsChristopher Baines2020-05-22
| | | | | This is useful to find builds that have failed, and in failing blocked other builds from being attempted.
* Report the number of unprocessed hook eventsChristopher Baines2020-05-21
|
* Improve handling of submitting buildsChristopher Baines2020-05-19
| | | | | | Don't always substitute the derivation, just fetch it if it doesn't exist in the database. Also just use the name of the derivation, only read it from the disk when it needs storing in the database.
* Replace datastore-fetch-input-builds-for-unprocessed-buildsChristopher Baines2020-05-10
| | | | | | | It worked under some database conditions, but was very slow under others. Move more of the logic in to SQL in an attempt to make the allocator faster. This sort of works, but there were some advantages to the approach before the approach being replaced in this commit.
* Add datastore-fetch-unprocessed-builds-with-propagated-prioritiesChristopher Baines2020-05-10
| | | | To use with the derivation ordered allocator.
* Add datastore-fetch-input-builds-for-unprocessed-buildsChristopher Baines2020-05-10
| | | | | This will be used by the derivation ordered allocator to find builds which can be performed.
* Rework the ensure-all-related-derivations-have-builds optionChristopher Baines2020-05-09
| | | | | | | This was resulting in duplicate builds for the same output, as that's not what it was guarding against, but I think that was my intention... Anyway this should actually only result in builds being created for outputs that are required.
* Add datastore-list-builds-for-derivation-recursive-inputsChristopher Baines2020-05-08
|
* Add sqlite datastore support for storing unprocessed hook eventsChristopher Baines2020-05-08
|