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

buildctl: add buildctl debug histories, buildctl prune-histories #3498

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Jan 12, 2023

$ buildctl debug histories
TYPE            REF                             CREATED                         COMPLETED                       GENERATION      PINNED
COMPLETE        40d2kg3dqh8dflruacpyd7bdz       2023-01-13T18:35:33+09:00       2023-01-13T18:35:35+09:00       2               *
COMPLETE        ks37bedzwtb7446srrlnb28li       2023-01-13T18:38:06+09:00       2023-01-13T18:38:08+09:00       0
COMPLETE        mmsit25ck1w6qzcja5cdcstfx       2023-01-13T18:38:00+09:00       2023-01-13T18:38:05+09:00       1

$ buildctl prune-histories
TYPE            REF                             CREATED                         COMPLETED                       GENERATION
COMPLETE        ks37bedzwtb7446srrlnb28li       2023-01-13T18:38:06+09:00       2023-01-13T18:38:08+09:00       1
COMPLETE        mmsit25ck1w6qzcja5cdcstfx       2023-01-13T18:38:00+09:00       2023-01-13T18:38:05+09:00       1

@AkihiroSuda AkihiroSuda changed the title control: add ListBuildHistoriesRequest() control: add ListBuildHistories() Jan 12, 2023
@AkihiroSuda AkihiroSuda changed the title control: add ListBuildHistories() control: add ListBuildHistories(), PruneBuildHistories() Jan 12, 2023
@AkihiroSuda
Copy link
Member Author

This is a new feature, but I'd like to cherry-pick this into v0.11.x if possible

@AkihiroSuda AkihiroSuda force-pushed the list-refs branch 5 times, most recently from 6d97fe6 to 761318a Compare January 12, 2023 08:46
Copy link
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

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

Do we need a List? The streaming API has early-exit option if you don't want to block.

I think it is hard to justify cherry-pick because the APIs already exist for achieving this behavior. PruneBuildHistories can be replicated with a for loop afaics.

@AkihiroSuda AkihiroSuda marked this pull request as draft January 13, 2023 06:40
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda AkihiroSuda changed the title control: add ListBuildHistories(), PruneBuildHistories() buildctl: add buildctl debug histories, buildctl prune-histories Jan 13, 2023
@AkihiroSuda AkihiroSuda added the area/cli buildctl CLI label Jan 13, 2023
@AkihiroSuda AkihiroSuda marked this pull request as ready for review January 13, 2023 09:39
@AkihiroSuda
Copy link
Member Author

Updated, the PR no longer changes the API

@tonistiigi tonistiigi merged commit 959e6d6 into moby:master Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants