Commit Graph

4880 Commits

Author SHA1 Message Date
Milos Gajdos 97b1d649c4
Merge pull request #3900 from laurazard/add-zstd-compression
Support ztsd compression as Content-Encoding
2023-06-01 14:38:03 +01:00
Milos Gajdos f45d6d9ecf
Merge pull request #3933 from dvdksn/docs/registry-mirror-url
docs: note restriction on URL format of mirrors
2023-06-01 14:37:36 +01:00
Laura Brehm afe5a2a9b7 Support ztsd compression as Content-Encoding
Co-authored-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-06-01 14:06:25 +01:00
Milos Gajdos 5902a24fd0
Merge pull request #3929 from flavianmissi/fix-gcs-oss-file-writer
Fix gcs storage driver

Thanks to @jmontleon who laid the first bricks in #3702
2023-06-01 09:56:57 +01:00
David Karlsson 9d1f71c801 docs: note restriction on URL format of mirrors
Signed-off-by: David Karlsson <david.karlsson@docker.com>
2023-05-31 20:20:52 +02:00
Flavian Missi 817dd286c1 vendor: update gcs driver dependencies files
Signed-off-by: Flavian Missi <fmissi@redhat.com>
2023-05-31 09:28:43 +02:00
Flavian Missi 695102895b go.mod: update gcs driver dependencies
Signed-off-by: Flavian Missi <fmissi@redhat.com>
2023-05-31 09:28:37 +02:00
Flavian Missi 0207adaa5c registry/storage/driver/gcs: fix code to use updated gcs driver
Signed-off-by: Flavian Missi <fmissi@redhat.com>
2023-05-31 09:28:03 +02:00
Flavian Missi d0bc83d8e4 registry/storage/driver: receive context on Cancel methods
both oss and gcs driver were missing the context parameter that is
required to satisfy the storagedriver.FileWriter interface.

Signed-off-by: Flavian Missi <fmissi@redhat.com>
2023-05-31 09:14:51 +02:00
Milos Gajdos ba46c769b3
Merge pull request #3932 from flavianmissi/fix-azure-test-parameters
registry/storage/driver: test call to Stat(ctx, "/")
2023-05-30 21:49:32 +01:00
Flavian Missi 0d20e7ae9e registry/storage/driver/testsuites: use 4MB for Azure append test
Fixes #3931.

Signed-off-by: Flavian Missi <fmissi@redhat.com>
2023-05-30 15:12:08 +02:00
Flavian Missi 0c33bb1092 registry/storage/driver/azure: consider CannotVerifyCopySource as 404
Azure will return CannotVerifyCopySource with a 404 status code from a
call to Move when the source blob does not exist.
Details: https://learn.microsoft.com/en-us/rest/api/storageservices/blob-service-error-codes.

This fixes the TestMoveNonexistent test case for the Azure driver.

Signed-off-by: Flavian Missi <fmissi@redhat.com>
2023-05-30 15:12:08 +02:00
Flavian Missi d2e16fc74a registry/storage/driver/azure: fix driver parameters on tests
fixes "azure: no Host in request URL" tests failure, allowing azure
driver tests to run.

Signed-off-by: Flavian Missi <fmissi@redhat.com>
2023-05-30 15:12:08 +02:00
Flavian Missi 90ece48d77 registry/storage/driver: add test call to Stat on "/"
Stat(ctx, "/") is called by the registry healthcheck.
Also fixes blob name building in the Azure driver so it no longer
returns empty blob names. This was causing errors in the healthcheck
call to Stat for Azure.

