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

DO_NOT_MERGE - CFE-977: Implementation of a blob gatherer for images in the local cache #730

Closed
wants to merge 4 commits into from

Conversation

sherine-k
Copy link
Contributor

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

Description

This PR is part of a larger user story CFE-977 - Generate smaller archives

In this PR, we focus on identifying those blobs (both layers, config and manifests of various formats (docker-v2 or oci), both single arch and multi arch) that form a container image that is saved to oc-mirror's local cache.

The implementation relies on reading the storage folder of that local cache.
While I agree that this is rather intrusive into the way the local cache registry stores the blobs on disk, it is a fairly easy implementation.

Another implementation might follow in another PR that could interact with the local cache registry instead of looking directly on disk.

For the moment, the use of BlobGatherer is not fully integrated with the MirrorToDisk workflow. Following PRs will be in charge of that.

Fixes # CFE-979

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 for BlobGatherer where implemented

Expected Outcome

Tests should pass

@sherine-k sherine-k changed the title Implementation of a blob gatherer for images in the local cache CFE-977: Implementation of a blob gatherer for images in the local cache Nov 10, 2023
@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 10, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 10, 2023

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

In response to this:

Description

This PR is part of a larger user story CFE-977 - Generate smaller archives

In this PR, we focus on identifying those blobs (both layers, config and manifests of various formats (docker-v2 or oci), both single arch and multi arch) that form a container image that is saved to oc-mirror's local cache.

The implementation relies on reading the storage folder of that local cache.
While I agree that this is rather intrusive into the way the local cache registry stores the blobs on disk, it is a fairly easy implementation.

Another implementation might follow in another PR that could interact with the local cache registry instead of looking directly on disk.

For the moment, the use of BlobGatherer is not fully integrated with the MirrorToDisk workflow. Following PRs will be in charge of that.

Fixes # CFE-979

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 for BlobGatherer where implemented

Expected Outcome

Tests should pass

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 10, 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 10, 2023
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 10, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 10, 2023
Copy link

openshift-ci bot commented Nov 16, 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.

@sherine-k sherine-k changed the title CFE-977: Implementation of a blob gatherer for images in the local cache DO_NOT_MERGE - CFE-977: Implementation of a blob gatherer for images in the local cache Nov 17, 2023
@sherine-k
Copy link
Contributor Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 17, 2023
@@ -348,7 +348,3 @@ func parseMultiArch(multiArch string) (copy.ImageListSelection, error) {
return copy.CopySystemImage, fmt.Errorf("unknown multi-arch option %q. Choose one of the supported options: 'system', 'all', or 'index-only'", multiArch)
}
}

func HelloFromV2() string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for removing this func.

@sherine-k
Copy link
Contributor Author

Closed in favor of #732

@sherine-k sherine-k closed this Nov 20, 2023
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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants