Cole Helbling
6107040bf5
Project: clear decltype
and declvalue
when project is no longer declarative
2021-05-06 08:47:18 -07:00
Cole Helbling
bd9c52dbd0
Project: delete the .jobsets
jobset if project is no longer declarative
...
"No longer declarative" as defined by the "Edit project" page is an empty spec
file.
2021-05-05 14:03:51 -07:00
Eelco Dolstra
886e6f85e4
Merge pull request #924 from hackworthltd/fix-flake-github-status
...
Fix GitHub status update for private flakes.
2021-05-03 16:24:51 +02:00
Graham Christensen
6e537671df
Merge pull request #954 from DeterminateSystems/projects-json-schema
...
Projects: use JSON in Schema
2021-05-02 21:35:04 -04:00
Cole Helbling
f3947acfc4
Projects: use JSON in Schema
2021-05-02 18:25:37 -07:00
Graham Christensen
5520f4b7b6
Merge pull request #952 from DeterminateSystems/decl-api
...
Project: add declfile, decltype, declvalue to API
2021-05-02 20:51:27 -04:00
Cole Helbling
ad13d13436
Project: add declfile, decltype, declvalue to API
...
This makes it possible to create declarative projects via a PUT request, and
also exposes the currently-configured values to GET requests.
2021-05-02 17:45:14 -07:00
Graham Christensen
e9a06113c9
Merge pull request #951 from DeterminateSystems/delete-project
...
Fix deleting projects
2021-05-01 13:01:39 -04:00
Cole Helbling
7c9ed6b919
Project: fix DELETE route
...
This appears to have been broken in ac3e8a4a59
,
which removed the `jobsetevals` column from the Projects schema, but didn't
update the Controller accordingly.
Fixes the test added in the previous commit.
2021-04-30 10:43:21 -07:00
Cole Helbling
d0682c804d
api-test: test deleting a project
...
As of this commit, this test will fail, because the underlying cause hasn't been
fixed.
2021-04-30 10:42:38 -07:00
Graham Christensen
6047b1dd04
Merge pull request #948 from DeterminateSystems/known-inputs
...
Jobset: list known inputs in invalid input type response
2021-04-29 21:45:16 -04:00
Cole Helbling
14aff5678c
hydra-api: don't restrict input types
...
Plugins can add their own input types; we don't want to restrict this.
2021-04-29 18:19:44 -07:00
Cole Helbling
03d5a858a7
Jobset: list known inputs in invalid input type response
2021-04-29 18:19:44 -07:00
Graham Christensen
18d271655c
Merge pull request #945 from DeterminateSystems/fixup-ToJSON
...
Jobsets,JobsetInputs: use JSON
2021-04-29 08:38:45 -04:00
Graham Christensen
8492db033e
Jobsets,JobsetInputs: use JSON
2021-04-29 08:32:47 -04:00
Graham Christensen
ec288e6d88
Merge pull request #941 from DeterminateSystems/align-api
...
ToJSON: allow custom as_json function; JobsetInputs, Jobsets: update schema to align with the API
2021-04-29 07:57:39 -04:00
Cole Helbling
f1dd5d202e
Jobsets: update schema to align with the API
...
To further align with the API, we return custom JSON in order to display a
`visible` field rather than `hidden` -- a `PUT` request expects `visible`, while
a `GET` request returns `hidden`.
This also allows us to rename the `jobsetinputs` field to `inputs` for the same
reason: `PUT` expects `inputs`, while `GET` returns `jobsetinputs`.
2021-04-29 07:50:23 -04:00
Cole Helbling
d23f431889
JobsetInputs: update schema to align with the API
...
`PUT /jobsets/{project-id}/{jobset-id}` expects a JSON object `inputs` which
maps a name to a name, a type, a value, and a boolean that enables emailing
responsible parties. However, `GET /jobsets/{project-id}/{jobset-id}` responds
with an object that doesn't contain a value, but does contain a jobsetinputalts
(which is old and should be unused).
This commit aligns the two by removing the old and unused `jobsetinputalts` from
the response and replaces it with `value`.
2021-04-29 07:50:23 -04:00
Cole Helbling
fff0db10e3
ToJSON: allow custom as_json function
...
This allows us to modify what the API responds with, which in turn lets us unify
the OpenAPI specification and the actual API's responses.
2021-04-29 07:50:23 -04:00
Graham Christensen
29028258e3
Merge pull request #940 from regnat/test-with-remote-dest-store
...
Run the tests with a remote dest store
2021-04-29 07:27:42 -04:00
Graham Christensen
e1a761194f
Merge pull request #943 from regnat/include-localhost-features
...
Cleanup the localhost-features test
2021-04-29 07:26:50 -04:00
regnat
bf3e1cf77b
Disable the remote dest store for the channel test
...
Looks like feature is only works when the destination store is the local
store
2021-04-29 07:24:20 +02:00
regnat
9c787e5e94
Document the use_external_destination_store test_init param
2021-04-29 07:24:20 +02:00
Théophane Hufschmitt
7af63658f1
tests: Make the external destination store optional
...
Co-authored-by: Graham Christensen <graham@grahamc.com>
2021-04-29 07:24:20 +02:00
regnat
305c27d3fb
Move the default-machine-file test under queue-runner
...
Just a bit of housekeeping to keep the testsuite clean
2021-04-29 06:55:23 +02:00
regnat
f61a13d2db
Only add the Nix system feature to the test that requires it
2021-04-29 06:54:25 +02:00
Graham Christensen
7017d41117
Merge pull request #942 from DeterminateSystems/port-api-test-master
...
Port api-test to yath
2021-04-28 19:48:33 -04:00
Graham Christensen
a44e5b73a8
api-test: clean up, use subtests
2021-04-28 19:41:49 -04:00
Graham Christensen
015d8298cb
flake.nix: drop the API test
2021-04-28 18:32:23 -04:00
Graham Christensen
5c5b53961e
fixup: api-test.t expected to pass inputs as inputs
2021-04-28 18:30:53 -04:00
Graham Christensen
fdb6e7dd97
fixup: return the user entity on login
2021-04-28 18:30:35 -04:00
Graham Christensen
a34f23f7e6
api-test: use is for nicer errors
2021-04-28 18:28:35 -04:00
Graham Christensen
20df86c275
api-test.t: make it work under yath
...
1. Configure the in-memory Hydra instance with a null path input cache
time to avoid caching slowing the test down.
2. Use the Catalyst::Test helpers so we talk to the application and skip
needing to actually run a webserver.
3. Change path references to use a tempdir, since this is running while
other tests are also running.
4. Change the login flow to save a cookie and pass it manually. A bit
weird, but it avoids a dependency on heavier browser-mimicking
libraries.
2021-04-28 18:28:35 -04:00
Graham Christensen
38c7f88b7c
rename api-test.pl to .t so it runs under yath
2021-04-28 18:28:35 -04:00
Graham Christensen
dd6cd33e98
move the api-test.nix in to the jobsdir
2021-04-28 18:28:35 -04:00
Graham Christensen
823da22e4f
Merge pull request #937 from DeterminateSystems/flesh-out-api
...
hydra-api: flesh out Jobset, JobsetInput schemas; implement DELETE /jobset/{project-id}/{jobset-id}
2021-04-28 13:43:04 -04:00
Cole Helbling
948b3cf073
Jobset: add HTTP API test
2021-04-28 10:37:06 -07:00
Graham Christensen
725c9c2f81
login: redirect to the current-user page
2021-04-28 08:32:10 -07:00
Graham Christensen
d589db2ed9
login: missing parameters are 400s
2021-04-28 08:31:59 -07:00
Eelco Dolstra
8d6a5aac84
Merge pull request #939 from regnat/include-localhost-features
...
Include localhost's features in the default machine file
2021-04-28 12:25:21 +02:00
regnat
0d3977866e
Run the tests with a remote dest store
...
Set `dest_store` in the test hydra config, so that the testsuite ensures
that the distinction between the local store and the destination store
is properly taken into account.
Fix #938
2021-04-28 12:22:54 +02:00
regnat
abff212d06
Use system-features from the Nix conf in the default machine file
...
Fix #936
2021-04-28 11:43:04 +02:00
regnat
d58b3274f9
test: Don't generate a Nix conf in the makefile
...
The config is overriden by the `test_init` perl function, so it’s at
best misleading to create a first one there
2021-04-28 11:41:37 +02:00
Cole Helbling
42ef3b7b72
hydra-api: update Project and Jobset examples with the new schema
...
For future reference, this was generated by sending the request and piping it to
`yq -y` so that it would spit out YAML.
2021-04-27 23:09:33 -07:00
Cole Helbling
bcd3bbb680
hydra-api: implement DELETE /jobset/{project-id}/{jobset-id}
2021-04-27 16:16:42 -07:00
Cole Helbling
72fec31dbb
hydra-api: flesh out JobsetInput schema
2021-04-27 16:16:42 -07:00
Cole Helbling
2600810551
hydra-api: flesh out Jobset schema
...
* made all columns available via the API (except for forceeval)
* renamed flakeref to flake to unify the API with the database schema
* renamed inputs to jobsetinputs to unify the API with the database schema
2021-04-27 16:16:42 -07:00
Graham Christensen
0c8d016a38
Merge pull request #935 from DeterminateSystems/delete-project
...
hydra-api: implement DELETE /project/{id}
2021-04-27 11:15:15 -04:00
Cole Helbling
ddccf6a60e
hydra-api: implement DELETE /project/{id}
2021-04-27 08:10:09 -07:00
Graham Christensen
ada497db4f
Merge pull request #934 from DeterminateSystems/missing-name
...
hydra-api: add missing `name` property
2021-04-26 22:02:14 -04:00