Skip to content

API Draft PR for discussion#13

Open
oreiche wants to merge 1 commit intomainfrom
oreiche/api-draft
Open

API Draft PR for discussion#13
oreiche wants to merge 1 commit intomainfrom
oreiche/api-draft

Conversation

@oreiche
Copy link
Copy Markdown
Collaborator

@oreiche oreiche commented Mar 24, 2026

No description provided.

.PHONY: serve

serve:
podman run \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python3 -m http.server 8080 does the same thing :-)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed

Copy link
Copy Markdown

@mwhudson mwhudson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good start to me. I guess tomorrow we come up with a cli UI for a few use cases and try to map them onto this API?

get:
tags:
- release
summary: List serials within range
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well OK so this opens a few questions:

  1. does this imply semantics to the content of the serial string? Or does a serial just get associated with the timestamp of when it was created?
  2. how are the results ordered?
  3. do we need to handle pagination or anything like that if the list gets too long?
  4. what happens if the query parameters are missing?

Also, I'm not really sure of the use case of this, if I'm honest. I can see the value of being able to iterate backwards over the last $N serials in some situations but that's not what this seems to be.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Yes, there could be some implied semantics if we decide to define a Serial as date+count (20260330.2). But I don't think this is a must, as long as we keep it associated with its creation time.
  2. I would order them by the time of their creation.
  3. Good point. Although I don't expect that list to become very long, as the number of Serials is probably less than ~1000 per year (that would require us to have enough space to keep all attached artifacts). Still, pagination should be considered. 👍
  4. That's not yet defined. I'd say it would probably make sense to reduce this to a fixed default number of the latest Serials, as those are probably the most interesting ones.

The overall idea is that each Serial is the top-level run ID of a build&test pipeline. So the Serial would be the entry point for navigating to the built images and test reports.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes OK this all makes a bit more sense to me, I think. Although if the representation of a serial in the API is just, well, the serial there is no way to find out its creation date I think? I think returning the last $N serials by default is probably a good default.

- CANCELLED
commitId:
type: string
description: Git commit ID of the 'release definitions' repository at the time the Serial was created.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes so much sense, but how will we find / know the repo this is in? I guess it's part of the overall configuration of the deployment? (I'm imagining a world where we have a deployment for ubuntu but also maybe one for a partner team and one for the public cloud team...)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I would put the repo location/URL as part of the deployment/service configuration. It's a general issue that locations/URLs are basically just names that are prone to change. So I would not necessarily make them part of the internal build records nor present those locations as part of the API. We definitely have to take extra care to ensure the proper archival of the repository that holds those release definitions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I guess we have to have a degree of trust that people are not going to act like complete maniacs here.

description: The list of Serials
items:
type: string
/release/serials/{serial}:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 this all seems fine

description: Serial to rerun all failed tasks (and subsequent tasks)
taskId:
type: string
description: Restrict rerun to only specific failed tasks
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a string or a list?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This should be a list...

- release
summary: Schedule recurring releases
description: TODO
/builds/{serial}:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess i would have expected this to be {serial}/builds somehow but well.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be changed :)

schema:
type: string
- name: image
description: Restrict request to given image
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image ids?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, see below.

type: string
responses:
"200":
description: Map of image names to build infos
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again I think you mean image ids, not names? I guess I don't quite know what an image id is, if it's like a hash type id, i'm a bit surprised a failed build gets an id. Or is it more (despite what the example says) more like an image configuration name, like ubuntu-server-amd64?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes image ID, basically a combination of "Image configuration" and "Platform", an encoded string as a flat representation of the combined entities discussed in RM009.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I think you need to fix the example in the schema then!

@oreiche oreiche force-pushed the oreiche/api-draft branch from 32aac46 to d2dad55 Compare April 10, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants