| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Trying to overwrite a digest with another digest is not allowed, and
cannot be forced.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
|
|
|
| |
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
|
|
|
| |
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
|
|
|
|
|
|
|
| |
These variables collided with the "repository" and "store" types declared
in this package. Rename the variables colliding with "repository", and
rename the "store" type to "refStore".
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
|
|
|
|
|
|
|
| |
I think this was there for historic reasons (may have been goimports expected
this, and we used to have a linter that wanted it), but it's not needed, so
let's remove it (to make my IDE less complaining about unneeded aliases).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
|
|
|
|
|
|
|
| |
The io/ioutil package has been deprecated in Go 1.16. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
|
|
|
|
| |
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
|
|
|
|
|
|
| |
full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
opts/env_test: suppress a linter warning
this one:
> opts/env_test.go:95:4: U1000: field `err` is unused (unused)
> err error
> ^
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
|
|
|
|
|
|
| |
Format the source according to latest goimports.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
|\
| |
| | |
Don't fail on two concurrent reference.store.AddDigest calls
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
reference.store.addReference fails when adding a digest reference
that already exists (regardless of the reference target). Both
callers (via reference.store.AddDigest) do check in advance, using
reference.store.Get, whether the digest reference exists before
calling AddDigest, but the reference store lock is released between
the two calls, so if another thread sets the reference in the meantime,
AddDigest may fail with
> Cannot overwrite digest ...
.
Handle this by checking that the pre-existing reference points at the
same image, i.e. that there is nothing to do, and succeeding immediately
in that case. This is even cheaper, avoids a reference.store.save() call.
(In principle, the same failure could have happened via
reference.store.AddTag, as
> Conflict: Tag %s is already set to image %s, if you want to replace it, please use -f option
but almost all callers (except for migrate/v1.Migrate, which is run
single-threaded anyway) set the "force" parameter of AddTag to true,
which makes the race invisible. This commit does not change the behavior
of that case, except for speeding it up by avoiding the
reference.store.save() call.)
The existing reference.store.Get checks are now, in a sense, redundant
as such, but their existence allows the callers to provide nice
context-dependent error messages, so this commit leaves them unchanged.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should eliminate a bunch of new (go-1.11 related) validation
errors telling that the code is not formatted with `gofmt -s`.
No functional change, just whitespace (i.e.
`git show --ignore-space-change` shows nothing).
Patch generated with:
> git ls-files | grep -v ^vendor/ | grep .go$ | xargs gofmt -s -w
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
|
|
|
|
| |
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
|
|
|
|
|
|
| |
remove unnescessary import aliases, brackets, and so on.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
|
|
|
|
|
| |
gty-migrate-from-testify --ignore-build-tags
Signed-off-by: Daniel Nephin <dnephin@docker.com>
|
|
|
|
| |
Signed-off-by: Daniel Nephin <dnephin@docker.com>
|
|
|
|
|
|
| |
Update gometalinter
Signed-off-by: Daniel Nephin <dnephin@docker.com>
|
|
|
|
|
|
| |
Also enable GC in linting to reduce memory usage.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
|
|
|
|
| |
Signed-off-by: John Howard <jhoward@microsoft.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use strongly typed errors to set HTTP status codes.
Error interfaces are defined in the api/errors package and errors
returned from controllers are checked against these interfaces.
Errors can be wraeped in a pkg/errors.Causer, as long as somewhere in the
line of causes one of the interfaces is implemented. The special error
interfaces take precedence over Causer, meaning if both Causer and one
of the new error interfaces are implemented, the Causer is not
traversed.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* additional
* ambiguous
* anonymous
* anything
* application
* because
* before
* building
* capabilities
* circumstances
* commit
* committer
* compresses
* concatenated
* config
* container
* container's
* current
* definition
* delimiter
* disassociates
* discovery
* distributed
* doesnotexist
* downloads
* duplicates
* either
* enhancing
* enumerate
* escapable
* exactly
* expect
* expectations
* expected
* explicitly
* false
* filesystem
* following
* forbidden
* git with
* healthcheck
* ignore
* independent
* inheritance
* investigating
* irrelevant
* it
* logging
* looking
* membership
* mimic
* minimum
* modify
* mountpoint
* multiline
* notifier
* outputting
* outside
* overridden
* override
* parsable
* plugins
* precedence
* propagation
* provided
* provides
* registries
* repositories
* returning
* settings
* should
* signals
* someone
* something
* specifically
* successfully
* synchronize
* they've
* thinking
* uninitialized
* unintentionally
* unmarshaling
* unnamed
* unreferenced
* verify
Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
|
|
|
| |
Signed-off-by: John Howard <jhoward@microsoft.com>
|
|
|
|
|
|
|
|
|
| |
If you remove an image with digest+tag, it will fail because it wont
find it in the reference store (where digest+tag -> digest). Let's
make sure we do the same in ImageDelete, stripping the tag if
digest+tag are present.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the switchover to the unified reference package, AddReference no
longer does the right thing when passed a reference that has both a
digest and a tag. It would put both the digest in the tag in the
reference stored in the repositories.json file, which isn't the right
format, and would mean that neither "docker run" nor docker services
could locate the image. This meant that a simple "docker service create"
command like "docker service create --name foo busybox top" would create
a service that immediately went into a restart loop, because it couldn't
use the image that had been pulled.
Fix AddReference to strip out the tag when both a tag and digest are
specified. We do this because we don't necessarily want to overwrite the
tag - when both a digest and tag are specified, the tag is only
advisory.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove forked reference package. Use normalized named values
everywhere and familiar functions to convert back to familiar
strings for UX and storage compatibility.
Enforce that the source repository in the distribution metadata
is always a normalized string, ignore invalid values which are not.
Update distribution tests to use normalized values.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
|
|
|
|
|
|
|
| |
Use resolving to repo info as the split point between the
legitimate reference package and forked reference package.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
|
|
|
|
|
|
|
|
| |
The `digest` data type, used throughout docker for image verification
and identity, has been broken out into `opencontainers/go-digest`. This
PR updates the dependencies and moves uses over to the new type.
Signed-off-by: Stephen J Day <stephen.day@docker.com>
|
|
|
| |
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
|
|
|
|
| |
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
|
|
|
|
|
|
|
| |
Handle updates to reference package.
Updates for refactoring of challenge manager.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
|
|
|
| |
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
|
|
|
|
| |
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
|
|
|
|
| |
Signed-off-by: allencloud <allen.sun@daocloud.io>
|
|
|
| |
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
|
|
|
|
|
|
|
|
| |
Fixes #20972
Also makes sure there is no check to registry if
no image is found for the prefixed IDs.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This PR makes restores the pre-Docker 1.10 behavior of allowing
uppercase characters in registry hostnames.
Note that this only applies to hostnames, not remote image names.
Previous versions also prohibited uppercase letters after the hostname,
but Docker 1.10 extended this to the hostname itself.
- Vendor updated docker/distribution.
- Add a check to "normalize" that rejects remote names with uppercase
letters.
- Add test cases to TestTagValidPrefixedRepo and
TestTagInvalidUnprefixedRepo
Fixes: #20056
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
|
|
|
|
| |
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
|
|
|
|
|
|
| |
Fixes #18093
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
|
|
|
|
| |
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
|
|
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
|