Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFE-977,CFE-991: archive generation at the end of MirrorToDisk workflow #739

Merged
merged 5 commits into from Nov 28, 2023

Conversation

sherine-k
Copy link
Contributor

@sherine-k sherine-k commented Nov 27, 2023

Description

Integrates previous PRs #734 into the MirrorToDisk workflow by

  • Stopping registry after Batch worker call succeeds
  • calling archiver to generate the archive

Fixes # CFE-991

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Unit tests
  • Using the following image set config, perform a mirroring
./bin/oc-mirror --v2 -c cfe-966.yml file:///home/skhoury/release
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
mirror:
  additionalImages:
  - name: registry.redhat.io/ubi8/ubi:latest

Expected Outcome

Control the tar contents:

╰─ (CFE-991b)-$ tar tvf /home/skhoury/cfe991/mirror_000001.tar
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/068f2e6b47b257824a1c5fabd2bdb00b9cc5d57880324c72102fb2b569b840a1/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/3e9c77e88f291ac451abb670dc78efab38c12d73486b145918b79a68c3fcbf8f/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/86b358a425dac33c8dc6a96226af378f94c2a949dbcbb01c66f094a6d1fd036b/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/b4e744f5f131fb2db0dd7649806f286ecaa3fcda18dc9a4245d83e902100ccb3/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/b5a6bcb68f136516c3949ab360437f7094e5e117abbf0fe0c2c77d17f4003876/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/d2061882cf3fbf773fd8ebbfb8e896b41530dd7f0b4969d0c159321d343e3d45/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/e1cb992e7555fa2b8405f96330d856d798e8f9fa2e2b78fdbb7cde084dfb010a/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/e6c560fdd4c7458aa8f2ea6b59f1aa62cc8976897730174f2c043bd7bd98009a/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/5512c68acabf04afa95bef9256b6ef2c561c94f2084da728d4858b8acbdb1d59/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/5ee218882a725fe3fcc8ebd803e82a7182dbee47aef0efcaf3852df9ad15347b/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/81070eca15786d6c9e4bcecb26f5f4fc6c2c29cb6e412906f18721bbbcbc4345/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/ba6be5039646f3061b582f13c5fdf9aabfb673eebee3b6d7efac26fbfffcf79a/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/tags/latest/current/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/tags/latest/index/sha256/449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3/link
-rw-r--r-- skhoury/skhoury  27 2023-11-27 16:56 working-dir/release-filters/875360943634cbff56593480fc6403e6
-rw-r--r-- skhoury/skhoury 235 2023-11-08 11:16 isc_2023-11-27T15:56:40Z
-rw-r--r-- skhoury/skhoury 6427 2023-11-27 16:56 docker/registry/v2/blobs/sha256/d2/d2061882cf3fbf773fd8ebbfb8e896b41530dd7f0b4969d0c159321d343e3d45/data
-rw-r--r-- skhoury/skhoury 76207497 2023-11-27 16:56 docker/registry/v2/blobs/sha256/e6/e6c560fdd4c7458aa8f2ea6b59f1aa62cc8976897730174f2c043bd7bd98009a/data
-rw-r--r-- skhoury/skhoury 78771642 2023-11-27 16:56 docker/registry/v2/blobs/sha256/b4/b4e744f5f131fb2db0dd7649806f286ecaa3fcda18dc9a4245d83e902100ccb3/data
-rw-r--r-- skhoury/skhoury     6426 2023-11-27 16:56 docker/registry/v2/blobs/sha256/86/86b358a425dac33c8dc6a96226af378f94c2a949dbcbb01c66f094a6d1fd036b/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/ba/ba6be5039646f3061b582f13c5fdf9aabfb673eebee3b6d7efac26fbfffcf79a/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/81/81070eca15786d6c9e4bcecb26f5f4fc6c2c29cb6e412906f18721bbbcbc4345/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/55/5512c68acabf04afa95bef9256b6ef2c561c94f2084da728d4858b8acbdb1d59/data
-rw-r--r-- skhoury/skhoury     1471 2023-11-27 16:56 docker/registry/v2/blobs/sha256/44/449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/5e/5ee218882a725fe3fcc8ebd803e82a7182dbee47aef0efcaf3852df9ad15347b/data
-rw-r--r-- skhoury/skhoury 76919190 2023-11-27 16:56 docker/registry/v2/blobs/sha256/e1/e1cb992e7555fa2b8405f96330d856d798e8f9fa2e2b78fdbb7cde084dfb010a/data
-rw-r--r-- skhoury/skhoury     6429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/b5/b5a6bcb68f136516c3949ab360437f7094e5e117abbf0fe0c2c77d17f4003876/data
-rw-r--r-- skhoury/skhoury 85893895 2023-11-27 16:56 docker/registry/v2/blobs/sha256/06/068f2e6b47b257824a1c5fabd2bdb00b9cc5d57880324c72102fb2b569b840a1/data
-rw-r--r-- skhoury/skhoury     6433 2023-11-27 16:56 docker/registry/v2/blobs/sha256/3e/3e9c77e88f291ac451abb670dc78efab38c12d73486b145918b79a68c3fcbf8f/data

This is done to anticipate instanciation of Archiver in the
Executor.go.
In fact,  the cobra command context will only be available in the Run
method. The calls to `archive.NewMirrorArchive` which are expected in
methods Complete and PrepareComplete of the executor happen before
Run, and therefore the context of the command isn't created yet.
Therefore, we are moving the context argument from `NewImageBlobGatherer`
and `NewMirrorArchive` into the methods `GatherBlobs` and `BuildArchive`
respectively.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 27, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 27, 2023

@sherine-k: This pull request references CFE-977 which is a valid jira issue.

This pull request references CFE-991 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.15.0" version, but no target version was set.

In response to this:

Description

Integrates previous PRs #734 into the MirrorToDisk workflow by

  • Stopping registry after Batch worker call succeeds
  • calling archiver to generate the archive

Fixes # CFE-991

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Unit tests
  • Using the following image set config, perform a mirroring
./bin/oc-mirror --v2 -c cfe-966.yml file:///home/skhoury/release
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
mirror:
 additionalImages:
 - name: registry.redhat.io/ubi8/ubi:latest

Expected Outcome

Control the tar contents:

╰─ ([CFE-991](https://issues.redhat.com//browse/CFE-991)b)-$ tar tvf /home/skhoury/cfe991/mirror_000001.tar
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/068f2e6b47b257824a1c5fabd2bdb00b9cc5d57880324c72102fb2b569b840a1/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/3e9c77e88f291ac451abb670dc78efab38c12d73486b145918b79a68c3fcbf8f/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/86b358a425dac33c8dc6a96226af378f94c2a949dbcbb01c66f094a6d1fd036b/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/b4e744f5f131fb2db0dd7649806f286ecaa3fcda18dc9a4245d83e902100ccb3/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/b5a6bcb68f136516c3949ab360437f7094e5e117abbf0fe0c2c77d17f4003876/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/d2061882cf3fbf773fd8ebbfb8e896b41530dd7f0b4969d0c159321d343e3d45/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/e1cb992e7555fa2b8405f96330d856d798e8f9fa2e2b78fdbb7cde084dfb010a/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/e6c560fdd4c7458aa8f2ea6b59f1aa62cc8976897730174f2c043bd7bd98009a/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/5512c68acabf04afa95bef9256b6ef2c561c94f2084da728d4858b8acbdb1d59/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/5ee218882a725fe3fcc8ebd803e82a7182dbee47aef0efcaf3852df9ad15347b/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/81070eca15786d6c9e4bcecb26f5f4fc6c2c29cb6e412906f18721bbbcbc4345/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/ba6be5039646f3061b582f13c5fdf9aabfb673eebee3b6d7efac26fbfffcf79a/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/tags/latest/current/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/tags/latest/index/sha256/449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3/link
-rw-r--r-- skhoury/skhoury  27 2023-11-27 16:56 working-dir/release-filters/875360943634cbff56593480fc6403e6
-rw-r--r-- skhoury/skhoury 235 2023-11-08 11:16 isc_2023-11-27T15:56:40Z
-rw-r--r-- skhoury/skhoury 6427 2023-11-27 16:56 docker/registry/v2/blobs/sha256/d2/d2061882cf3fbf773fd8ebbfb8e896b41530dd7f0b4969d0c159321d343e3d45/data
-rw-r--r-- skhoury/skhoury 76207497 2023-11-27 16:56 docker/registry/v2/blobs/sha256/e6/e6c560fdd4c7458aa8f2ea6b59f1aa62cc8976897730174f2c043bd7bd98009a/data
-rw-r--r-- skhoury/skhoury 78771642 2023-11-27 16:56 docker/registry/v2/blobs/sha256/b4/b4e744f5f131fb2db0dd7649806f286ecaa3fcda18dc9a4245d83e902100ccb3/data
-rw-r--r-- skhoury/skhoury     6426 2023-11-27 16:56 docker/registry/v2/blobs/sha256/86/86b358a425dac33c8dc6a96226af378f94c2a949dbcbb01c66f094a6d1fd036b/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/ba/ba6be5039646f3061b582f13c5fdf9aabfb673eebee3b6d7efac26fbfffcf79a/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/81/81070eca15786d6c9e4bcecb26f5f4fc6c2c29cb6e412906f18721bbbcbc4345/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/55/5512c68acabf04afa95bef9256b6ef2c561c94f2084da728d4858b8acbdb1d59/data
-rw-r--r-- skhoury/skhoury     1471 2023-11-27 16:56 docker/registry/v2/blobs/sha256/44/449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/5e/5ee218882a725fe3fcc8ebd803e82a7182dbee47aef0efcaf3852df9ad15347b/data
-rw-r--r-- skhoury/skhoury 76919190 2023-11-27 16:56 docker/registry/v2/blobs/sha256/e1/e1cb992e7555fa2b8405f96330d856d798e8f9fa2e2b78fdbb7cde084dfb010a/data
-rw-r--r-- skhoury/skhoury     6429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/b5/b5a6bcb68f136516c3949ab360437f7094e5e117abbf0fe0c2c77d17f4003876/data
-rw-r--r-- skhoury/skhoury 85893895 2023-11-27 16:56 docker/registry/v2/blobs/sha256/06/068f2e6b47b257824a1c5fabd2bdb00b9cc5d57880324c72102fb2b569b840a1/data
-rw-r--r-- skhoury/skhoury     6433 2023-11-27 16:56 docker/registry/v2/blobs/sha256/3e/3e9c77e88f291ac451abb670dc78efab38c12d73486b145918b79a68c3fcbf8f/data

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 27, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 27, 2023

@sherine-k: This pull request references CFE-977 which is a valid jira issue.

This pull request references CFE-991 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.15.0" version, but no target version was set.

In response to this:

Description

Integrates previous PRs #734 into the MirrorToDisk workflow by

  • Stopping registry after Batch worker call succeeds
  • calling archiver to generate the archive

Fixes # CFE-991

TODO: Fix EOF error: when looking at the generated tar, we get an error:

tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Unit tests
  • Using the following image set config, perform a mirroring
./bin/oc-mirror --v2 -c cfe-966.yml file:///home/skhoury/release
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
mirror:
 additionalImages:
 - name: registry.redhat.io/ubi8/ubi:latest

Expected Outcome

Control the tar contents:

╰─ ([CFE-991](https://issues.redhat.com//browse/CFE-991)b)-$ tar tvf /home/skhoury/cfe991/mirror_000001.tar
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/068f2e6b47b257824a1c5fabd2bdb00b9cc5d57880324c72102fb2b569b840a1/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/3e9c77e88f291ac451abb670dc78efab38c12d73486b145918b79a68c3fcbf8f/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/86b358a425dac33c8dc6a96226af378f94c2a949dbcbb01c66f094a6d1fd036b/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/b4e744f5f131fb2db0dd7649806f286ecaa3fcda18dc9a4245d83e902100ccb3/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/b5a6bcb68f136516c3949ab360437f7094e5e117abbf0fe0c2c77d17f4003876/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/d2061882cf3fbf773fd8ebbfb8e896b41530dd7f0b4969d0c159321d343e3d45/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/e1cb992e7555fa2b8405f96330d856d798e8f9fa2e2b78fdbb7cde084dfb010a/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/e6c560fdd4c7458aa8f2ea6b59f1aa62cc8976897730174f2c043bd7bd98009a/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/5512c68acabf04afa95bef9256b6ef2c561c94f2084da728d4858b8acbdb1d59/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/5ee218882a725fe3fcc8ebd803e82a7182dbee47aef0efcaf3852df9ad15347b/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/81070eca15786d6c9e4bcecb26f5f4fc6c2c29cb6e412906f18721bbbcbc4345/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/ba6be5039646f3061b582f13c5fdf9aabfb673eebee3b6d7efac26fbfffcf79a/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/tags/latest/current/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/tags/latest/index/sha256/449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3/link
-rw-r--r-- skhoury/skhoury  27 2023-11-27 16:56 working-dir/release-filters/875360943634cbff56593480fc6403e6
-rw-r--r-- skhoury/skhoury 235 2023-11-08 11:16 isc_2023-11-27T15:56:40Z
-rw-r--r-- skhoury/skhoury 6427 2023-11-27 16:56 docker/registry/v2/blobs/sha256/d2/d2061882cf3fbf773fd8ebbfb8e896b41530dd7f0b4969d0c159321d343e3d45/data
-rw-r--r-- skhoury/skhoury 76207497 2023-11-27 16:56 docker/registry/v2/blobs/sha256/e6/e6c560fdd4c7458aa8f2ea6b59f1aa62cc8976897730174f2c043bd7bd98009a/data
-rw-r--r-- skhoury/skhoury 78771642 2023-11-27 16:56 docker/registry/v2/blobs/sha256/b4/b4e744f5f131fb2db0dd7649806f286ecaa3fcda18dc9a4245d83e902100ccb3/data
-rw-r--r-- skhoury/skhoury     6426 2023-11-27 16:56 docker/registry/v2/blobs/sha256/86/86b358a425dac33c8dc6a96226af378f94c2a949dbcbb01c66f094a6d1fd036b/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/ba/ba6be5039646f3061b582f13c5fdf9aabfb673eebee3b6d7efac26fbfffcf79a/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/81/81070eca15786d6c9e4bcecb26f5f4fc6c2c29cb6e412906f18721bbbcbc4345/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/55/5512c68acabf04afa95bef9256b6ef2c561c94f2084da728d4858b8acbdb1d59/data
-rw-r--r-- skhoury/skhoury     1471 2023-11-27 16:56 docker/registry/v2/blobs/sha256/44/449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/5e/5ee218882a725fe3fcc8ebd803e82a7182dbee47aef0efcaf3852df9ad15347b/data
-rw-r--r-- skhoury/skhoury 76919190 2023-11-27 16:56 docker/registry/v2/blobs/sha256/e1/e1cb992e7555fa2b8405f96330d856d798e8f9fa2e2b78fdbb7cde084dfb010a/data
-rw-r--r-- skhoury/skhoury     6429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/b5/b5a6bcb68f136516c3949ab360437f7094e5e117abbf0fe0c2c77d17f4003876/data
-rw-r--r-- skhoury/skhoury 85893895 2023-11-27 16:56 docker/registry/v2/blobs/sha256/06/068f2e6b47b257824a1c5fabd2bdb00b9cc5d57880324c72102fb2b569b840a1/data
-rw-r--r-- skhoury/skhoury     6433 2023-11-27 16:56 docker/registry/v2/blobs/sha256/3e/3e9c77e88f291ac451abb670dc78efab38c12d73486b145918b79a68c3fcbf8f/data

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

openshift-ci bot commented Nov 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sherine-k

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 27, 2023
Adds the creation of an implementation of interface Archiver in the
`Complete` method.

Adds the call to Archiver.BuildArchive in `Run` for MirrorToDisk mode
after the Batch workers have finished.
Before building the archive, the local storage registry is stopped, so
that we ensure that the cache folder is in a consistent state before
we start archiving.
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 27, 2023

@sherine-k: This pull request references CFE-977 which is a valid jira issue.

This pull request references CFE-991 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.15.0" version, but no target version was set.

In response to this:

Description

Integrates previous PRs #734 into the MirrorToDisk workflow by

  • Stopping registry after Batch worker call succeeds
  • calling archiver to generate the archive

Fixes # CFE-991

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Unit tests
  • Using the following image set config, perform a mirroring
./bin/oc-mirror --v2 -c cfe-966.yml file:///home/skhoury/release
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
mirror:
 additionalImages:
 - name: registry.redhat.io/ubi8/ubi:latest

Expected Outcome

Control the tar contents:

╰─ ([CFE-991](https://issues.redhat.com//browse/CFE-991)b)-$ tar tvf /home/skhoury/cfe991/mirror_000001.tar
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/068f2e6b47b257824a1c5fabd2bdb00b9cc5d57880324c72102fb2b569b840a1/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/3e9c77e88f291ac451abb670dc78efab38c12d73486b145918b79a68c3fcbf8f/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/86b358a425dac33c8dc6a96226af378f94c2a949dbcbb01c66f094a6d1fd036b/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/b4e744f5f131fb2db0dd7649806f286ecaa3fcda18dc9a4245d83e902100ccb3/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/b5a6bcb68f136516c3949ab360437f7094e5e117abbf0fe0c2c77d17f4003876/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/d2061882cf3fbf773fd8ebbfb8e896b41530dd7f0b4969d0c159321d343e3d45/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/e1cb992e7555fa2b8405f96330d856d798e8f9fa2e2b78fdbb7cde084dfb010a/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_layers/sha256/e6c560fdd4c7458aa8f2ea6b59f1aa62cc8976897730174f2c043bd7bd98009a/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/5512c68acabf04afa95bef9256b6ef2c561c94f2084da728d4858b8acbdb1d59/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/5ee218882a725fe3fcc8ebd803e82a7182dbee47aef0efcaf3852df9ad15347b/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/81070eca15786d6c9e4bcecb26f5f4fc6c2c29cb6e412906f18721bbbcbc4345/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/revisions/sha256/ba6be5039646f3061b582f13c5fdf9aabfb673eebee3b6d7efac26fbfffcf79a/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/tags/latest/current/link
-rw-r--r-- skhoury/skhoury  71 2023-11-27 16:56 docker/registry/v2/repositories/ubi8/ubi/_manifests/tags/latest/index/sha256/449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3/link
-rw-r--r-- skhoury/skhoury  27 2023-11-27 16:56 working-dir/release-filters/875360943634cbff56593480fc6403e6
-rw-r--r-- skhoury/skhoury 235 2023-11-08 11:16 isc_2023-11-27T15:56:40Z
-rw-r--r-- skhoury/skhoury 6427 2023-11-27 16:56 docker/registry/v2/blobs/sha256/d2/d2061882cf3fbf773fd8ebbfb8e896b41530dd7f0b4969d0c159321d343e3d45/data
-rw-r--r-- skhoury/skhoury 76207497 2023-11-27 16:56 docker/registry/v2/blobs/sha256/e6/e6c560fdd4c7458aa8f2ea6b59f1aa62cc8976897730174f2c043bd7bd98009a/data
-rw-r--r-- skhoury/skhoury 78771642 2023-11-27 16:56 docker/registry/v2/blobs/sha256/b4/b4e744f5f131fb2db0dd7649806f286ecaa3fcda18dc9a4245d83e902100ccb3/data
-rw-r--r-- skhoury/skhoury     6426 2023-11-27 16:56 docker/registry/v2/blobs/sha256/86/86b358a425dac33c8dc6a96226af378f94c2a949dbcbb01c66f094a6d1fd036b/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/ba/ba6be5039646f3061b582f13c5fdf9aabfb673eebee3b6d7efac26fbfffcf79a/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/81/81070eca15786d6c9e4bcecb26f5f4fc6c2c29cb6e412906f18721bbbcbc4345/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/55/5512c68acabf04afa95bef9256b6ef2c561c94f2084da728d4858b8acbdb1d59/data
-rw-r--r-- skhoury/skhoury     1471 2023-11-27 16:56 docker/registry/v2/blobs/sha256/44/449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3/data
-rw-r--r-- skhoury/skhoury      429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/5e/5ee218882a725fe3fcc8ebd803e82a7182dbee47aef0efcaf3852df9ad15347b/data
-rw-r--r-- skhoury/skhoury 76919190 2023-11-27 16:56 docker/registry/v2/blobs/sha256/e1/e1cb992e7555fa2b8405f96330d856d798e8f9fa2e2b78fdbb7cde084dfb010a/data
-rw-r--r-- skhoury/skhoury     6429 2023-11-27 16:56 docker/registry/v2/blobs/sha256/b5/b5a6bcb68f136516c3949ab360437f7094e5e117abbf0fe0c2c77d17f4003876/data
-rw-r--r-- skhoury/skhoury 85893895 2023-11-27 16:56 docker/registry/v2/blobs/sha256/06/068f2e6b47b257824a1c5fabd2bdb00b9cc5d57880324c72102fb2b569b840a1/data
-rw-r--r-- skhoury/skhoury     6433 2023-11-27 16:56 docker/registry/v2/blobs/sha256/3e/3e9c77e88f291ac451abb670dc78efab38c12d73486b145918b79a68c3fcbf8f/data

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sherine-k sherine-k changed the title WIP: CFE-977,CFE-991: archive generation at the end of MirrorToDisk workflow CFE-977,CFE-991: archive generation at the end of MirrorToDisk workflow Nov 28, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2023
Copy link

openshift-ci bot commented Nov 28, 2023

@sherine-k: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@lmzuccarelli
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 28, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit 030f65e into openshift:main Nov 28, 2023
5 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build oc-mirror-plugin-container-v4.15.0-202311281631.p0.g030f65e.assembly.stream for distgit oc-mirror-plugin.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants