osbuild / osbuild-composer

An HTTP service for building bootable OS images.
https://www.osbuild.org
Apache License 2.0
161 stars 108 forks source link

apiv2: depsolve and build should be 2 jobs and therefore 2 different endpoints #1776

Open croissanne opened 3 years ago

croissanne commented 3 years ago

Actually splitting these jobs up will be handled by depsolving in the workers.

/compose: should depsolve (should we rename the endpoint to something more obvious?) /build: build the job which was previously depsolved in /compose

As a first iteration this can be a purely cosmetic change, where everything happens in /compose, once the job is split up in the background /build can do the actual build job.

This is useful to for instance call /compose (depsolve) on the review screen in image-builder-crc; so we can verify the validity of a request before trying to build it.

croissanne commented 3 years ago

What's still open:

  1. what exactly the requests should look like. Most likely /build should just take a jobId from a /compose depsolve job.
  2. Neither should be synchronous. Both should just return a JobId.
teg commented 3 years ago

Question: should builds nest under composes, or reference them?

croissanne commented 3 years ago

Question: should builds nest under composes, or reference them?

Either could work; but /composes/${id}/build as a POST makes sense yea, I think I prefer that even.