Commit graph

2416 commits

Author SHA1 Message Date
Troels Thomsen
1935c8d50b Return early to prevent nil pointer dereference
Signed-off-by: Troels Thomsen <troels@thomsen.io>
2017-04-27 14:59:37 +02:00
Derek McGowan
f4a1d3e0d5 Merge pull request #2230 from tt/support-session-token
Support session token
2017-04-26 12:53:50 -07:00
Troels Thomsen
7f510ae9c9 Support session token
Signed-off-by: Troels Thomsen <troels@thomsen.io>
2017-04-25 19:31:50 +02:00
Derek McGowan
e85ef3c019 Merge pull request #2253 from stevvooe/allow-more-digest-alg-separators
reference: allow more than 1 digest algorithm separator
2017-04-25 09:30:17 -07:00
Stephen J Day
3da015f8aa
reference: allow more than 1 digest algorithm separator
This updates the grammar to allow more than one digest algorithm
separator, matching the regular expression and intended grammar.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-04-24 15:14:12 -07:00
Stephen Day
c3e06c6069 Merge pull request #2239 from stevvooe/use-request-context
register/handlers: remove context manager
2017-04-10 16:14:28 -07:00
Stephen J Day
818ba4babf
vendor: update gorilla/mux to be compatible with Go 1.7
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-04-10 15:27:42 -07:00
Stephen J Day
1f0a9dbca0
register/handlers: remove context manager
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-04-10 15:27:30 -07:00
Stephen Day
a73ed75f5a Merge pull request #2241 from dmcgowan/vendor-fix
Update vendor directory to match expectation of vndr tool
2017-04-10 14:08:28 -07:00
Derek McGowan
b22c6b7a4e Update vendor directory to match expectation of vndr tool
Adds READMEs and enforces vendor is done at repository root

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-04-10 12:07:32 -07:00
Stephen Day
7b9ebdc54f Merge pull request #2215 from AlvinFeng/expires
Remove expires tag from s3 upload
2017-04-07 12:14:10 -07:00
Derek McGowan
0dd6ca97af Merge pull request #2238 from SantiagoTorres/fix_readme_broken_link
DOC: README: Fix broken link in migrator
2017-04-06 10:25:25 -07:00
Santiago Torres
364d2e4a5b
DOC: README: Fix broken link in migrator
A stray space in the link for the migrator repository wasn't allowing it
to be rendered properly in markdown viewers. Remove such a space to
avoid this.

Signed-off-by: Santiago Torres-Arias <torresariass@gmail.com>
2017-04-05 19:22:18 -04:00
Derek McGowan
0700fa570d Merge pull request #2219 from dmcgowan/fix-forwarded-logic
Fix forwarded logic
2017-03-21 10:14:25 -07:00
Derek McGowan
81a47d9766 Remove support for X-Forwarded-Port
Partially reverts change adding support for X-Forwarded-Port.
Changes the logic to prefer the standard Forwarded header over
X-Forwarded headers. Prefer forwarded "host" over "for" since
"for" represents the client and not the client's request.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-20 16:13:33 -07:00
Troels Thomsen
d4c3e88426
Add test for precendence with standard port
Signed-off-by: Troels Thomsen <troels@thomsen.io>
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-20 16:10:44 -07:00
Derek McGowan
11c74e07e0 Merge pull request #2218 from aaronlehmann/restore-vendor-dir
Makefile: Restore vendor directory after dep-validate
2017-03-20 11:28:17 -07:00
Derek McGowan
d2da3173db Merge pull request #2217 from aaronlehmann/fix-vendor-validation
Fix vendor validation
2017-03-20 11:28:00 -07:00
Aaron Lehmann
299b90b0bd Makefile: Restore vendor directory after dep-validate
Currently, this target makes changes to the vendor directory, which may
overwrite local changes or cause build errors. It's better to restore
the original vendor directory after running the check.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-03-20 11:12:03 -07:00
Aaron Lehmann
f6c62456b8 Fix vendor validation
The dep-validate target appears to never get invoked. In the CircleCI
build environment, "master" points to the commit under test. The
circle.yml fragment needs to compare again "origin/master" instead.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-03-20 11:11:10 -07:00
Derek McGowan
29e5cd5304 Merge pull request #2216 from fate-grand-order/fixed
fix some typos in notifications/event.go and sinks.go
2017-03-20 10:23:09 -07:00
fate-grand-order
eaf60fffee fix some typos in notifications/event.go and sinks.go
Signed-off-by: fate-grand-order <chenjg@harmonycloud.cn>
2017-03-20 20:23:11 +08:00
Alvin Feng
45bb7c9cc9 Remove expires tag from s3 upload
Signed-off-by: Alvin Feng <alvin4feng@yahoo.com>
2017-03-17 23:41:15 +00:00
Derek McGowan
08b06dc023 Merge pull request #2203 from clnperez/manifest-url-err
Better error message for BuildManifestURL if not tagged or digested
2017-03-03 13:22:46 -08:00
Derek McGowan
4ac39769dc Merge pull request #2155 from dmcgowan/update-release-checklist
Update release checklist with further details
2017-03-03 10:17:23 -08:00
Derek McGowan
d7905dc725 Merge pull request #2200 from fate-grand-order/fixed
fix typos in comment
2017-03-03 10:04:35 -08:00
Christy Perez
0810eba2ad Better error message for BuildManifestURL if not tagged or digested
Since there's no default case, if there's not a tag or digest you get
back a confusing error from the router about it not matching the
expected pattern.

