bootc icon indicating copy to clipboard operation
bootc copied to clipboard

Add a RPC API

Open cgwalters opened this issue 3 years ago • 2 comments

This heavily relates to https://github.com/cgwalters/bootc/issues/2 - but does not strictly depend on it.

My initial take is to add something like bootc upgrade --json which would not do interactive status prints, but write a defined stable JSON output format to stdout (or a specifically targeted fd).

But...it may be more sustainable to have a better protocol; as the issue says, whether that's DBus or Cap'n Proto or varlink, etc.

cgwalters avatar Dec 01 '22 00:12 cgwalters

@baude you mentioned this in a chat - can you flesh out (or just link me to) what requirements you're thinking of here? It was in the context of podman desktop right?

I believe that use case is literally just bootc switch quay.io/podman:4.2 etc. right? Is there more requirements? (Can we just pass through tty status or does it actually need a proper API so that a GUI like podman desktop could render download progress?)

cgwalters avatar Dec 01 '22 19:12 cgwalters

One of the bigger challenges with things like this in my experience is representing e.g. download progress. There's a lot of subtleties and tension between making it generic enough for future expansion but specific enough to render in a nice way in a GUI.

The rpm-ostree DBus APIs for this are okay-ish but not IMO great.

Quickly looking at e.g. the Docker HTTP API, it doesn't seem to have any byte-level progress for e.g. image fetches?

cgwalters avatar Dec 07 '22 18:12 cgwalters

I do not think bootc fits the mold of a tool requiring any form of IPC. It isn't a persistent process today and should never be in the future.

jmpolom avatar Nov 05 '24 02:11 jmpolom