Commit Graph

19 Commits

Author SHA1 Message Date
GitLab Bot 6cd5b7dbfa Add latest changes from gitlab-org/gitlab@master 2019-09-19 11:50:12 +00:00
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
Thong Kuah d6a7408fd3
Explicitly reject non http(s) schemes
Rather than relying on NoMethodError deep inside faraday
2019-07-29 19:20:30 -03:00
Stan Hu a40116065e Support Docker OCI images
Docker Distribution v2.7.0 shipped with OCI support, but our container
registry client was not updated to handle the manifest format in the
HTTP `Accept` header.  As a result, API calls to retrieve a manifest
would return with an error, "OCI manifest found, but accept header does
not support OCI manifests". This would result in blank fields in the
container registry page and prevent tags from being deleted.

To fix this, we just need to add
`application/vnd.oci.image.manifest.v1+json` to the `Accept` header and
configure Faraday to parse the response as JSON. The response structure
is the same as the standard Docker Distribution V2 manifest.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58685

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/12877
2019-07-25 04:11:38 -07:00
gfyoung d598e4fd93 Enable more frozen string in lib/**/*.rb
Enables frozen for the following:

* lib/*.rb
* lib/banzai/**/*.rb
* lib/bitbucket/**/*.rb
* lib/constraints/**/*.rb
* lib/container_registry/**/*.rb
* lib/declarative_policy/**/*.rb

Partially addresses #47424.
2018-10-06 17:02:50 -07:00
Lin Jen-Shin 31b0097be0 Setup Faraday middleware before adapter
This eliminate the warnings:

WARNING: Unexpected middleware set after the adapter. This won't be supported from Faraday 1.0.
2018-03-16 19:05:29 +08:00
Stan Hu 831d6f5f77 Properly handle container registry redirects to fix metadata stored on a S3 backend
The previous behavior would include the Authorization header, which would
make fetching an S3 blob fail quietly.

Closes #22403

Update sh-fix-container-registry-s3-redirects.yml
2017-05-17 07:04:34 -07:00
Douwe Maan b7d8df503c Enable Style/MutableConstant 2017-02-23 09:31:56 -06:00
Kamil Trzcinski 2462a473c2 Make rubocop happy 2016-07-15 18:05:39 +02:00
Kamil Trzcinski 3e4dc164a7 Explicitly remove authorization token and make sure that invalid addresses are properly handled 2016-07-15 17:35:23 +02:00
Kamil Trzcinski a3d8a7e6be Allow blob to be redirected 2016-07-15 17:14:01 +02:00
Kamil Trzcinski 35319aa4ac Use response_body 2016-06-17 17:33:03 +02:00
Kamil Trzcinski 04ffd71e53 Fix regression introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4669
When requesting tags a `application/json` is used.
2016-06-17 13:24:50 +02:00
Kamil Trzcinski f30d1fdf94 Add support for Docker Registry manifest v1 2016-06-15 12:53:23 +02:00
Kamil Trzcinski 24145592e8 Provide full test coverage to lib/container_registry API implementation 2016-05-17 13:20:11 -05:00
Kamil Trzcinski 5c2f2fd289 Fix CI tests 2016-05-12 13:03:04 -05:00
Kamil Trzcinski d05f0030a3 Added Docker Registry View tests 2016-05-09 23:32:18 +03:00
Kamil Trzcinski b5043d5d33 Fix review comments 2016-05-09 22:34:24 +03:00
Kamil Trzcinski 08396be619 Rename ImageRegistry to ContainerRegistry 2016-05-09 22:14:46 +03:00