1
0
mirror of https://github.com/regclient/regclient.git synced 2025-04-18 22:44:00 +03:00

1529 Commits

Author SHA1 Message Date
Brandon Mitchell
f314dce647
Merge pull request #828 from sudo-bmitch/pr-update-20240929
Version bump
2024-09-29 21:11:08 -04:00
Brandon Mitchell
72788f7045
Version bump
- Update version-bump config for processors
- gomajor to v0.14.0
- gosec to v2.21.4
- syft to v1.13.0
- actions/checkout to v4.2.0
- docker/build-push-action to v6.8.0
- github/codeql-action to v3.26.9

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-09-29 21:08:01 -04:00
Brandon Mitchell
ac579c6147
Merge pull request #824 from sudo-bmitch/pr-update-20240922
Version bump
2024-09-22 16:49:43 -04:00
Brandon Mitchell
bd3ef81038
Version bump
- github/codeql-action to v3.26.8
- AWS credential helper to latest commit
- securego/gosec to v2.21.2

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-09-22 16:46:34 -04:00
Brandon Mitchell
bec3f01c98
Merge pull request #823 from sudo-bmitch/pr-update-20240915
Version bump
2024-09-15 13:59:44 -04:00
Brandon Mitchell
36d798dcc4
Version bump
- github/codeql-action to v3.26.7
- ECR Credential helper to latest commit
- google/osv-scanner to v1.8.5
- securego/gosec to v2.21.2
- anchore/syft to v1.12.2

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-09-15 13:56:13 -04:00
Brandon Mitchell
5e5e9dad2e
Merge pull request #822 from sudo-bmitch/pr-update-20240908
Version bump
2024-09-08 10:50:01 -04:00
Brandon Mitchell
9406c997b3
Version bump
- ECR Helper to latest commit
- GCloud Helper to v2.1.25
- securego/gosec to v2.21.1
- Alpine to 3.20.3
- Go to 1.23.1
- davidanson/markdonlint-cli2 to v0.14.0
- golang.org/x/sys to v0.25.0
- golang.org/x/term to v0.24.0

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-09-08 10:41:24 -04:00
Brandon Mitchell
8df25ef0f2
Merge pull request #821 from sudo-bmitch/pr-default-host-config
Feat: Add default host config
2024-09-06 17:17:06 -04:00
Brandon Mitchell
17434c3c7b
Feat: Add default host config
In regctl, this exposes a flag to set the default credential helper.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-09-06 17:00:46 -04:00
Brandon Mitchell
e3ff3554b7
Merge pull request #818 from sudo-bmitch/pr-update-20240902
Version bump
2024-09-02 08:38:54 -04:00
Brandon Mitchell
d5fc0054c1
Version bump
- actions/upload-artifact to v4.4.0
- github/codeql-action to v3.26.6
- ECR helper to latest commit

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-09-02 08:35:25 -04:00
Brandon Mitchell
fba814c3f8
Merge pull request #817 from sudo-bmitch/pr-throttle-rm
Chore: Remove throttle package
2024-08-30 14:07:01 -04:00
Brandon Mitchell
9dd3cf5b98
Chore: Remove throttle package.
This has been replace with pqueue.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-30 13:45:58 -04:00
Brandon Mitchell
82ba87ba7f
Merge pull request #816 from sudo-bmitch/pr-regbot-refactor-globals
Chore: Refactor to remove globals in regbot
2024-08-30 11:10:26 -04:00
Brandon Mitchell
dfef163cd5
Chore: Refactor to remove globals in regbot
This also removes another usage of the internal throttle package in preparation for its removal.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-30 11:03:49 -04:00
Brandon Mitchell
5a85daf010
Merge pull request #815 from sudo-bmitch/pr-regsync-refactor-globals
Chore: Refactoring to remove globals in regsync
2024-08-30 10:39:31 -04:00
Brandon Mitchell
057670b133
Chore: Refactoring to remove globals in regsync
This also removes another usage of the internal throttle package in preparation for its removal.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-30 10:35:24 -04:00
Brandon Mitchell
f2c19e9f8b
Merge pull request #814 from sudo-bmitch/pr-blob-cb-race
Fix: Prevent data race when reading blob and seeking
2024-08-28 17:00:41 -04:00
Brandon Mitchell
d6b815f3e0
Fix: Prevent data race when reading blob and seeking
A seek to the current location is used to monitor the progress, making it possible for the callback to panic from a data race.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-28 16:52:53 -04:00
Brandon Mitchell
12736dcb9c
Merge pull request #813 from sudo-bmitch/pr-config-throttle-refactor
Chore: Move throttle from config to reghttp
2024-08-27 16:21:57 -04:00
Brandon Mitchell
05adb86db3
Chore: Move throttle from config to reghttp
Breaking: config.Host.Throttle() has been removed. Use scheme.Throttler instead.

