store/jobqueue: remove distro field from jobs
A job's purpose is to build an osbuild manifest and upload the results somewhere. It should not know about which distro was used to generate the pipeline. Workers depended on the distro package in two ways: 1. To set an osbuild `--build-env`. This is not necessary anymore in new versions of osbuild. More importantly, it was wrong: it passed the runner from the distro that is being built, instead of one that matches the host. This patch simply removes that logic. 2. To fetch the output filename with `Distro.FilenameFromType()`. While that is useful, I don't think it warrants the dependency. This patch uses the fact that all current pipelines output exactly one file and uploads that. This should probably be extended in the future to upload all output files, or to name them explicitly in the upload target. The worker should now compile to a smaller binary and do less unnecessary work on startup (like reading repository files).
This commit is contained in:
parent
76b236796c
commit
1b7cb6c11b
4 changed files with 14 additions and 40 deletions
|
|
@ -60,7 +60,7 @@ func TestCreate(t *testing.T) {
|
|||
}
|
||||
|
||||
test.TestRoute(t, api, false, "POST", "/job-queue/v1/jobs", `{}`, http.StatusCreated,
|
||||
`{"id":"ffffffff-ffff-ffff-ffff-ffffffffffff","image_build_id":0,"distro":"fedora-30","manifest":{"sources":{},"pipeline":{}},"targets":[],"output_type":"qcow2"}`, "created", "uuid")
|
||||
`{"id":"ffffffff-ffff-ffff-ffff-ffffffffffff","image_build_id":0,"manifest":{"sources":{},"pipeline":{}},"targets":[],"output_type":"qcow2"}`, "created", "uuid")
|
||||
}
|
||||
|
||||
func testUpdateTransition(t *testing.T, from, to string, expectedStatus int, expectedResponse string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue