-
Notifications
You must be signed in to change notification settings - Fork 518
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
history: add export command #3073
base: master
Are you sure you want to change the base?
Conversation
032bd84
to
dbcbaa0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When exporting a build record and importing it back, the name is not the same:
I think this is because we don't check the local state for imported builds in desktop-build backend on Docker Desktop. Maybe we could set the builder and node name as annotation in the export bundle so we can look if a local state exists for this ref? WDYT?
commands/history/export.go
Outdated
cmd := &cobra.Command{ | ||
Use: "export [OPTIONS] [REF]", | ||
Short: "Export a build into Docker Desktop bundle", | ||
Args: cobra.MaximumNArgs(1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want feature parity with export-build tool, I think we should allow multiple refs to be exported. This is needed for GHA case when exporting bake builds.
Also the export-build exports all records for the builder being used if no refs are set but I think to be consistent with other history commands this is fine to export the first one. So maybe we could have an --all
flag for such case?
|
||
cmd := &cobra.Command{ | ||
Use: "export [OPTIONS] [REF]", | ||
Short: "Export a build into Docker Desktop bundle", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if "Docker Desktop" should be stipulated here. I think the following is enough:
Short: "Export a build into Docker Desktop bundle", | |
Short: "Export build records", |
or
Short: "Export a build into Docker Desktop bundle", | |
Short: "Export build records bundle", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also there are some places where we talk about build and other build record. I think we should be consistent:
buildx/commands/history/import.go
Line 123 in 18ccba0
Short: "Import a build into Docker Desktop", |
Import build records into Docker Desktop
buildx/commands/history/logs.go
Line 101 in 18ccba0
Short: "Print the logs of a build", |
Print the logs of a build record
buildx/commands/history/open.go
Line 60 in 18ccba0
Short: "Open a build in Docker Desktop", |
Open a build record in Docker Desktop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if "Docker Desktop" should be stipulated here. I think the following is enough:
It kind of shows what you can do with the bundle file.
Added support for |
e341cbc
to
37dc0f0
Compare
Allow builds to be exported into .dockerbuild bundles that can be shared and imported into Docker Desktop. Signed-off-by: Tonis Tiigi <[email protected]>
367fc9c
to
3e56b2e
Compare
Signed-off-by: Tonis Tiigi <[email protected]>
3e56b2e
to
45dfb84
Compare
Allow builds to be exported into .dockerbuild bundles that can be shared and imported into Docker Desktop.