Ideally the config should only have static config values.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-27 16:11:42 -04:00
Brandon Mitchell
534ac2c110
Merge pull request #812 from sudo-bmitch/pr-resp-retry-limit
Feat: Limit number of retries for a request
2024-08-27 14:47:10 -04:00
Brandon Mitchell
0bd8ddef36
Feat: Limit number of retries for a request
The current retry limits are imposed at the host level. This change prevents a single request from too many retries for various reasons, including flaky connections and logic loops in the code.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-27 14:42:17 -04:00
Brandon Mitchell
4afcb733c3
Merge pull request #811 from sudo-bmitch/pr-update-20240825
Version bump
2024-08-25 14:28:28 -04:00
Brandon Mitchell
f44cc8e071
Version bump
- anchore/sbom-action to v0.17.2
- github/codeql-action to v3.26.5
- ECR helper to latest commit
- google/osv-scanner to v1.8.4

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-25 14:24:30 -04:00
Brandon Mitchell
cfcb9c9aca
Merge pull request #810 from sudo-bmitch/pr-dedup-warnings
Feat: Consolidate warnings
2024-08-22 17:01:24 -04:00
Brandon Mitchell
89be757fd0
Feat: Consolidate warnings
When a registry returns a warning header on every request, clients should try to consolidate these.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-22 16:52:40 -04:00
Brandon Mitchell
03e43f0674
Merge pull request #807 from sudo-bmitch/pr-update-20240820
Version bump
2024-08-20 16:24:22 -04:00
Brandon Mitchell
fc3ec9b1b5
Version bump
- actions/upload-artifact to v4.3.6
- anchore/sbom-action to v0.17.1
- docker/build-push-action to v6.7.0
- github/codeql-action to v3.26.3
- sigstore/cosign-installer to v3.6.0
- ECR credential helper to latest commit
- dominikh/go-tools to v0.5.1
- google/osv-scanner to v1.8.3
- sigstore/cosign to v2.4.0
- anchore/syft to v1.11.1
- Go to 1.21 - 1.23 (dropping 1.20 support)
- Zot to v2.1.1
- olareg to v0.1.1
- golang.org/x/sys to v0.24.0
- golang.org/x/term to v0.23.0

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-20 16:21:08 -04:00
Brandon Mitchell
f57b0637fe
Merge pull request #806 from sudo-bmitch/pr-reqpersec-test
Chore: Remove ReqPerSec in tests
2024-08-20 16:11:52 -04:00
Brandon Mitchell
4bd605f9ef
Chore: Remove ReqPerSec in tests
This is no longer needed to speed up tests since request per second does not have a default setting.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-20 16:08:19 -04:00
Brandon Mitchell
e6c9d20f48
Merge pull request #805 from sudo-bmitch/pr-auth-redirect
Fix: Support auth on redirect
2024-08-19 10:46:07 -04:00
Brandon Mitchell
10a645bdb3
Feat: Support auth on redirect
A registry server that is just a redirect to a real server that requires auth will now work.
Previously, auth was only sent to the first server, now it is only sent to the server that performed the auth.
The auth package itself was also refactored a bit, removing unneeded interfaces and reducing exported fields.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-19 10:36:46 -04:00
Brandon Mitchell
983d0a03bc
Merge pull request #803 from sudo-bmitch/pr-reghttp-refactor
Refactor networking layer
2024-08-17 17:01:29 -04:00
Brandon Mitchell
701464ffcf
Refactor: Move logging into transport and rework backoff
- Logging in transport allows better debugging of each request, including redirects
- Backoff redesign better handles failed requests and slows down all requests
- Default rate limit is now removed

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-17 11:36:58 -04:00
Brandon Mitchell
ab5cd7a37e
Refactor: Free up pqueue resources when last entry released
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-13 15:31:29 -04:00
Brandon Mitchell
b752cdf9c7
Configure priority queue algorithm and reorder image copy steps
- Priority queue algorithm prefers a small entry (non-blob API), and 50/50 split of largest and oldest queued entries.
- Image reorder starts the blob copies sooner to avoid blocking on the tag listing for referrers or digest tags.
- pqueue.AcquireMulti releases queues in reverse order to minimize risk of an acquire blocked by a soon to release queue.
- Include type and size in the request for priority queue.
- Use expected request size to validate response.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-13 15:31:29 -04:00
Brandon Mitchell
03292b20a6
Refactor: cleanup reghttp.Resp methods
- Do not export next method.
- Document exported methods.
- Arbitrary seek is allowed since digest is not calculated here.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-13 15:31:29 -04:00
Brandon Mitchell
6bdc0f2acc
Refactor: remove time.Ticker for rate limiting
time.Ticker leaks goroutines.
A simple time for the next request is good enough.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-13 15:31:29 -04:00
Brandon Mitchell
54bcd7bd24
Refactor: Remove reghttp.Resp interface
Replace it with a pointer to a struct with private values.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-13 15:31:29 -04:00
Brandon Mitchell
e6af4cd6ec
Refactor: Remove digest calculation from reghttp
This is being done directly by blob and manifest types.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-13 15:31:29 -04:00
Brandon Mitchell
0ff350a85d
Refactor: Remove multiple API support
Breaking: This removes an undocumented API for deleting images from Hub.
Users that depend on that functionality should consider a Docker Hub alternative like hub-tool.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-13 15:31:29 -04:00
Brandon Mitchell
ca18029b93
Feat: Add a priority queue for network requests
Breaking: Update scheme to use pqueue instead of throttle.

