debian-forge-composer/internal/kojiapi
Achilleas Koutsou a2c4622930 kojiapi: Check job type when retrieving from queue
When a job's arguments are retrieved (for the /manifests API endpoint),
the incoming ID should correspond to a Finalize Job.  The new
worker.Job() method helps us verify the type and produce an error if the
wrong type is found.
Similarly, the dependencies of a Finalize Job should be in order (Init
Job first followed by Build Jobs).  The types are validated while
iterating the dependency list.

Added convenience functions that check the retrieved job type and return
the initialised struct or an error if the ID is not found or does not
match the type.

Currently the getInitJob() function isn't used but it will be useful
later.
2021-01-19 10:37:51 +01:00
..
api kojiapi: Add endpoint for retrieving job manifest 2021-01-16 13:39:30 +01:00
server.go kojiapi: Check job type when retrieving from queue 2021-01-19 10:37:51 +01:00
server_internal_test.go koji: use nvra as the filename for images 2020-10-27 19:01:30 +00:00
server_test.go test: Job args/manifests retrieval 2021-01-16 13:39:30 +01:00