Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add build history APIs #3294

Merged
merged 1 commit into from
Nov 23, 2022
Merged

add build history APIs #3294

merged 1 commit into from
Nov 23, 2022

Conversation

tonistiigi
Copy link
Member

fixes #3050

For testing 2 new commands added to buildctl:

buildctl debug monitor [--completed]

Will listen on event on new builds coming in and completing. If --completed is passed, then shows previous builds stored on disk.

buildctl debug logs [refid] [--progress=auto]

Shows logs for an active build. RefID can be obtained with the monitor command. Eventually, this would also work for completed builds.

Signed-off-by: Tonis Tiigi tonistiigi@gmail.com

// TODO: pinning
}

message Descriptor {
Copy link
Member Author

Choose a reason for hiding this comment

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

@AkihiroSuda I couldn't figure out how to import this type from containerd's proto definitions and not break compilation. Maybe you have better ideas on how to make it work so this duplication is not needed. I think the issue is that containerd uses Protobuild with some override mapping for import rules?

Copy link
Member

Choose a reason for hiding this comment

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

I think duplicating the Descriptor definition is fine.
The duplicated amount is small, and the definition is unlikely going to be changed in a decade.

Also, I guess we can dedupe this later without breaking the compatibility?

Copy link
Member Author

Choose a reason for hiding this comment

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

This also means that we would need to convert between different variants of descriptor on create and parse. To actually download the blob I'm planning to just enable the contentstore methods in control api. This means that either I will run into the same issue or some of the API endpoints will use one descriptor type and some the other.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi changed the title [wip] add build history APIs add build history APIs Nov 23, 2022
@tonistiigi tonistiigi marked this pull request as ready for review November 23, 2022 08:02
@tonistiigi
Copy link
Member Author

Moved this out of draft. This is only the first PR. Support for more properties and status stream for completed builds to follow.

@tonistiigi tonistiigi merged commit 7e14bbd into moby:master Nov 23, 2022
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.

Proposal: Add APIs for retrieving build history
3 participants