This is the first step to redesign the network requests for more efficiency.

Library users are unlikely to encounter issues with the scheme change since
both throttle and pqueue are internal packages, so it shouldn't be possible
to call their methods directly or specify their types in variables.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-13 15:31:29 -04:00
Brandon Mitchell
08a0ce7d98
Merge pull request #804 from sudo-bmitch/pr-go-1.23-lint
Chore: Update staticcheck and fix linter warnings for Go 1.23
2024-08-13 15:05:37 -04:00
Brandon Mitchell
d53ff8155b
Chore: Update staticcheck and fix linter warnings for Go 1.23
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-13 15:01:50 -04:00
Brandon Mitchell
8f3b5ca344
Merge pull request #801 from sudo-bmitch/pr-referrer-no-head-digest
Fix: Lookup referrers when registry does not give digest with head
2024-08-08 11:36:42 -04:00
Brandon Mitchell
1b7d3124ab
Fix: Lookup referrers when registry does not give digest with head
Some registries do not include the docker digest headers.
This should support referrers listing by tag on those registries.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-08 11:30:20 -04:00
Brandon Mitchell
ae58955479
Merge pull request #800 from sudo-bmitch/pr-gha-vars
Fix: Update GHA output generating steps
2024-08-05 10:26:02 -04:00
Brandon Mitchell
dce8bead23
Fix: Update GHA output generating steps
The old "echo ::set-output..." method was deprecated for writing to a file.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-05 10:22:20 -04:00