1
0
mirror of https://github.com/distribution/distribution synced 2024-11-12 05:45:51 +01:00
Commit Graph

5235 Commits

Author SHA1 Message Date
Hayley Swimelar
c087d1956f
update: remove gcs storage driver build tags (#4186) 2023-12-11 08:11:54 -08:00
Milos Gajdos
1054d157bf
update: remove gcs storage driver build tags
GCS storage driver used to be conditionally built due to its being
outdated and basically unmaintained. Recently the driver has gone
through a rework and updates. Let's remove the build tag so we have less
headaches dealing with it and try keeping it up to date.

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-12-10 09:09:52 +00:00
Milos Gajdos
04e3bdaa7c
update: bump Go version (#4176) 2023-12-06 10:56:51 +00:00
Milos Gajdos
f3ba0acd24
update: bump Go runtime to 1.21.5 and the rest to latest 1.20
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-12-06 10:32:40 +00:00
Milos Gajdos
60e7e87889
vendor: github.com/spf13/cobra v1.8.0 (#4182) 2023-12-01 12:09:15 +00:00
Milos Gajdos
8a0c1b754f
update: AWS Go SDK bump to the latest release (#4177) 2023-12-01 11:33:09 +00:00
Milos Gajdos
6f84e87803
update: AWS Go SDK bump to the latest release
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-12-01 11:24:44 +00:00
Sebastiaan van Stijn
1f6afab6e0
vendor: github.com/spf13/cobra v1.8.0
updating to current version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-01 12:05:31 +01:00
Milos Gajdos
a2613975a1
vendor: github.com/sirupsen/logrus v1.9.3 (#4179) 2023-12-01 10:51:38 +00:00
Milos Gajdos
3b58737bb6
vendor: github.com/gorilla/mux v1.8.1 (#4180) 2023-12-01 10:51:20 +00:00
Milos Gajdos
641306d946
vendor: github.com/klauspost/compress v1.17.4 (#4181) 2023-12-01 10:51:07 +00:00
Sebastiaan van Stijn
79976446f7
vendor: github.com/klauspost/compress v1.17.4
newer versions continue to include performance improvements, so it's good
to stay up-to-date.

full diff: https://github.com/klauspost/compress/compare/v1.16.5...v1.17.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-01 10:33:39 +01:00
Sebastiaan van Stijn
db187ae55c
vendor: github.com/gorilla/mux v1.8.1
full diff: https://github.com/gorilla/mux/compare/v1.8.0...v1.8.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-01 10:26:51 +01:00
Sebastiaan van Stijn
d6dd652f5a
vendor: github.com/sirupsen/logrus v1.9.3
full diff: https://github.com/sirupsen/logrus/compare/v1.8.1...v1.9.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-01 10:21:44 +01:00
Milos Gajdos
2cf416400e
update: missed the CI workflow
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-12-01 08:58:46 +00:00
Milos Gajdos
f08898c2c3
update: bump Go version
It'd appear 1.20.10 is triggering some scanner alerts.
Though these are not critical, it costs us very little effort to bump
the runtime one minor version higher.

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-12-01 08:33:35 +00:00
Milos Gajdos
d5a1cf6816
cleanup: move init funcs to the top of the source (#4172) 2023-12-01 06:59:35 +00:00
Milos Gajdos
30b642ebf6
feat: add tparallel linter to improve handling (parallel) tests (#4173) 2023-11-30 07:11:37 +00:00
Milos Gajdos
b3681c4cd3
feat: add tparallel linter to improve handling parallel tests
This linter both prevents parallel test races as well as
suggests parallel tests where appropriate:
See: https://github.com/moricho/tparallel

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-11-29 21:40:20 +00:00
Milos Gajdos
f71b32894a
remove uuid package (#4157) 2023-11-29 17:42:51 +00:00
Milos Gajdos
d8ff41a344
cleanup: move init funcs to the top of the source
We make sure they're not hiding at the bottom or in the middle
which makes debugging an utter nightmare!

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-11-28 06:50:48 +00:00
Milos Gajdos
d9abc517e8
Plumb contexts into health checks (#4141) 2023-11-27 20:54:02 +00:00
Cory Snider
f2cbfe2402 health: improve periodic polling of checks
The API for periodic health checks is repetitive, with a distinct
function for polling a checker to each kind of updater. It also gives
the user no control over the lifetime of the polling goroutines nor
which context is passed into the checker.

Replace the existing PeriodicXYZChecker functions with a single Poll
function which composes an Updater with a Checker. Its context parameter
is passed into the checker and also controls when the polling loop
terminates. To guard against health checks failing closed (ostensibly
healthy) when the polling loop is terminated, the updater is forcefully
updated to an error status, overriding any configured threshold.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-11-27 15:38:35 -05:00
Cory Snider
a1b49d3d17 health: plumb contexts into health checks
Allow health checkers to abort if the request context is canceled.
Modify the checkers to respect context cancelation and return wrapped
errors so the caller of CheckStatus() would be able to discriminate true
failed checks from checks which were aborted because the context became
done.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-11-27 15:38:34 -05:00
Cory Snider
8b889c04bd health: use request context when logging
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-11-27 15:37:13 -05:00
Milos Gajdos
97f8a6c959
fix: if reference exceeds max threshold return 400 and detail (#4168) 2023-11-24 11:58:12 +00:00
Milos Gajdos
35abc92237
fix: if reference exceeds the threshold return 400 and detail
If the reference in the API request exceeds the threshold allowed by the
reference package (NOTE: this isn't defined by distribution
specification!) we return 500 back to the client.

This commit makes sure we return 400 and the explanation of the error in
the returned JSON payload.

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-11-22 16:06:33 +00:00
João Pereira
96582fcfd9
fix: invalid conversion when using Content-Range in client (#4166) 2023-11-22 11:29:56 +00:00
Milos Gajdos
cd0ad552df
dockerfile: keep context mount as read only (#4167) 2023-11-22 11:01:39 +00:00
CrazyMax
d0b78f5e1c
dockerfile: keep context mount as read only
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2023-11-22 09:49:44 +01:00
Milos Gajdos
f33e5a69da
fix: invalid conversion when using Content-Range in client
Fixes: https://github.com/distribution/distribution/security/code-scanning/34

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-11-22 07:02:01 +00:00
Milos Gajdos
06505be5d5
build(deps): bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1 (#4165) 2023-11-22 05:18:18 +00:00
dependabot[bot]
b8b390f4cd
build(deps): bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1
Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Changelog](https://github.com/go-jose/go-jose/blob/v3/CHANGELOG.md)
- [Commits](https://github.com/go-jose/go-jose/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 22:25:08 +00:00
Milos Gajdos
62d826c705
docs: fix typo in mirror.md (#4163) 2023-11-21 14:30:49 +00:00
Jakub Mikulas
c90b0b2649
docs: fix typo in mirror.md
Signed-off-by: Jakub Mikulas <jakub@mikul.as>
2023-11-21 15:16:51 +01:00
João Pereira
17872ebbc0
feat(linter): enable errcheck linter in golangci-lint (#4158) 2023-11-21 11:57:34 +00:00
Milos Gajdos
13fe08d87b
Fix proxy statistics (#4045) 2023-11-20 10:22:14 +00:00
Milos Gajdos
7ce129d63b
feat(linter): enable errcheck linter in golangci-lint
Also, bump the linter version to the latest available version.

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-11-18 07:19:24 +00:00
Milos Gajdos
9610a1e618
refactor: gcs storage driver (#4120) 2023-11-17 13:06:07 +00:00
Milos Gajdos
e001fad0b5
refactor: gcs storage driver
This commit refactors the GCS storage driver from the ground up and makes
it more consistent with the rest of the storage drivers.

We are also fixing GCS authentication using default app credentials:
When the default application credentials are used we don't initialize the
GCS storage client which then panics.

Co-authored-by: Cory Snider <corhere@gmail.com>
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-11-17 12:57:35 +00:00
gotgelf
bb15625561 remove uuid package
the `uuid` package is not used in the code base,
so it can be safely remove.

Signed-off-by: Alex Gotgelf <gotgelf@gmail.com>
Signed-off-by: gotgelf <gotgelf@gmail.com>
2023-11-16 08:55:58 +01:00
Milos Gajdos
28c8bc6c0e
fix: fix broken build (#4150) 2023-11-03 16:30:34 +00:00
Milos Gajdos
7686bdc294
fix: fix broken build
For some reason a PR we merged passed the build even though it was
missing various func parameters. This commmit fixes it.

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-11-02 23:23:11 -07:00
Milos Gajdos
bd0e476910
Hide our misuses of contexts from the public interface (#4128) 2023-11-03 05:05:19 +00:00
Milos Gajdos
c1005c54a1
docs: remove unused go.mod (#4115) 2023-11-01 16:21:43 +00:00
Sebastiaan van Stijn
186d522da9
docs: remove unused go.mod
This go.mod was used to allow vendoring the docs with Hugo, but this
was never used, so we can remove the go.mod altogether.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-01 15:56:05 +01:00
Milos Gajdos
c1869cc7e7
cleanup: make byte sizes easier to understand (#4148) 2023-11-01 13:42:17 +00:00
Milos Gajdos
7430651536
cleanup: make blob sizes easier to understand
This is a followup to https://github.com/distribution/distribution/pull/4139

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
2023-10-31 14:53:02 -07:00
Milos Gajdos
ecb475a232
feat: push distribution images to GHCR (#4130) 2023-10-31 21:29:16 +00:00
Milos Gajdos
1d7526dea0
cleanup: make chunk sizes easier to understand and change writer append (#4139) 2023-10-31 19:47:06 +00:00