6e571e26ff
Build the resolved derivation and not the original one
2022-03-29 17:05:30 +02:00
92b627ac1b
Remove an accidental re-indenting of a comment
...
Co-authored-by: Eelco Dolstra <edolstra@gmail.com >
2022-03-29 17:04:19 +02:00
b430d41afd
Use the BuildOptions
more eagerly
2022-03-29 17:04:19 +02:00
fd0ae78eba
Factor out the copying from the build store
2022-03-29 17:04:19 +02:00
a778a89f04
Factor out the queryPathInfos
part of the build
2022-03-29 17:04:19 +02:00
365776f5d7
Factor out the building part
2022-03-29 17:04:19 +02:00
9f1b911625
Factor more stuff out
2022-03-29 17:04:17 +02:00
2f494b7834
Factor out the creation of the log file
2022-03-29 16:52:59 +02:00
5db8642224
Factor out a struct representing a connection to a machine
2022-03-29 16:52:59 +02:00
8e3ada2afc
Revert "Use copyClosure
instead of computeFSClosure
+ copyPaths
"
...
This reverts commit f14c583ce5
.
2022-03-28 09:54:02 -07:00
962bf36939
Merge pull request #1162 from obsidiansystems/less-ref
...
Make `copyClosureTo` take a regular C++ ref to the store
2022-03-23 16:25:59 +01:00
3390415905
Merge pull request #1125 from obsidiansystems/simplify--copyClosure
...
Use `copyClosure` instead of `computeFSClosure` + `copyPaths`
2022-03-23 12:49:22 +01:00
e5393c2cf8
fixup: make id non-ambiguous
2022-03-19 23:56:47 -04:00
137be3452e
Reduce the jobset cols on the remaining two queries
2022-03-19 23:56:47 -04:00
f353a7ac41
update-gc-roots: try subselecting the jobset table
2022-03-19 23:56:47 -04:00
145667cb53
hydra-update-gc-roots: allow cached refs to the build's jobset
...
Re-executing this search_related on every access turned out to
create very problematic performance. If a jobset had a lot of
error output stored in the jobset, and there were many hundreds
or thousands of active jobs, this could easily cause >1Gbps of
network traffic.
2022-03-19 23:56:47 -04:00
a582e4c485
HydraTestContext: add \n's to various dies
2022-03-19 14:46:53 -04:00
074a2f96bf
hydra-eval-jobset: emit a useful error if constituents errored
2022-03-19 14:37:12 -04:00
9316544abf
src/hydra-eval-jobs/hydra-eval-jobs.cc: .get<std::string> for drvPath
...
Co-authored-by: Kayla Fire <firestack@users.noreply.github.com >
2022-02-21 12:41:21 -05:00
290e0653ad
hydra-eval-jobs: GC root aggregate jobs
2022-02-20 12:28:40 -05:00
445bba337b
Make copyClosureTo
take a regular C++ ref to the store
...
This is syntactically lighter wait, and demonstates there are no weird
dynamic lifetimes involved, just regular passing reference to callee
which it only borrows for the duration of the call.
2022-02-20 17:22:43 +00:00
f14c583ce5
Use copyClosure
instead of computeFSClosure
+ copyPaths
...
It is more terse, and in the future it is possible `copyClosure` will
become more sophisticated.
2022-02-19 11:59:17 -05:00
4c41ca08e1
Merge pull request #1155 from helsinki-systems/fix/graph-readability
...
build-graphs: Fix readability in dark mode
2022-02-14 11:27:37 -05:00
6d146deaf0
build-graphs: Fix readability in dark mode
2022-02-13 14:00:17 +01:00
71c06f2ce7
LDAP normalization errors: note that the error came while normalizing the roles.
2022-02-11 10:55:27 -05:00
f07fb7d279
LDAP support: include BC support for the YAML based loading
...
Includes a refactoring of the configuration loader.
2022-02-11 10:49:38 -05:00
61d74a7194
Redo LDAP config in the main configuration and add role mappings
2022-02-11 10:49:38 -05:00
d0bc0d0eda
Merge pull request #1152 from DeterminateSystems/parallel-tests
...
Parallel tests, fix a hydra-queue-runner race condition
2022-02-10 12:11:20 -05:00
4acaf9c8b0
hydra-queue-runner: don't dispatch until the machines parser has completed one run
...
Periodically, I have seen tests fail because of out of order queue runner behavior:
checking the queue for builds > 0...
loading build 1 (tests:basic:empty_dir)
aborting unsupported build step '...-empty-dir.drv' (type 'x86_64-linux')
marking build 1 as failed
adding new machine ‘localhost’
This patch should prevent the dispatcher from running before any machines are
made available.
2022-02-10 10:54:30 -05:00
9ae7c8bddc
Hydra::Helper::Exec add an expectOkay which dies with stdout / stderr on exit
2022-02-09 20:56:10 -05:00
845e6d4760
captureStdoutStderr*: move to Hydra::Helper::Exec which helps avoid some environment variable fixation problems
2022-02-09 14:28:50 -05:00
517dce285a
eval_added event: change interface to traceID\tjobsetID\tevaluationID
...
I was not going to break the interface until I noticed
the current implementation uses the string literal \t.
2022-02-08 09:51:35 -05:00
d512e6220f
eval_failed event: change interface to traceID\tjobsetID
...
I was not going to break the interface until I noticed the other eval_* events used literal \ts
2022-02-08 09:51:35 -05:00
2597fa8c11
eval_cached event: change interface to traceID\tjobsetID\tevaluationID
...
I was not going to break the interface until I noticed
the current implementation uses the string literal \t.
2022-02-08 09:51:35 -05:00
c30f084f32
eval_started event: change interface to traceID\tjobsetID
...
I was not going to break the interface until I noticed
the current implementation uses the string literal \t.
2022-02-08 09:51:35 -05:00
8a18326f2b
Sort notification classes / events
2022-02-07 16:08:27 -05:00
85b842e0ac
Merge pull request #1137 from DeterminateSystems/runcommand-logs
...
Store and display the output of RunCommands
2022-01-31 16:26:31 -05:00
b57345ba1f
hydra.sql: add IndexRunCommandLogsOnBuildID index
2022-01-31 12:56:34 -08:00
d0b6329aa8
sql/upgrade-81: remove unnecessary comment
2022-01-31 12:55:36 -08:00
8c67e32480
RunCommand: ensure we reset the umask
2022-01-31 12:55:36 -08:00
34e4c119f4
build.tt: don't duplicate RunCommandLog buttons
2022-01-31 11:40:16 -08:00
61189ecca9
Helper/Nix: constructRunCommandLogPath: verify uuid is valid
...
This shouldn't be possible normally, but it is possible to:
$db->resultset('RunCommandLogs')->new({ uuid => "../etc/passwd" });
if you have access to the `$db`.
2022-01-31 08:58:33 -08:00
e381751564
Helper/Nix: constructRunCommandLogPath: return undef in case of an error
...
This allows us to give a web request to an invalid UUID a 404.
2022-01-31 08:58:33 -08:00
8eab7b8543
Helper/Nix: constructRunCommandLogPath: take RunCommandLog as input
...
This way we ensure that it actually exists in the database, rather than
blindly trusting user-generated input.
2022-01-31 08:58:33 -08:00
61914d56c6
runcommand-log.tt: escape the command
2022-01-31 08:58:33 -08:00
71bbb042db
build.tt: link to the pretty, raw, and tail versions of the log
...
Also split it out to a new div -- there are now 3 lines per
RunCommandLog -- the first saying when it started, the second saying how
long it ran for (or has been running), and the third with the buttons
for the pretty, raw, and tail versions of the log.
2022-01-31 08:58:33 -08:00
3594ba942a
Controller/Build: use showLog in view_runcommandlog
...
This also adds the `runcommandlog` object to the stash so that we can
access its uuid as well as command run in order to display more useful
and specific information on the webpage.
2022-01-31 08:58:33 -08:00
1d0076408b
Controller/Build: pass log_uri to showLog in place of drvPath
...
This way, we can reuse the `showLog` sub for other things, such as
`view_runcommandlog` (which doesn't have a drvPath attached).
2022-01-31 08:58:33 -08:00
ff390e89a6
Controller/Build: remove unused parameter from showLog
2022-01-31 08:58:33 -08:00
fc3cf4ecb2
RunCommandLogs: identify and access via uuid
...
Using a sha1 of the command combined with the build ID is not a
particularly good or unique identifier:
* A build could fail, be restarted, and then succeed -- assuming no
configuration changes, the sha1 hash of the command as well as the build
ID will be the same. This would lead to an overwritten log file.
* Allowing user input to influence filenames is not the best of ideas.
2022-01-31 08:58:33 -08:00