LaurentiuNiculae
ea79be64da
refactor(artifact): remove oci artifact support ( #1359 )
...
* refactor(artifact): remove oci artifact support
- add header to referrers call to indicated applied artifact type filters
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com >
* feat(gc): simplify gc logic to increase coverage
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com >
---------
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com >
2023-05-10 10:15:33 -07:00
peusebiu
d62dbcdf63
fix(sync): fix syncing signatures when using destination in sync's config ( #1429 )
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2023-05-08 10:16:20 -07:00
peusebiu
e299ae199a
fix(sync): skip non distributable layers ( #1421 )
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2023-05-04 09:38:33 -07:00
Nicol
c169698c95
feat: remove usage of zerolog.Logger.Msgf() from zot code ( #1382 )
...
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
2023-04-27 19:44:22 -07:00
Andreea Lupu
40bf76add5
chore(go.mod): upgrade trivy and cosign ( #1387 )
...
Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com >
2023-04-27 09:35:10 -07:00
peusebiu
d818293cc1
test(sync): make sure sync doesn't write on shutdown ( #1370 )
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2023-04-19 11:34:41 -07:00
peusebiu
96232bb11c
test(sync): consolidate all sync tests ( #1332 )
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2023-04-07 09:36:27 +03:00
peusebiu
3dd3c46ee3
test: stop task scheduler between test runs ( #1311 )
...
sync: remove sync WaitGroup, it's stopped with context
sync: onDemand will always try to sync newest image when a tag is used
if a digest is used then onDemand will serve local image
test(sync): fix flaky coverage in sync package
closes #1294
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2023-03-29 11:37:58 -07:00
Nicol Draghici
6f0c37079c
chore(deps): remove usage of deprecated package pkg/errors
...
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
2023-03-14 10:46:29 -07:00
LaurentiuNiculae
4c156234cb
feat(repodb): sync-repodb WIP ( #1241 )
...
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com >
2023-03-09 10:41:48 -08:00
peusebiu
79783b4b06
feat(sync): skip already synced images in sync ondemand ( #1234 )
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2023-03-07 09:58:42 -08:00
LaurentiuNiculae
d62c09e2cc
feat(repodb): Multiarch Image support ( #1147 )
...
* feat(repodb): index logic + tests
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com >
* feat(cli): printing indexes support using the rest api
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com >
---------
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com >
2023-02-27 11:23:18 -08:00
Bogdan Bivolaru
7c3bf86a6b
refactor: Centralise extensions config entries ( #1177 )
...
Except for registry sync config
Signed-off-by: Bogdan BIVOLARU <104334+bogdanbiv@users.noreply.github.com >
2023-02-15 22:20:28 -08:00
peusebiu
4aa0106b0a
feat(scheduler): use an worker pool for scheduler ( #1146 )
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2023-02-15 11:36:50 -08:00
Andreea Lupu
ee95ab0ffc
fix: call notation-go libs instead of using notation binary ( #1104 )
...
fix: add loading notation path
Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com >
Co-authored-by: Roxana Nemulescu <roxana.nemulescu@gmail.com >
2023-02-13 10:43:52 -08:00
Andrei Aaron
d12836e69c
refactor(cve): improve CVE test time by mocking trivy ( #1184 )
...
- refactor(cve): remove the global of type cveinfo.CveInfo from the extensions package
Replace it with an attribute on controller level
- refactor(controller): extract initialization logic from controller.Run()
- test(cve): mock cve scanner in cli tests
Signed-off-by: Andrei Aaron <aaaron@luxoft.com >
2023-02-09 21:04:52 -08:00
Nicol
ba3f6f7492
fix(test): update the zot tests not to use test/data as rootDir (use a temporary folder instead) ( #1162 )
...
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
2023-02-02 11:39:03 -08:00
Lisca Ana-Roberta
976ccfcf0d
fix: removed references to old dist-spec ( #1128 )
...
Signed-off-by: Ana-Roberta Lisca <ana.kagome@yahoo.com >
2023-01-31 09:35:33 -08:00
Nicol
70a60b4660
refactor: Cleanup/simplify testcases in /pkg/extensions ( #1116 )
...
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
fix: Increase coverage when copying files
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
2023-01-19 08:54:05 -08:00
Lisca Ana-Roberta
14238d4a8d
fix: removed resty calls from sync ( #1016 )
...
Signed-off-by: Ana-Roberta Lisca <ana.kagome@yahoo.com >
2022-12-22 10:19:42 -08:00
peusebiu
024b13efe6
fix(sync): syncing OCI artifacts with distribution package fails ( #1013 )
...
sync OCI artifacts using REST APIs
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-12-09 11:38:00 -08:00
peusebiu
168d21da1e
fix(storage): deleting manifests with identical digests ( #951 )
...
Suppose we push two identical manifests (sharing same digest) but with
different tags, then deleting by digest should throw an error otherwise
we end up deleting all image tags (with gc) or dangling references
(without gc)
This behaviour is controlled via Authorization, added a new policy
action named detectManifestsCollision which enables this behaviour
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
Co-authored-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-11-18 09:35:28 -08:00
peusebiu
e96c80c344
feat(sync,s3): added s3 logic for ORAS and OCI artifacts ( #985 )
...
added sync logic for OCI artifacts
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-11-14 22:21:49 -08:00
Ramkumar Chinchani
c0f93caacb
feat(artifact): add OCI references support ( #936 )
...
Thanks @jdolitsky et al for kicking off these changes at:
https://github.com/oci-playground/zot/commits/main
Thanks @sudo-bmitch for reviewing the patch
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-11-08 00:38:16 -08:00
peusebiu
2d877aaea1
fix(sync): also sync on demand digests, not only tags, closes #902 ( #932 )
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-10-27 09:39:59 -07:00
Andrei Aaron
ac6c6a844c
refactor(digests): standardise representation of digests to digest.Digest ( #898 )
...
- Digests were represented by different ways
- We needed a uniform way to represent the digests and enforce a format
- also replace usage of github.com/google/go-containerregistry/pkg/v1
with github.com/opencontainers/image-spec/specs-go/v1
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com >
(cherry picked from commit 96b2f29d6d57070a913ce419149cd481c0723815)
(cherry picked from commit 3d41b583daea654c98378ce3dcb78937d71538e8)
Co-authored-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com >
2022-10-22 13:46:13 -07:00
Ramkumar Chinchani
763287873e
fix(config): make all extension config consistent ( #888 )
...
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-10-21 15:33:54 +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
3c0c51fcbe
fix(sync): also sync image index mediatype ( #847 )
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-10-06 09:41:16 -07:00
peusebiu
c146448f01
fix(sync): revert code which removed image destination feature ( #840 )
...
Added an end to end test for this feature, closes #793
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-10-05 11:03:24 -07:00
slab713
8ffb053cec
Replaced deprecated io/ioutil functions ( #768 )
...
Signed-off-by: slab713 <109306207+slab713@users.noreply.github.com >
2022-09-02 15:56:02 +03:00
Shivam Mishra
6c293719e3
storage: different subpaths can point to same root directory
...
currently different subpaths can only point to same root directory only
when one or both of the storage config does not enable dedupe
different subpath should be able to point to same root directory and in
that case their storage config should be same i.e GC,Dedupe, GC delay
and GC interval
Signed-off-by: Shivam Mishra <shimish2@cisco.com >
2022-08-31 15:43:43 -07:00
Roxana Nemulescu
3bccea7aa2
oras fix:
...
newer version of oras: https://github.com/oras-project/oras/releases/tag/v0.14.0
rename the --manifest-config to --config for push command
Signed-off-by: Roxana Nemulescu <roxana.nemulescu@gmail.com >
2022-08-30 21:39:16 +03:00
Ramkumar Chinchani
2ff8e8b7d2
fix dependabot alerts
...
https://github.com/project-zot/zot/pull/737
https://github.com/project-zot/zot/pull/738
https://github.com/project-zot/zot/pull/739
https://github.com/project-zot/zot/pull/740
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-08-23 09:38:30 -07:00
Ramkumar Chinchani
4b8e288cd3
fix dependabot alerts
...
https://github.com/project-zot/zot/pull/712
https://github.com/project-zot/zot/pull/714
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-08-13 00:02:36 -07:00
Nicol Draghici
a702a2377e
Remove AllowReadOnly and ReadOnly
...
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
Remove check and set header every time
Signed-off-by: Nicol Draghici <idraghic@cisco.com >
2022-08-10 14:27:21 -07:00
Lisca Ana-Roberta
87fc941b3c
image level lint: enforce manifest mandatory annotations
...
closes #536
Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com >
2022-07-27 11:48:04 +03:00
Petu Eusebiu
01d742718f
ci/cd: fix oras cli flags after it got updated
...
installing notation and oras not needed anymore
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-07-12 10:02:51 -07:00
Petu Eusebiu
7954add73a
Fix data races in tests closes #599 , closes #598
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-06-30 13:33:47 -07:00
Alex Stan
ada21ed842
Manage builds with different combinations of extensions
...
Files were added to be built whether an extension is on or off.
New build tags were added for each extension, while minimal and extended disappeared.
added custom binary naming depending on extensions used and changed references from binary to binary-extended
added automated blackbox tests for sync, search, scrub, metrics
added contributor guidelines
Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro >
2022-06-30 09:53:52 -07:00
Catalin Hofnar
0b6fdc23ea
Added sync onDemand test for ORAS artifact
...
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com >
2022-06-06 10:38:42 -07:00
Ramkumar Chinchani
6b841809e3
fix CVE-2022-29173/GHSA-66x3-6cw3-v5gj
...
https://github.com/project-zot/zot/security/dependabot/16
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com >
2022-05-25 11:34:24 -07:00
Shivam Mishra
36c9631000
ext: use distribution spec route prefix for extension api
...
Following the spec defined here https://github.com/opencontainers/distribution-spec/tree/main/extensions
Signed-off-by: Shivam Mishra <shimish2@cisco.com >
2022-05-22 16:35:16 -07:00
Catalin Hofnar
20a60cbad4
Enhance sync logic - stop blob redownloads and re-pushes ( #479 #480 )
...
Changed imagesToCopyFromUpstream to return a map[string][]types.ImageReference from just an array of refs
Rewrote some logic in sync.go to use the new signature of imagesToCopyFromUpstream
Split getLocalImageRef by adding function getLocalCachePath
Adapted tests for new changes, added some tests
Merged #481
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com >
2022-05-16 10:05:01 -07:00
Alex Stan
d325c8b5f4
Fix problems signaled by new linter version v1.45.2
...
PR (linter: upgrade linter version #405 ) triggered lint job which failed
with many errors generated by various linters. Configurations were added to
golangcilint.yaml and several refactorings were made in order to improve the
results of the linter.
maintidx linter disabled
Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro >
2022-04-27 09:55:44 -07:00
Petu Eusebiu
4e20ab8a5d
go.mod: update dependencies
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-04-15 10:31:37 -07:00
Petu Eusebiu
03dd558ec6
sync: fix inconsistent test
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-03-31 09:19:07 -07:00
Petu Eusebiu
be910cf01c
lint: Move out config reloader context from controller struct
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-03-24 10:50:01 -07:00
Petu Eusebiu
f53dc9eb8d
sync: Add a new flag to enforce syncing only signed images, closes #455
...
sync: When checking if a image is already synced also check for changes in upstream signatures.
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-03-24 10:50:01 -07:00
Petu Eusebiu
6d04ab3cdc
sync: support reloading sync config when the config file changes
...
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com >
2022-03-18 11:24:11 -07:00