Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Add update command for backward compatibility #840

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

gtardif
Copy link
Contributor

@gtardif gtardif commented Oct 28, 2020

Signed-off-by: Guillaume Tardif guillaume.tardif@docker.com

What I did

  • Fix regression: cannot run command context update anymore

Related issue
#811

(not mandatory) A picture of a cute animal, if possible in relation with what you did

@gtardif gtardif requested a review from chris-crone October 28, 2020 09:08
@github-actions github-actions bot added the cli cli label Oct 28, 2020
@gtardif gtardif requested a review from ulyssessouza October 28, 2020 09:08
Copy link
Contributor

@chris-crone chris-crone left a comment

Choose a reason for hiding this comment

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

LGTM once nits are fixed

package context

import (
"github.com/docker/compose-cli/errdefs"
Copy link
Contributor

Choose a reason for hiding this comment

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

goimports

dockerContext, err := s.Get(name)
if err == nil && dockerContext != nil {
if dockerContext.Type() != store.DefaultContextType {
return errors.Wrap(errdefs.ErrNotImplemented, "context update not implemented for context type "+dockerContext.Type())
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: The current error will stutter with "context update not implemented for context type: not implemented"

Suggested change
return errors.Wrap(errdefs.ErrNotImplemented, "context update not implemented for context type "+dockerContext.Type())
return errors.Wrapf(errdefs.ErrNotImplemented, "context update for context type %q not supported", dockerContext.Type())

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
@gtardif gtardif force-pushed the fix_context_update branch from e6c6acd to 0250140 Compare October 28, 2020 13:26
@gtardif gtardif merged commit a6af33a into docker-archive:main Oct 28, 2020
@gtardif gtardif deleted the fix_context_update branch December 2, 2020 16:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cli cli
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants