Skip to content

Commit

Permalink
Adding support for deletion of one level of nested index
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Vlérick <[email protected]>
  • Loading branch information
Pvlerick committed Sep 28, 2023
1 parent 19682ec commit 5a9d2f8
Show file tree
Hide file tree
Showing 61 changed files with 531 additions and 632 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
insert binary content here #26559
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:913cf3a39d377faf89ed388ad913a318a390488c9f34c46e43424795cdabffe8",
"size": 585
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"digest": "sha256:a6f737ac2b84bc463f2ff721af39588c69646c82f79f3808236178e02e35b922",
"size": 33
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:f732172ad8d2a666550fa3ec37a5153d59acc95744562ae64cf62ded46de101a",
"size": 583
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"digest": "sha256:02ea786cb1ff44d997661886a4186cbd8a1dc466938712bf7281379209476022",
"size": 34
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
insert binary content here #9811
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:df11bc189adeb50dadb3291a3a7f2c34b36e0efdba0df70f2c8a2d761b215cde",
"size": 585
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"digest": "sha256:986315a0e599fac2b80eb31db2124dab8d3de04d7ca98b254999bd913c1f73fe",
"size": 33
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created":"2023-08-07T19:38:34.915445772Z","architecture":"386","os":"linux","config":{"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh"]},"rootfs":{"type":"layers","diff_ids":["sha256:53bfdd548f8566a059cd188348b202a50fb9d39ce80eb5b8f0c670dfa9bc6569"]},"history":[{"created":"2023-08-07T19:38:34.803529816Z","created_by":"/bin/sh -c #(nop) ADD file:c06b4f6991638e506d4d0a4d70c4a78ba30b971767802af4c6b837cdf59d4303 in / "},{"created":"2023-08-07T19:38:34.915445772Z","created_by":"/bin/sh -c #(nop) CMD [\"/bin/sh\"]","empty_layer":true}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:39c524417bb4228f9fcb0aef43a680b5fd6b9f3a1df2fd50509d047e47dad8be",
"size": 525,
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:be6036f9b6a4e120a04868c47f1b8674f58b2fe5e410cba9f585a13ca8946cf0",
"size": 525,
"platform": {
"architecture": "386",
"os": "linux"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created":"2023-08-07T19:20:20.894140623Z","architecture":"amd64","os":"linux","config":{"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh"]},"rootfs":{"type":"layers","diff_ids":["sha256:4693057ce2364720d39e57e85a5b8e0bd9ac3573716237736d6470ec5b7b7230"]},"history":[{"created":"2023-08-07T19:20:20.71894984Z","created_by":"/bin/sh -c #(nop) ADD file:32ff5e7a78b890996ee4681cc0a26185d3e9acdb4eb1e2aaccb2411f922fed6b in / "},{"created":"2023-08-07T19:20:20.894140623Z","created_by":"/bin/sh -c #(nop) CMD [\"/bin/sh\"]","empty_layer":true}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:913cf3a39d377faf89ed388ad913a318a390488c9f34c46e43424795cdabffe8",
"size": 584
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"digest": "sha256:557ac7d133b7770216a8101268640edf4e88beab1b4e1e1bfc9b1891a1cab861",
"size": 33
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
insert binary content here #7959
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:93cbd11a4f41467a0409b975499ae711bc6f8222de38d9f1b5a4097583195ad5",
"size": 525,
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:f6d60fd529b234d3e28837e15294d935f55da58ce57c4f9218cad38d0be82ce3",
"size": 525,
"platform": {
"architecture": "386",
"os": "linux"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
insert binary content here #1234
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created":"2023-08-07T19:38:27.007952531Z","architecture":"386","os":"linux","config":{"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh"]},"rootfs":{"type":"layers","diff_ids":["sha256:f05b0759429ba12d5fda46c196f253cc1cab8f56cd874e9e7be674fc1b8337de"]},"history":[{"created":"2023-08-07T19:38:26.69689892Z","created_by":"/bin/sh -c #(nop) ADD file:4b33c52e11b19fde30197c62ead0b77bde28d34edaa08346a5302cd892d3cebe in / "},{"created":"2023-08-07T19:38:27.007952531Z","created_by":"/bin/sh -c #(nop) CMD [\"/bin/sh\"]","empty_layer":true}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:7ffdfe7d276286b39a203dcc247949cf47c91d2d5e10a53a675c0962ed9e4402",
"size": 583
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"digest": "sha256:e2f7e0374fd6a03d9c373f4d9a0c7802045cc3ddcc1433e89d83b81fa7007242",
"size": 33
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created":"2023-08-07T19:20:26.426857961Z","architecture":"amd64","os":"linux","config":{"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh"]},"rootfs":{"type":"layers","diff_ids":["sha256:36b50b131297b8860da51b2d2b24bb4c08dfbdf2789b08e3cc0f187c98637a19"]},"history":[{"created":"2023-08-07T19:20:26.326707843Z","created_by":"/bin/sh -c #(nop) ADD file:6dd87346b8be240b21b4f4d9296253bf0d28b6579aa52d2118872e3936963b6b in / "},{"created":"2023-08-07T19:20:26.426857961Z","created_by":"/bin/sh -c #(nop) CMD [\"/bin/sh\"]","empty_layer":true}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
insert binary content here #28017
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
insert binary content here #4794
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:aab808b283c3f654d84358a40ce8766ecd552249305141de88f0ca61f3d1368f",
"size": 582
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"digest": "sha256:e19729d5a968c71b4b691d60f4a6f85f93c303bb88635dcfef36e23b76cb7b3a",
"size": 34
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"created":"2023-08-07T19:20:31.99661329Z","architecture":"amd64","os":"linux","config":{"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh"]},"rootfs":{"type":"layers","diff_ids":["sha256:0e182002b05f2ab123995821ef14f1cda765a0c31f7a6d260221558f6466535e"]},"history":[{"created":"2023-08-07T19:20:31.893185238Z","created_by":"/bin/sh -c #(nop) ADD file:76d829bbce3dd420a8419919b0916c0fda917011d1e6752ca5b9e53d5ca890a6 in / "},{"created":"2023-08-07T19:20:31.99661329Z","created_by":"/bin/sh -c #(nop) CMD [\"/bin/sh\"]","empty_layer":true}]}
61 changes: 61 additions & 0 deletions oci/layout/fixtures/delete_image_multiple_images/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"schemaVersion": 2,
"manifests": [
{
"mediaType": "application/vnd.oci.image.index.v1+json",
"digest": "sha256:a2f798327b3f25e3eff54badcb769953de235e62e3e32051d57a5e66246de4a1",
"size": 759,
"annotations": {
"org.opencontainers.image.ref.name": "latest"
}
},
{
"mediaType": "application/vnd.oci.image.index.v1+json",
"digest": "sha256:a2f798327b3f25e3eff54badcb769953de235e62e3e32051d57a5e66246de4a1",
"size": 759,
"annotations": {
"org.opencontainers.image.ref.name": "3.18.3"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:93cbd11a4f41467a0409b975499ae711bc6f8222de38d9f1b5a4097583195ad5",
"size": 525,
"annotations": {
"org.opencontainers.image.ref.name": "3"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:93cbd11a4f41467a0409b975499ae711bc6f8222de38d9f1b5a4097583195ad5",
"size": 525,
"annotations": {
"org.opencontainers.image.ref.name": "3.18"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:5b2aba4d3c27bc6493633d0ec446b25c8d0a5c9cfe99894bcdff0aee80813805",
"size": 525,
"annotations": {
"org.opencontainers.image.ref.name": "3.17.5"
}
},
{
"mediaType": "application/vnd.oci.image.index.v1+json",
"digest": "sha256:861d3c014b0e3edcf80e6221247d6b2921a4f892feb9bafe9515b9975b78c44f",
"size": 759,
"annotations": {
"org.opencontainers.image.ref.name": "3.16.7"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:0dc27f36a618c110ae851662c13283e9fbc1b5a5de003befc4bcefa5a05d2eef",
"size": 525,
"annotations": {
"org.opencontainers.image.ref.name": "1.0.0"
}
}
]
}
61 changes: 61 additions & 0 deletions oci/layout/fixtures/delete_image_multiple_images/info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
This is tree representation of the fixture to help writing the tests:

7 references in the index, 10 descriptors and 19 blobs in the blob directory

index.json
├── 3.17.5
│ └── manifest: 5b2aba4d3c27bc6493633d0ec446b25c8d0a5c9cfe99894bcdff0aee80813805
│ config: df11bc189adeb50dadb3291a3a7f2c34b36e0efdba0df70f2c8a2d761b215cde
│ layers: 986315a0e599fac2b80eb31db2124dab8d3de04d7ca98b254999bd913c1f73fe
├── 3.18
│ └── manifest: 93cbd11a4f41467a0409b975499ae711bc6f8222de38d9f1b5a4097583195ad5
│ config: 913cf3a39d377faf89ed388ad913a318a390488c9f34c46e43424795cdabffe8
│ layers: 557ac7d133b7770216a8101268640edf4e88beab1b4e1e1bfc9b1891a1cab861
├── 3
│ └── manifest: 93cbd11a4f41467a0409b975499ae711bc6f8222de38d9f1b5a4097583195ad5
│ config: 913cf3a39d377faf89ed388ad913a318a390488c9f34c46e43424795cdabffe8
│ layers: 557ac7d133b7770216a8101268640edf4e88beab1b4e1e1bfc9b1891a1cab861
├── 1.0.0
│ └── manifest: 0dc27f36a618c110ae851662c13283e9fbc1b5a5de003befc4bcefa5a05d2eef
│ config: 913cf3a39d377faf89ed388ad913a318a390488c9f34c46e43424795cdabffe8
│ layers: a6f737ac2b84bc463f2ff721af39588c69646c82f79f3808236178e02e35b922
├── latest
│ └── index: a2f798327b3f25e3eff54badcb769953de235e62e3e32051d57a5e66246de4a1
│ ├── linux/am64
│ │ └── manifest: 93cbd11a4f41467a0409b975499ae711bc6f8222de38d9f1b5a4097583195ad5
│ │ config: 913cf3a39d377faf89ed388ad913a318a390488c9f34c46e43424795cdabffe8
│ │ layers: 557ac7d133b7770216a8101268640edf4e88beab1b4e1e1bfc9b1891a1cab861
│ │
│ └── linux/386
│ └── manifest: f6d60fd529b234d3e28837e15294d935f55da58ce57c4f9218cad38d0be82ce3
│ config: aab808b283c3f654d84358a40ce8766ecd552249305141de88f0ca61f3d1368f
│ layers: e19729d5a968c71b4b691d60f4a6f85f93c303bb88635dcfef36e23b76cb7b3a
├── 3.18.3
│ └── index: a2f798327b3f25e3eff54badcb769953de235e62e3e32051d57a5e66246de4a1
│ ├── linux/am64
│ │ └── manifest: 93cbd11a4f41467a0409b975499ae711bc6f8222de38d9f1b5a4097583195ad5
│ │ config: 913cf3a39d377faf89ed388ad913a318a390488c9f34c46e43424795cdabffe8
│ │ layers: 557ac7d133b7770216a8101268640edf4e88beab1b4e1e1bfc9b1891a1cab861
│ │
│ └── linux/386
│ └── manifest: f6d60fd529b234d3e28837e15294d935f55da58ce57c4f9218cad38d0be82ce3
│ config: aab808b283c3f654d84358a40ce8766ecd552249305141de88f0ca61f3d1368f
│ layers: e19729d5a968c71b4b691d60f4a6f85f93c303bb88635dcfef36e23b76cb7b3a
├── 3.16.7
│ └── index: 861d3c014b0e3edcf80e6221247d6b2921a4f892feb9bafe9515b9975b78c44f
│ ├── linux/am64
│ │ └── manifest: 39c524417bb4228f9fcb0aef43a680b5fd6b9f3a1df2fd50509d047e47dad8be
│ │ config: f732172ad8d2a666550fa3ec37a5153d59acc95744562ae64cf62ded46de101a
│ │ layers: 02ea786cb1ff44d997661886a4186cbd8a1dc466938712bf7281379209476022
│ │
│ └── linux/386
│ └── manifest: be6036f9b6a4e120a04868c47f1b8674f58b2fe5e410cba9f585a13ca8946cf0
│ config: 7ffdfe7d276286b39a203dcc247949cf47c91d2d5e10a53a675c0962ed9e4402
│ layers: e2f7e0374fd6a03d9c373f4d9a0c7802045cc3ddcc1433e89d83b81fa7007242
File renamed without changes.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5a9d2f8

Please sign in to comment.