Signed-off-by: Flavian Missi <fmissi@redhat.com>
2023-05-30 15:12:00 +02:00
Milos Gajdos 3f6bf09069
Merge pull request #3916 from flavianmissi/bump-azure-sdk
bump azure sdk
2023-05-29 16:44:48 +01:00
Milos Gajdos 0610484e62
Merge pull request #3930 from splucs/fix-s3-walk-prev-dir
Fix panic in the s3 backend walk logic
2023-05-29 16:27:54 +01:00
Lucas França de Oliveira 035a8ec52a
Fix panic in the s3 backend walk logic
Signed-off-by: Lucas França de Oliveira <lucasfdo@palantir.com>
2023-05-25 14:56:05 -07:00
Flavian Missi 7caf058a65
bump azure sdk
v1.3.0 of azidentity introduces support to workload identity.

Signed-off-by: Flavian Missi <fmissi@redhat.com>
2023-05-22 09:05:35 +02:00
Milos Gajdos 983358f8e2
Merge pull request #3896 from pluralsh/clean-blobstore-rebase
Remove blobstore from manifest builder
2023-05-19 15:05:16 +01:00
David van der Spek f3eb91cf85 Update testutil/manifests.go
Co-authored-by: Kyle Squizzato <ksquizz@gmail.com>
Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
2023-05-19 13:47:17 +00:00
glefloch 61e576f3d0 Remove blobstore from manifest builder
Signed-off-by: glefloch <glfloch@gmail.com>
Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
2023-05-19 13:47:17 +00:00
Milos Gajdos f7717b7855
Merge pull request #3917 from ecormaksin/ecormaksin/patch-2 2023-05-11 17:37:43 +01:00
Makoto Oda 6a4296128a `vallye` typo again and `ignore` section table layout is broken
Signed-off-by: Makoto Oda <truth_jp_4133@yahoo.co.jp>
2023-05-11 23:42:29 +09:00
Milos Gajdos 8e29e870a4
Merge pull request #3910 from thaJeztah/fix_releaser_filenames
Dockerfile: fix filenames of artifacts
2023-05-09 23:39:58 +01:00
Sebastiaan van Stijn 435c7b9a7b
Dockerfile: fix filenames of artifacts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-10 00:26:02 +02:00
Milos Gajdos f55a6552b0
Merge pull request from GHSA-hqxw-f8mx-cpmw
Fix runaway allocation on /v2/_catalog
2023-05-09 21:21:54 +01:00
Milos Gajdos 2b13387884
Merge pull request #3898 from ecormaksin/patch-1
Update configuration.md
2023-05-09 17:05:25 +01:00
Milos Gajdos ada0064ab9
Merge pull request #3905 from thaJeztah/bump_go_1.19.9
update to go1.19.9
2023-05-09 16:45:31 +01:00
Makoto Oda 5d301a9b3b
Update configuration.md
I think that `valye` is typo.

Signed-off-by: Makoto Oda <truth_jp_4133@yahoo.co.jp>
2023-05-09 17:40:20 +02:00
Sebastiaan van Stijn 322eb4eecf
update to go1.19.9
Added back minor versions in these, so that we have a somewhat more
reproducible state in the repository when tagging releases.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 17:29:31 +02:00
Milos Gajdos 681d7dcbb3
Merge pull request #3906 from thaJeztah/update_golangci_lint
update golangci-lint to v1.52, fix linting issues
2023-05-09 16:21:02 +01:00
Milos Gajdos 4fd8ad520d
Merge pull request #3904 from thaJeztah/update_xx
Dockerfile: update xx to v1.2.1
2023-05-09 15:20:12 +01:00
Sebastiaan van Stijn dec03ea3d8
update golangci-lint to v1.52
Removing the "structcheck" and "varcheck" linters as they've been deprecated.

    level=warning msg="[runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
    level=warning msg="[runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 16:04:17 +02:00
Sebastiaan van Stijn ebe9d67446
ignore SA1019: ac.(*accessController).rootCerts.Subjects has been deprecated
We need to look into this; can we remove it, or is there a replacement?

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 16:04:17 +02:00
Sebastiaan van Stijn 84a85a4048
Ignore SA1019: SplitHostname is deprecated.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 16:04:17 +02:00
Sebastiaan van Stijn 999527f978
Ignore SA1019: "schema1 is deprecated" linting errors
We need to use this for backward compatibility.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 16:04:17 +02:00
Sebastiaan van Stijn 3c144f2264
registry/auth/token: fix the surrounding loop is unconditionally terminate
registry/auth/token/types_test.go:83:3: SA4004: the surrounding loop is unconditionally terminated (staticcheck)
                   return
                   ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 16:04:17 +02:00
Sebastiaan van Stijn 4052d269f5
reference, registry: fix loop variable captured by func literal (govet)
reference/normalize_test.go:274:40: loopclosure: loop variable r captured by func literal (govet)
                                   named, err := ParseNormalizedNamed(r)
                                                                      ^
    reference/normalize_test.go:276:29: loopclosure: loop variable r captured by func literal (govet)
                        t.Fatalf("ref=%s: %v", r, err)
                                               ^
    registry/api/errcode/errors_test.go:45:7: loopclosure: loop variable ec captured by func literal (govet)
                if ec != desc.Code {
                   ^
    registry/api/errcode/errors_test.go:46:66: loopclosure: loop variable ec captured by func literal (govet)
                    t.Fatalf("error code in descriptor isn't correct, %q != %q", ec, desc.Code)
                                                                                 ^
    registry/api/errcode/errors_test.go:49:23: loopclosure: loop variable desc captured by func literal (govet)
                if idToDescriptors[desc.Value].Code != ec {
                                   ^
    registry/api/errcode/errors_test.go:50:80: loopclosure: loop variable desc captured by func literal (govet)
                    t.Fatalf("error code in idToDesc isn't correct, %q != %q", idToDescriptors[desc.Value].Code, ec)
                                                                                               ^
    registry/api/errcode/errors_test.go:53:7: loopclosure: loop variable ec captured by func literal (govet)
                if ec.Message() != desc.Message {
                   ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 16:04:08 +02:00
Milos Gajdos c9b844e533
Merge pull request #3885 from thaJeztah/rename_table_tests
assorted test updates
2023-05-09 13:58:29 +01:00
Sebastiaan van Stijn f03d966ef7
cloudfront: use consistent names for test-tables, t.Parallel()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 14:39:58 +02:00
Sebastiaan van Stijn 5301ae14bf
cloudfront: rename vars that collided with type
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 14:00:17 +02:00
Sebastiaan van Stijn 85028a801b
registry/handlers: use consistent names for test-tables
Also marked assertBlobUploadStateEquals as t.Helper()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 14:00:17 +02:00
Sebastiaan van Stijn f4acd98865
registry/api/v2: checkTestRouter(): use sub-tests, t.Parallel()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 14:00:05 +02:00
Sebastiaan van Stijn 2444c3282d
registry/api/v2: use consistent names for test-tables
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 13:55:16 +02:00
Sebastiaan van Stijn 9266220c2a
registry/auth/token: TestAudienceList_Unmarshal: t.Parallel()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 13:55:16 +02:00
Sebastiaan van Stijn 5e67a40e08
registry/auth/token: use consistent names for test-tables
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 13:55:16 +02:00
Sebastiaan van Stijn f884a079df
registry/api/errorcode: TestErrorCodes: use sub-tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 13:55:11 +02:00
Sebastiaan van Stijn 57f9f31af9
notifications: don't use un-keyed structs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 13:54:38 +02:00
Sebastiaan van Stijn e9ac1728e6
notifications: use consistent names for test tables
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 13:54:38 +02:00
Sebastiaan van Stijn f4be328bff
context: TestWithTrace(): inline checkContextForValues, use sub-tests
checkContextForValues was effectively running sub-tests, but disguided
as a helper (to DRY). While it helped some duplication, rewriting it to
run subtests within a helper also was a bit confusing, so just inline
what it does.

While updating, also run tests with t.Parallel()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-09 13:54:37 +02:00