mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
Revert "Merge pull request #16228 from duglin/ContextualizeEvents"
Although having a request ID available throughout the codebase is very valuable, the impact of requiring a Context as an argument to every function in the codepath of an API request, is too significant and was not properly understood at the time of the review. Furthermore, mixing API-layer code with non-API-layer code makes the latter usable only by API-layer code (one that has a notion of Context). This reverts commitde41640435, reversing changes made to7daeecd42d. Signed-off-by: Tibor Vass <tibor@docker.com> Conflicts: api/server/container.go builder/internals.go daemon/container_unix.go daemon/create.go
This commit is contained in:
+4
-5
@@ -1,7 +1,6 @@
|
||||
package daemon
|
||||
|
||||
import (
|
||||
"github.com/docker/docker/context"
|
||||
"github.com/docker/docker/image"
|
||||
"github.com/docker/docker/runconfig"
|
||||
)
|
||||
@@ -19,10 +18,10 @@ type ContainerCommitConfig struct {
|
||||
|
||||
// Commit creates a new filesystem image from the current state of a container.
|
||||
// The image can optionally be tagged into a repository.
|
||||
func (daemon *Daemon) Commit(ctx context.Context, container *Container, c *ContainerCommitConfig) (*image.Image, error) {
|
||||
func (daemon *Daemon) Commit(container *Container, c *ContainerCommitConfig) (*image.Image, error) {
|
||||
if c.Pause && !container.isPaused() {
|
||||
container.pause(ctx)
|
||||
defer container.unpause(ctx)
|
||||
container.pause()
|
||||
defer container.unpause()
|
||||
}
|
||||
|
||||
rwTar, err := container.exportContainerRw()
|
||||
@@ -47,6 +46,6 @@ func (daemon *Daemon) Commit(ctx context.Context, container *Container, c *Conta
|
||||
return img, err
|
||||
}
|
||||
}
|
||||
container.logEvent(ctx, "commit")
|
||||
container.logEvent("commit")
|
||||
return img, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user