928ba9e854
Controller/{Jobset,Project}: error when enabling dynamic runcommand but it's disabled elsewhere
2022-02-11 14:35:52 -05:00
8a96f07f58
Project: enable enabling dynamic runcommand per project
2022-02-01 10:58:54 -05:00
726ea80e99
HTTP/Jobset: support setting / reading enable_dynamic_run_command
2022-02-01 10:58:54 -05: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
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
5d3912962b
RunCommand: use helper functions to ensure filenames and paths are the same
...
Otherwise, it's possible someone updates the format in one place but not
the others, leading to broken or incorrect functionality.
2022-01-28 13:03:15 -08:00
14090fbb86
runcommand-log.tt: init
2022-01-28 13:03:15 -08:00
796ce165d4
RunCommand: Allow displaying command output
2022-01-28 13:03:15 -08:00
b8f72d7ff2
LDAP support: require the prefix 'hydra_' to match documentation
2022-01-21 10:48:04 -05:00
8c50cd06e4
machines: ensure the jobset name is present
2022-01-15 17:11:08 -05:00
b2cdde0901
DeclarativeJobsets: test basic functionality
2022-01-15 13:46:32 -05:00
f4c4b496d8
Projects: delete: delete all builds first
...
Deleting jobsets first would fail because buildmetrics has an FK
to the jobset. However, the jobset / project relationship is not
marked as CASCADE.
Deleting all the builds automatically cascades to delete
buildmetrics, so deleting the relevant builds first, then deleting
the jobset solves it.
2022-01-14 20:37:55 -05:00
c7c4759600
search: fix references to jobset / project info
2022-01-14 16:38:25 -05:00
42a871e413
Merge pull request #1111 from DeterminateSystems/project-jobset/queue-summary-machines
...
Project jobset columns: fixup /queue-summary and /machines
2022-01-14 15:34:43 -05:00
8a663f2cf8
machines: fixup refs
2022-01-14 15:23:19 -05:00
c945529f05
queue summary: fix refs
2022-01-14 15:23:19 -05:00
a81e358016
API: test api/push-github
2022-01-14 14:57:32 -05:00
20db82b001
API test /api/push
2022-01-14 14:57:24 -05:00
fe095a56c5
API: test /nrbuilds and fix jobset / project references
2022-01-14 14:57:15 -05:00
86473f4b3c
API: fixup filtering latestbuilds by project and jobset
2022-01-14 14:57:10 -05:00
1f49a5af66
Fixup project name, jobset name, in buildToHash
2022-01-14 14:57:00 -05:00
ef6a2c96e7
JobsetEval: add the result of buildDiff to $c->stash
2022-01-10 12:11:06 -08:00
ec98bdaaaa
BuildDiff: move cmdBuilds from Controller/JobsetEval
2022-01-10 12:11:05 -08:00
1349887974
BuildDiff: split out from JobsetEval GET impl
2022-01-10 12:11:05 -08:00
aba0422865
JobsetEval: allow restarting failed builds even with no eval to compare to
2022-01-10 12:10:56 -08:00
832fa8c73d
Controller/Jobset: make some warnings about undef's go away
2022-01-10 10:33:33 -05:00
fe149613b3
Builds page: show RunCommand logs
2022-01-07 15:05:33 -05:00
9708f6bf6f
Fetch the tracker HTML from the config file, remove HYDRA_TRACKER
...
The indentation in the hydra.conf makes it possible to include multi-line
strings without it being likely that the contents of the tracker
is mis-parsed or interrupts tho config parser.
It isn't impossible / foolproof probably, but it shouldn't be likely.
2022-01-05 15:27:21 -05:00
f2f8d571f3
queue-runner-status: fixup from perlcritic-level-2
...
>
> from_json was legacy / deprecated. This was the only use.
2021-12-15 17:24:23 -05:00
aa7b37838a
PerlCritic: MoreUtils -> SomeUtils
2021-12-14 10:16:25 -05:00
7dcf6a01c6
JSON -> JSON::MaybeXS
2021-12-13 15:37:56 -05:00
5659d2982c
Hydra/Controller/Root: remove deprecated LocalRegex
...
11:38:20 hydra-server.1 | DEPRECATION WARNING: The Regex dispatch type is deprecated.
11:38:20 hydra-server.1 | It is recommended that you convert Regex and LocalRegex
11:38:20 hydra-server.1 | methods to Chained methods. at /nix/store/aa6gw57fnahd4824pbhmvcs0jlypmynq-hydra-perl-deps/lib/perl5/site_perl/5.32.1/Catalyst/DispatchType/Regex.pm line 210.
2021-12-03 12:12:53 -08:00
d19890a4e1
JobsetEval/cancel: test & fix
2021-10-27 11:43:36 -04:00
ffedbe5996
restart/cancelBuilds: always pass resultsets explicitly
2021-10-25 22:21:48 -04:00
4c8279044b
Merge pull request #1026 from DeterminateSystems/constituents
...
add api endpoint: /build/<id>/constituents
2021-09-28 09:21:21 -04:00
2745226ada
Merge pull request #1003 from DeterminateSystems/perlcritic-level-4
...
perlcritic: level 4
2021-09-27 20:23:55 +02:00
66375fd2d9
Fix 'Error loading tab: 0 error' with uBlock Origin
...
/metrics-tab matches a rule in one of uBlock Origin's default
blocklists, so let's name it something else.
2021-09-27 17:42:56 +02:00
c60c8d10ea
add api endpoint: /build/<id>/constituents
...
Returns a list of constituent builds
2021-09-24 16:30:44 -04:00
85bb1c7ef9
(perlcritic) JSON::Any -> JSON::MaybeXS
2021-09-07 21:55:55 -04:00
c880888f1e
File::Slurp -> File::Slurper
2021-09-06 22:13:33 -04:00
b6714cdce3
JobsetEval: $a, $b to $left, $right (perlcritic)
2021-08-20 21:52:32 -04:00
d0fb3cbf8f
Job: $b -> $build (perlcritic)
2021-08-20 21:52:32 -04:00
4632132d02
fixup perlcritic: indirect new
...
> Subroutine new called using indirect syntax at line 14, column 14. See page 349 of PBP. (Severity: 5)
2021-08-20 11:39:19 -04:00
09ad52ab60
Document getEvals a bit
...
Also drop the $self parameter.
Co-authored-by: gustavderdrache
2021-06-16 13:15:01 -04:00
382ba590ad
Drop unused query from GET Build.
2021-06-01 11:47:05 -04:00