Jobsets: update schema to align with the API
[?]
Apr 28, 2021, 7:41 PM
P32OJ3RUWL2CQFC3AHG2OC3SQKBSYOXNMPWOQHHALKC7ENHYFJ3QCDependencies
- [2]
OOI5OFJXhydra-api: flesh out Jobset schema - [3]
ZDH6UX5UJobset: add HTTP API test - [4]
XNXX4WCQapi-test: clean up, use subtests - [5]
RQI3GRC6Enable setting checkresponsible in the edit jobset form - [6]
KSBB33REAdd a dashboard - [7]
ODNCGFQ5* Improved the navigation bar: don't include all projects (since that - [8]
NP7IOJ4QFlesh out the API a bit - [9]
4VYSDP4IAdd eager fetching of relations and enable that for jobset->jobsetinputs - [10]
W5OAZWPDDrop the errorMsg column in the Jobs table - [11]
LX326CB7Add hydra OpenAPI description (#750) - [12]
TQVKZQUGUse the REST API in the web interface for editing jobsets - [13]
YI3BZG5NCleanup Jobset serialization - [14]
KYSBJAYNAllow dashes in jobset input names - [15]
XWEWQOHVapi-test: use is for nicer errors - [16]
LUYDIGYMMake input value wider - [17]
OX6NYJDVSplit viewing and editing a jobset - [18]
GLJD3PG2api-test.t: make it work under yath - [19]
OK4P3AMKRemove the ability to add multiple jobset input alternatives - [20]
K3HODXGHCheck all inputs for blame but only email selected inputs - [21]
LZVO64YGMerge in the first bits of the API work - [22]
HPXFXHFSRemove SHA-1 hash from BuildProducts - [23]
VJFLX7B6Fix rendering of jobset inputs - [24]
QJYMTECFAdd nixexprpath/nixexprinput to GET of jobset (API). - [25]
VZX6HJ3IFix jobset input handling in the API - [26]
QUMWPGCUAdd flake configuration to the web interface - [27]
X27GNHDV* Basic job info in the database. - [28]
BXHG3HYLWhen renaming a jobset, add a redirect from the old name - [29]
PCD3ZH6ZPartially revert 1c20cfdf2403feb78cef515faf15c04d5c9f17bd - [*]
3HZY24CX* Make jobsets viewable under
Change contents
- replacement in hydra-api.yaml at line 645
hidden:description: when false the jobset is visible in the web frontendvisible:description: when true the jobset is visible in the web frontend - replacement in hydra-api.yaml at line 670
type: stringtype: integer - replacement in hydra-api.yaml at line 675
jobsetinputs:inputs: - replacement in src/lib/Hydra/Controller/Jobset.pm at line 273
foreach my $name (keys %{$c->stash->{params}->{jobsetinputs}}) {my $inputData = $c->stash->{params}->{jobsetinputs}->{$name};foreach my $name (keys %{$c->stash->{params}->{inputs}}) {my $inputData = $c->stash->{params}->{inputs}->{$name}; - replacement in src/lib/Hydra/Schema/Jobsets.pm at line 413[5.427]→[5.1:14](∅→∅),[5.1]→[5.1:14](∅→∅),[5.14]→[5.137:154](∅→∅),[5.154]→[2.2321:2392](∅→∅),[2.2392]→[5.154:173](∅→∅),[5.154]→[5.154:173](∅→∅),[5.173]→[2.2393:2620](∅→∅),[2.2620]→[5.173:193](∅→∅),[5.173]→[5.173:193](∅→∅),[5.218]→[5.0:25](∅→∅),[5.25]→[2.2621:2750](∅→∅),[5.71]→[5.242:249](∅→∅),[2.2750]→[5.242:249](∅→∅),[5.242]→[5.242:249](∅→∅),[5.249]→[5.330:355](∅→∅),[5.14]→[5.330:355](∅→∅),[5.355]→[5.33:73](∅→∅),[5.33]→[5.33:73](∅→∅)
my %hint = (columns => ["errortime","lastcheckedtime","triggertime","enabled","keepnr","checkinterval","schedulingshares","starttime"],string_columns => ["name","project","description","nixexprinput","nixexprpath","errormsg","emailoverride","fetcherrormsg","type","flake"],boolean_columns => ["enableemail","hidden"],eager_relations => {jobsetinputs => "name"});sub as_json {my $self = shift; - replacement in src/lib/Hydra/Schema/Jobsets.pm at line 416
sub json_hint {return \%hint;my %json = (# columns"errortime" => $self->get_column("errortime"),"lastcheckedtime" => $self->get_column("lastcheckedtime"),"triggertime" => $self->get_column("triggertime"),"enabled" => $self->get_column("enabled"),"keepnr" => $self->get_column("keepnr"),"checkinterval" => $self->get_column("checkinterval"),"schedulingshares" => $self->get_column("schedulingshares"),"starttime" => $self->get_column("starttime"),# string_columns"name" => $self->get_column("name") // "","project" => $self->get_column("project") // "","description" => $self->get_column("description") // "","nixexprinput" => $self->get_column("nixexprinput") // "","nixexprpath" => $self->get_column("nixexprpath") // "","errormsg" => $self->get_column("errormsg") // "","emailoverride" => $self->get_column("emailoverride") // "","fetcherrormsg" => $self->get_column("fetcherrormsg") // "","type" => $self->get_column("type") // "","flake" => $self->get_column("flake") // "",# boolean_columns"enableemail" => $self->get_column("enableemail") ? JSON::true : JSON::false,"visible" => $self->get_column("hidden") ? JSON::false : JSON::true,"inputs" => { map { $_->name => $_ } $self->jobsetinputs });return \%json; - replacement in src/root/edit-jobset.tt at line 49
<tbody class="jobsetinputs">[% jobsetinputs = createFromEval ? eval.jobsetevalinputs : jobset.jobsetinputs; FOREACH input IN jobsetinputs %]<tbody class="inputs">[% inputs = createFromEval ? eval.jobsetevalinputs : jobset.jobsetinputs; FOREACH input IN inputs %] - replacement in src/root/edit-jobset.tt at line 223
var data = { 'jobsetinputs': {} };var jobsetinputs = {};var data = { 'inputs': {} };var inputs = {}; - replacement in src/root/edit-jobset.tt at line 236
if (!(baseName in jobsetinputs))jobsetinputs[baseName] = {};if (!(baseName in inputs))inputs[baseName] = {}; - replacement in src/root/edit-jobset.tt at line 240
data.jobsetinputs[elem.value] = jobsetinputs[baseName];data.inputs[elem.value] = inputs[baseName]; - replacement in src/root/edit-jobset.tt at line 242
jobsetinputs[baseName][param] = elem.value;inputs[baseName][param] = elem.value; - replacement in t/Controller/Jobset/http.t at line 49
visible => 1,visible => JSON::true, - replacement in t/Controller/Jobset/http.t at line 79
hidden => JSON::false,jobsetinputs => {},visible => JSON::true,inputs => {}, - replacement in t/Controller/Jobset/http.t at line 102
visible => 1,visible => JSON::true, - replacement in t/Controller/Jobset/http.t at line 107
jobsetinputs => {inputs => { - replacement in t/Controller/Jobset/http.t at line 137
hidden => JSON::false,jobsetinputs => {visible => JSON::true,inputs => { - replacement in t/Controller/Jobset/http.t at line 143
jobsetinputalts => ["https://github.com/NixOS/ofborg.git released"]value => "https://github.com/NixOS/ofborg.git released" - replacement in t/api-test.t at line 84
my $result = request_json({ uri => '/jobset/sample/default', method => 'PUT', data => { nixexprpath => "default.nix", nixexprinput => "my-src", jobsetinputs => { "my-src" => { type => "path", value => $jobsetdir } }, enabled => "1", visible => "1", checkinterval => "3600"} });my $result = request_json({ uri => '/jobset/sample/default', method => 'PUT', data => { nixexprpath => "default.nix", nixexprinput => "my-src", inputs => { "my-src" => { type => "path", value => $jobsetdir } }, enabled => "1", visible => "1", checkinterval => "3600"} }); - replacement in t/api-test.t at line 89
ok(exists $jobset->{jobsetinputs}->{"my-src"}, "The new jobset has a 'my-src' input");ok(exists $jobset->{inputs}->{"my-src"}, "The new jobset has a 'my-src' input"); - replacement in t/api-test.t at line 91
is($jobset->{jobsetinputs}->{"my-src"}->{"jobsetinputalts"}->[0], $jobsetdir, "The 'my-src' input is in $jobsetdir");is($jobset->{inputs}->{"my-src"}->{value}, $jobsetdir, "The 'my-src' input is in $jobsetdir");