Andrei Aaron
da426850e7
chore: update golangci-lint and fix all issues ( #3575 )
...
* chore: Update golangci-lint
Signed-off-by: Lars Francke <git@lars-francke.de >
* chore: fix all golangci-lint issues
- Remove deprecated `// +build` tags
- Fix godoclint, modernize, wsl_v5, govet, lll, gci, noctx issues
- Update linter configuration
- Modernize code to use Go 1.22+ features (for range N, slices.Contains, etc.)
- Update make check lint the privileged tests
Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com >
---------
Signed-off-by: Lars Francke <git@lars-francke.de >
Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com >
Co-authored-by: Lars Francke <git@lars-francke.de >
2025-11-22 23:36:48 +02:00
Luca Muscariello
2402296e9a
fix: migrate to Go module v2 for proper semantic versioning ( #3462 )
...
* fix: migrate to Go module v2 for proper semantic versioning
This change updates the module path from 'zotregistry.dev/zot' to
'zotregistry.dev/zot/v2' to comply with Go's semantic versioning rules.
According to Go's module versioning requirements, major version v2+
must include the major version in the module path. The current
module path 'zotregistry.dev/zot' only supports v0.x.x and v1.x.x
versions, making existing v2.x.x tags (like v2.1.8) unusable.
Changes:
- Updated go.mod module path to zotregistry.dev/zot/v2
- Updated all internal import paths across 280+ Go source files
- Updated configuration files (golangcilint.yaml, gqlgen.yml)
- Updated README.md Go reference badge
This fix enables proper use of existing v2.x.x Git tags and allows
external packages to import zot v2+ versions without compatibility
errors.
Resolves: Go module import compatibility for v2+ versions
Fixes : #3071
Signed-off-by: Luca Muscariello <muscariello@ieee.org >
* fix: regenerate GraphQL files with updated v2 import paths
The gqlgen tool needs to regenerate the GraphQL schema files after
the module path change to use the new v2 imports.
Signed-off-by: Luca Muscariello <muscariello@ieee.org >
---------
Signed-off-by: Luca Muscariello <muscariello@ieee.org >
2025-10-16 22:43:47 -07:00
Ramkumar Chinchani
2a164cc56b
chore: update go.mod deps ( #2609 )
...
Fix outdated pkgs reported in issue #2522
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2024-08-13 11:28:51 -07:00
Jan-Otto Kröpke
f618b1d4ef
ci(deps): upgrade golangci-lint ( #2556 )
...
* ci(deps): upgrade golangci-lint
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de >
* build(deps): removed disabled linters
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de >
* build(deps): go run github.com/daixiang0/gci@latest write .
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* build(deps): go run golang.org/x/tools/cmd/goimports@latest -l -w .
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* build(deps): go run github.com/bombsimon/wsl/v4/cmd...@latest -strict-append -test=true -fix ./...
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* build(deps): go run github.com/catenacyber/perfsprint@latest -fix ./...
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* build(deps): replace gomnd by mnd
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* build(deps): make gqlgen
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* build: Revert "build(deps): go run github.com/daixiang0/gci@latest write ."
This reverts commit 5bf8c42e1f .
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* build(deps): go run github.com/daixiang0/gci@latest write -s 'standard' -s default -s 'prefix(zotregistry.dev/zot)' .
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* build(deps): make gqlgen
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: wsl issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: check-log issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: gci issues
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
* fix: tests
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
---------
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de >
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de >
2024-07-29 10:32:51 -07:00
Andrei Aaron
7d87558b7e
fix: various lint issues ( #2571 )
...
Originally found by @jkroepke in: https://github.com/project-zot/zot/actions/runs/10056774230/job/27796324933?pr=2556
And https://github.com/project-zot/zot/pull/2556 in general
This commit covers:
- (canonicalheader) capitalization of Docker-Content-Digest header
- (protogetter) the proto getters were not used, they check for nil pointers, we should switch to using them
- (zerologlint) fix the false positive
Signed-off-by: Andrei Aaron <aaaron@luxoft.com >
2024-07-25 10:14:22 -07:00
Andrei Aaron
ce4924f841
refactor: rename go module from zotregistry.io/zot to zotregistry.dev/zot ( #2187 )
...
Signed-off-by: Andrei Aaron <aaaron@luxoft.com >
2024-01-31 20:34:07 -08:00
LaurentiuNiculae
79e14027ee
refactor(test): add lint rule for messages starting with the component ( #2045 )
...
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com >
Signed-off-by: Andrei Aaron <aaaron@luxoft.com >
2023-12-08 10:05:02 +02:00
Alexei Dodon
14206dd6f3
refactor: Review metrics endpoints ( #1770 )
...
Signed-off-by: Alexei Dodon <adodon@cisco.com >
2023-09-15 14:49:34 +03:00
Andrei Aaron
38b00e3507
chore(lint): gci to separate zot from other imports ( #870 )
...
Signed-off-by: Andrei Aaron <andaaron@cisco.com >
2022-10-20 09:39:20 -07:00
peusebiu
91dd5496fc
chore: rename search route prefix ( #887 )
...
* chore: rename search route prefix
* chore: use builtin time.Duration.Truncate() on latencies
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-10-18 20:46:06 -07:00
Nicol
33a431ef43
Update go version to 1.19 ( #829 )
...
* ci: Update go version to 1.19
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
* ci: Fix lint issues
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
* ci: Added needprivileges to lint, made needprivileges pass lint
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com >
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com >
Co-authored-by: Catalin Hofnar <catalin.hofnar@gmail.com >
2022-10-05 13:21:14 +03:00
Ramkumar Chinchani
1e5ea7e09c
controller: support rate-limiting incoming requests
...
helps constraining resource usage and against flood attacks.
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-01-24 12:48:13 -08:00
Ramkumar Chinchani
ac3801ea2d
lint: upgrade golangci-lint
...
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2021-12-20 17:20:35 -08:00
Ramkumar Chinchani
96226af869
move references to zotregistry.io and project-zot
...
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2021-12-05 10:52:27 -08:00
Alexei Dodon
8e4d828867
Implement an API for performance monitoring
...
Signed-off-by: Alexei Dodon <adodon@cisco.com >
2021-11-12 11:14:10 -08:00