Also redoing the tests for URLs a bit so that they can handle checking
for failures.

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
2017-03-02 11:27:23 -06:00
fate-grand-order
3161f9d1fd fix typos in comment
Signed-off-by: fate-grand-order <chenjg@harmonycloud.cn>
2017-02-27 14:06:18 +08:00
Derek McGowan
50133d6372 Merge pull request #2195 from fate-grand-order/fixed
Use errors.New() to output the error message and fix some typos
2017-02-21 11:08:14 -08:00
fate-grand-order
6a8e2ca84f Use errors.New() to output the error message and fix some typos
Signed-off-by: fate-grand-order <chenjg@harmonycloud.cn>
2017-02-20 10:39:58 +08:00
Derek McGowan
df5327f76f Merge pull request #2187 from nwt/notifications-fix-expvar
notifications: fix expvar for Go 1.7
2017-02-17 11:36:21 -08:00
Derek McGowan
4f87c80073 Merge pull request #2192 from uhayate/refactor-code-style
refactor the code style in distribution/registry/storage/driver/s3-goamz/s3.go
2017-02-15 17:12:16 -08:00
Noah Treuhaft
9a58c91051 notifications: fix expvar for Go 1.7
Remove EndpointConfig.Transport from the return value of the
registry.notifications.endpoints expvar.Func.  It results in an empty
value for that expvar variable under Go 1.7 because it is a non-nil
*http.Transport, which Go 1.7 can no longer encode as JSON.

Signed-off-by: Noah Treuhaft <noah.treuhaft@docker.com>
2017-02-14 10:51:20 -08:00
Aaron Lehmann
62d8d910b5 Merge pull request #2184 from sakeven/master
Check whether must use v4 auth in specific aws region ( storage driver s3-goamz )
2017-02-13 22:29:02 -08:00
sakeven
72bdf0e320 check whether must use v4 auth in specific aws region
Signed-off-by: sakeven <jc5930@sina.cn>
2017-02-14 10:42:20 +08:00
Aaron Lehmann
b38e5838b7 Merge pull request #2185 from yongtang/29936-validate-insecure-registry
Expose `DomainRegexp` from reference
2017-02-13 11:48:09 -08:00
uhayate
75c2e524a1 refactor the code style in distribution/registry/storage/driver/s3-goamz/s3.go
Signed-off-by: uhayate <uhayate.gong@daocloud.io>
2017-02-13 17:29:08 +08:00
Yong Tang
95daa793b8 Expose DomainRegexp from reference
This fix is based on:
https://github.com/docker/docker/pull/30746#discussion_r99650885

The goal is to reuse the `DomainRegexp` in docker to check
for `<host>:<port>` pattern.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-07 17:43:28 -08:00
Derek McGowan
b1993c9530 Merge pull request #2179 from Windfarer/master
Fixing acronym's case
2017-02-07 14:24:14 -08:00
Eric Yang
2d20471cd7 fixing acronyms case
Signed-off-by: Eric Yang <qizhao.yang@daocloud.io>
2017-01-31 01:29:30 +08:00
Aaron Lehmann
fb0bebc4b6 Merge pull request #2176 from stevvooe/clean-empty-blob-comments
registry/storage: clean up zero-length blob comments
2017-01-27 15:42:54 -08:00
Stephen J Day
7f565ed65a
registry/storage: clean up zero-length blob comments
A previous inspection of the code surrounding zero-length blobs led to
some interesting question. After inspection, it was found that the hash
was indeed for the empty string (""), and not an empty tar, so the code
was correct. The variable naming and comments have been updated
accordingly.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-01-27 15:28:30 -08:00
Derek McGowan
545102ea07 Merge pull request #2173 from aaronlehmann/tagnameonly
reference: Replace EnsureTagged with TagNameOnly
2017-01-26 14:35:53 -08:00
Aaron Lehmann
245ca4659e reference: Replace EnsureTagged with TagNameOnly
The common use case for this function is to add a default tag if the
reference only has a name. The current behavior only adds the default
tag if there is no *tag*, which requires most callers to check for a
digest. Change the behavior to only add default tags to name-only
references, and change the name to reflect this. The documentation
already described the new behavior, so it does not need to be changed.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-26 11:46:00 -08:00
Derek McGowan
7a0972304e Merge pull request #2167 from dmcgowan/fix-digest-reference-recursion
Fix recursion with digest String
2017-01-20 12:22:10 -08:00
Derek McGowan
69bdac7eff
Fix recursion with digest String
Update check for equal references to call the String method

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-20 11:38:07 -08:00
Derek McGowan
56b712f454 Merge pull request #2161 from dmcgowan/fix-test-panic
Update handler test to use WithName
2017-01-19 16:47:40 -08:00
Derek McGowan
1bcc73251d
Update handler test to use WithName
Fix test panic in handler test.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-01-19 15:21:40 -08:00
Derek McGowan
96b02e885a Merge pull request #2158 from fate-grand-order/master
fix misspell "lexicographically" in registry.go
2017-01-18 22:24:00 -08:00
fate-grand-order
e37d23c8a9 fix misspell "lexicographically" in registry.go
Signed-off-by: fate-grand-order <chenjg@harmonycloud.cn>
2017-01-19 10:42:04 +08:00