aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/jobs/load-new-guix-revision.scm
Commit message (Collapse)AuthorAge
* WIPwip-fix-foreignChristopher Baines2019-12-01
|
* Work around a problem loading guix revisionsChristopher Baines2019-11-03
| | | | | | Between b13b9384bc43bf93c754c037956c8ef9a99c2b41 and 601171a9bc7ca6e4acb932895a07c0ca9aedfdac, this method failed, so catch the error to allow loading the affected revisions.
* Send inferior error output to stderrChristopher Baines2019-10-18
| | | | | | | | Ideally this would go in to the database somehow as well, but the only idea I have for that is pass in a pipe, and then spawn a thread to read from the other end of that pipe in a loop to send the output to the database. That hasn't been written yet, so just send the output to stderr for now.
* Remove unused inferior-package-transitive-supported-systems functionChristopher Baines2019-10-18
|
* Add a page for queued jobsChristopher Baines2019-10-12
|
* Make it easier to retry jobsChristopher Baines2019-10-02
| | | | | | | | Add a new event 'retry', and run jobs where the number of retry events is greater or equal to the number of failure events. Also add an index to the git_branches table to make the finding jobs query a bit faster.
* Fail early if the inferior is #fChristopher Baines2019-09-29
| | | | This happens when the repl can't be loaded for example.
* Try setting the en_US.UTF-8 locale, if the normalised failsChristopher Baines2019-09-29
| | | | | Older versions of the glibc-locales package just contain the UTF-8 variants, not utf8.
* Don't error when processing revisions of Guix without graft supportChristopher Baines2019-09-29
|
* Handle loading revisions without the (guix lint) moduleChristopher Baines2019-09-29
| | | | | This is a recent addition, so to support loading revisions without it, better handle the error when loading the module.
* Unset the GUILE_LOAD_* environment variables when using inferiorsChristopher Baines2019-09-28
| | | | Otherwise modules from outside of the inferior can leak in.
* Add a new table to store package versions by revision rangesChristopher Baines2019-09-27
| | | | | | | This isn't new information, but derived from information already in the database. It's collected here to make querying faster. The table is updated when each new revision is entered.
* Add newline to the end of the duplicate lint warning outputChristopher Baines2019-09-05
|
* Improve the package and package-metadata modulesChristopher Baines2019-09-05
| | | | | | | Add tests around the package module, extract out the use of the inferior-package record assessors so that they aren't part of the tests, and switch across the package-metadata module to use insert-missing-data-and-return-all-ids.
* Add a new table guix_revision_lint_checkersChristopher Baines2019-09-01
| | | | | | | | | To associate a set of lint checkers with a specific revision. While there is the association through the lint warnings, that only works for checkers where there are lint warnings for that revision. Therefore, to allow finding all the checkers for a specific revision, also associate them directly with the revision.
* Log the manifest derivation when loading new revisionsChristopher Baines2019-09-01
| | | | As this is useful to know.
* Include glibc-locales from the inferior guix in the environmentChristopher Baines2019-09-01
| | | | | | | | | | | When loading data from an inferior Guix, first build it's latest version of glibc-locales, and include that in the environment from the inferior. This improves locale support, which is currently relevant for extracting lint warnings. Without this change, you'd only be able to switch to locales supported by the glibc-utf8-locales package, assuming that the right version is available.
* Log the guix store path being usedChristopher Baines2019-09-01
| | | | In the load-new-guix-revision module.
* Improve handling of errors when changing localeChristopher Baines2019-09-01
| | | | In the load-new-guix-revision module.
* Store lint warnings in the databaseChristopher Baines2019-09-01
| | | | | | | | | | This commit adds the relevant tables and code to store lint warnings in the database. Currently, only lint checkers which don't require access to the network will be run, as this allows the processing to happen without network access. Also, this functionality won't work in older versions of Guix which don't expose the lint warnings in a compatible way.
* Add buffering to the log handling for jobsChristopher Baines2019-08-31
| | | | | To increase the log output speed, avoiding inserting one character at a time in to the database.
* Avoid erroring when processing emails againChristopher Baines2019-08-05
| | | | | These changes allow processing emails again, and just creating job and branch entries where data is missing.
* Clear the previous log entry when starting a jobChristopher Baines2019-08-04
|
* Display the jobs related to a revision on the revision pageChristopher Baines2019-07-22
|
* Remove restrictions in select-job-for-updateChristopher Baines2019-07-19
| | | | This allows running jobs manually that have failed.
* Close the logging port once it's been usedChristopher Baines2019-07-19
|
* Prioritise processing the latest revisions for branchesChristopher Baines2019-07-16
| | | | | | Reserve some capacity to process revisions which are the tip of a branch. This should reduce the time between new revisions appearing, and then being processed.
* Record jobs as failed when they are killedChristopher Baines2019-07-14
| | | | So that they aren't retried again and again.
* Switch to processing jobs in parallelChristopher Baines2019-07-12
| | | | | | This should speed up processing new revisions, reduce latency between finding out about new revisions and processing them, as well as help manage memory usage, by processing each job in a process that then exits.
* Obtain a lock when inserting the data for a new revisionChristopher Baines2019-07-12
| | | | | | | | | | | | This is working towards running the jobs in parallel. Each job looks at the records in the database, and adds missing ones. If other jobs, running in different transactions insert the same missing records at the same time, this could cause an error. Therefore, to just avoid this problem, lock before inserting the data. This will allow the jobs to be processed in parallel, and it shouldn't have too much of an effect on performance, as the slow bit is outside of the transaction.
* Lock around the channel fetch when loading new revisionsChristopher Baines2019-07-12
| | | | | | | This is in preparation for running jobs in parallel. The channels code in Guix uses a cached copy of the Git repository. Multiple jobs can't concurrently access this without causing issues, so use an advisory lock to ensure that only one job is using the repository at a time.
* Associate a name with database connectionsChristopher Baines2019-07-12
| | | | This helps when working out which connection to the database is doing what.
* Fix using defined? to check for the open-inferior/container functionChristopher Baines2019-07-09
| | | | It doesn't work as intended unless the module is also specified, so do that.
* Fix issue inserting the empty log rowChristopher Baines2019-07-09
| | | | | If the job started, and then was restarted, the row will already exist. So don't error on a conflict.
* Move around some of the load new revision codeChristopher Baines2019-07-07
| | | | | | To better separate the code that needs to happen after a lock has been acquired to allow concurrently loading revisions without concurrent insertion issues.
* Tweak how logs are storedChristopher Baines2019-07-07
| | | | | | | | | | | | | | | | | | Previously, the query for the jobs page was really slow, as it checked the load_new_guix_revision_job_log_parts table for each job, doing a sequential scan through the potentially large table. Adding an index didn't seem to help, as the query planner would belive the query could return loads of rows, where actually, all that needed checking is whether a single row existed with a given job_id. To avoid adding the index to the load_new_guix_revision_job_log_parts table, and fighting with the query planner, this commit changes the load_new_guix_revision_job_logs table to include a blank entry for jobs which are currently being processed. This is inserted at the start of the job, and then updated at the end to combine and replace all the parts. This all means that the jobs page should render quickly now.
* Iterate the log viewingChristopher Baines2019-06-24
| | | | | | | | Replace the Guile-side HTML escaping with a less complete, but hopefully faster PostgreSQL side HTML escaping approach. Also, allow reading part of the log, by default, the last 1,000,000 characters, as this should render quickly.
* Direct the build output to the logging-portChristopher Baines2019-06-22
| | | | So that this is logged.
* Stop closing the log-port portChristopher Baines2019-06-22
| | | | | This part of the soft-port seems to be called, but I don't know why, and trying to close the output port causes issues.
* Record the output from loading new revisions to the databaseChristopher Baines2019-06-22
| | | | | | | So that it can easily be shown through the web interface. There's two tables being used. One which temporarily stores the output as it's output while the job is running, and other which stores the whole log once the job has finished.
* Re-arrange some of the load new revision codeChristopher Baines2019-06-21
| | | | | Try to isolate the code that inserts in to the database, so that the relevant tables can be locked during this time.
* Add a couple of functions around timingChristopher Baines2019-06-21
| | | | That don't rely on timing a single function.
* Log the time loading new revisions takesChristopher Baines2019-06-21
|
* Set #:fallback? to #tChristopher Baines2019-06-21
| | | | If a substitute fails, just build it anyway.
* Process jobs starting with the most recentChristopher Baines2019-06-19
| | | | | | | Conventionally, you'd process the oldest job in a queue, but at the moment, it would be more useful to have recent information more promptly, and fill in the historical gaps later. I'm not sure this'll always be the case, but for now, flip the order in which jobs are processed.
* Use line buffering for the input and output portsChristopher Baines2019-06-17
| | | | | As these are used for logging, which is done on a line by line basis. Remove the now redundant calls to (force-output).
* Time everywhere a derivation is built when loading a new revisionChristopher Baines2019-06-17
| | | | As this is useful information.
* Add a new page listing jobsChristopher Baines2019-06-17
|
* Improve the error message when a load revision job failsChristopher Baines2019-06-15
| | | | It's useful to know the commit.
* Display a backtrace for errors in channel->derivation-file-nameChristopher Baines2019-06-13
| | | | To help with debugging.