diff --git a/daemon/daemon_test.go b/daemon/daemon_test.go index 5ea954b49..6cdaca4b6 100644 --- a/daemon/daemon_test.go +++ b/daemon/daemon_test.go @@ -290,7 +290,7 @@ func TestDaemon_ListImagesWithOptions(t *testing.T) { { name: "Override container field selection", opts: v10.ListImagesOptions{ - Spec: specAll, + Spec: specAll, OverrideContainerFields: []string{"Name", "Current", "NewAvailableImagesCount"}, }, expectedImages: []v6.ImageStatus{ @@ -320,7 +320,7 @@ func TestDaemon_ListImagesWithOptions(t *testing.T) { { name: "Override container field selection with invalid field", opts: v10.ListImagesOptions{ - Spec: specAll, + Spec: specAll, OverrideContainerFields: []string{"InvalidField"}, }, expectedImages: nil, diff --git a/daemon/loop.go b/daemon/loop.go index daaf02851..386baebd7 100644 --- a/daemon/loop.go +++ b/daemon/loop.go @@ -321,7 +321,7 @@ func (d *Daemon) doSync(logger log.Logger) (retErr error) { Error: n.Result.Error(), }, Spec: event.ReleaseSpec{ - Type: event.ReleaseContainersSpecType, + Type: event.ReleaseContainersSpecType, ReleaseContainersSpec: &spec, }, Cause: n.Spec.Cause, @@ -411,23 +411,23 @@ func (d *Daemon) doSync(logger log.Logger) (retErr error) { } // Move the tag and push it so we know how far we've gotten. - { - ctx, cancel := context.WithTimeout(ctx, gitOpTimeout) - err := working.MoveSyncTagAndPush(ctx, newTagRev, "Sync pointer") - cancel() - if err != nil { - return err - } - } - if oldTagRev != newTagRev { + { + ctx, cancel := context.WithTimeout(ctx, gitOpTimeout) + err := working.MoveSyncTagAndPush(ctx, newTagRev, "Sync pointer") + cancel() + if err != nil { + return err + } + } logger.Log("tag", d.GitConfig.SyncTag, "old", oldTagRev, "new", newTagRev) - ctx, cancel := context.WithTimeout(ctx, gitOpTimeout) - err := d.Repo.Refresh(ctx) - cancel() - return err + { + ctx, cancel := context.WithTimeout(ctx, gitOpTimeout) + err := d.Repo.Refresh(ctx) + cancel() + return err + } } - return nil }