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-825: As a oc-mirror user, I would like mirrored operator catalogs to have valid caches #651

Merged
merged 6 commits into from Aug 9, 2023

Conversation

sherine-k
Copy link
Contributor

@sherine-k sherine-k commented May 31, 2023

Description

This PR implements the changes described in CFE-825.
This is a Work In Progress.

List of Done:

  • Extracts the opm binary from the catalog
    • Accounts for remote catalogs
    • Accounts for local oci catalogs
    • Accounts for multi-arch local oci catalogs
      • by extracting binaries from the manifest that corresponds to the machine's platform and os
  • Assumes that the opm binaries are suffixed opm

List of ToDo:

  • If opm version is 1.25 or greater, opm serve --cache-only should work. Otherwise, the cache generation should not be done
  • Implement logic for the case where the catalog doesn't have the cache feature implemented
  • (Implement?) and test on different platforms, to validate that the opm binary extraction is correct
  • Update test-catalog images used by E2E tests in quay.io/redhatgov
  • To be discussed: how to unit test easily this code - requires a fair load of mocking, and changes in function signatures to inject mocks.
  • To be discussed: how to improve performance: for each catalog, an extraction (and pull of image) is done using operator-registry code to render declarativeConfig. Then another extraction (and pull) is done to extract opm binary (uses crane)
  • Tests against official redhat catalogs in various versions >=4.11

Fixes CFE-825.

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?

  • Tested manually with registry.redhat.io/redhat/redhat-operator-index:v4.13
  • Tested manually with OCI local catalog multi-arch copied from above catalog
  • In both cases, run the mirrored catalogs with
podman run -it localhost:5000/cfe-825/redhat/redhat-operator-index:v4.13 serve /configs --cache-only --cache-dir=/tmp/cache --cache-enforce-integrity

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 31, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented May 31, 2023

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

In response to this:

Description

This PR implements the changes described in CFE-825.
This is a Work In Progress.

List of Done:

List of ToDo:

  • Update test-catalog images used by E2E tests in quay.io/redhatgov
  • To be discussed: how to unit test easily this code - requires a fair load of mocking, and changes in function signatures to inject mocks.
  • To be discussed: how to improve performance: for each catalog, an extraction (and pull of image) is done using oc code to render declarativeConfig. Then another extraction (and pull) is done to extract opm binary (uses crane)
  • Tests against official redhat catalogs in various versions >=4.11
  • Add E2E test for the case of OCI local catalogs
  • Test on different platforms, to validate that the opm binary extraction is correct

Fixes CFE-825.

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?

  • Tested manually with registry.redhat.io/redhat/redhat-operator-index:v4.13
  • Tested manually with OCI local catalog multi-arch copied from above catalog

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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 May 31, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented May 31, 2023

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

In response to this:

Description

This PR implements the changes described in CFE-825.
This is a Work In Progress.

List of Done:

List of ToDo:

  • Update test-catalog images used by E2E tests in quay.io/redhatgov
  • To be discussed: how to unit test easily this code - requires a fair load of mocking, and changes in function signatures to inject mocks.
  • To be discussed: how to improve performance: for each catalog, an extraction (and pull of image) is done using operator-registry code to render declarativeConfig. Then another extraction (and pull) is done to extract opm binary (uses crane)
  • Tests against official redhat catalogs in various versions >=4.11
  • Add E2E test for the case of OCI local catalogs
  • Test on different platforms, to validate that the opm binary extraction is correct

Fixes CFE-825.

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?

  • Tested manually with registry.redhat.io/redhat/redhat-operator-index:v4.13
  • Tested manually with OCI local catalog multi-arch copied from above catalog

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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
Copy link

openshift-ci bot commented May 31, 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 May 31, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented May 31, 2023

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

In response to this:

Description

This PR implements the changes described in CFE-825.
This is a Work In Progress.

List of Done:

List of ToDo:

  • Update test-catalog images used by E2E tests in quay.io/redhatgov
  • To be discussed: how to unit test easily this code - requires a fair load of mocking, and changes in function signatures to inject mocks.
  • To be discussed: how to improve performance: for each catalog, an extraction (and pull of image) is done using operator-registry code to render declarativeConfig. Then another extraction (and pull) is done to extract opm binary (uses crane)
  • Tests against official redhat catalogs in various versions >=4.11
  • Fix E2E tests: Investigate why verification of catalog contents fails while extracting catalogs using crane
Error: archive/tar: cannot encode header: Format specifies PAX; and PAX cannot encode Mode=2147484136
  • Add E2E test for the case of OCI local catalogs
  • Test on different platforms, to validate that the opm binary extraction is correct

Fixes CFE-825.

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?

  • Tested manually with registry.redhat.io/redhat/redhat-operator-index:v4.13
  • Tested manually with OCI local catalog multi-arch copied from above catalog

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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-robot
Copy link

openshift-ci-robot commented May 31, 2023

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

In response to this:

Description

This PR implements the changes described in CFE-825.
This is a Work In Progress.

List of Done:

List of ToDo:

  • Update test-catalog images used by E2E tests in quay.io/redhatgov
  • To be discussed: how to unit test easily this code - requires a fair load of mocking, and changes in function signatures to inject mocks.
  • To be discussed: how to improve performance: for each catalog, an extraction (and pull of image) is done using operator-registry code to render declarativeConfig. Then another extraction (and pull) is done to extract opm binary (uses crane)
  • Tests against official redhat catalogs in various versions >=4.11
  • Fix E2E tests: Investigate why verification of catalog contents fails while extracting catalogs using crane
Error: archive/tar: cannot encode header: Format specifies PAX; and PAX cannot encode Mode=2147484136
  • Add E2E test for the case of OCI local catalogs
  • Test on different platforms, to validate that the opm binary extraction is correct

Fixes CFE-825.

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?

  • Tested manually with registry.redhat.io/redhat/redhat-operator-index:v4.13
  • Tested manually with OCI local catalog multi-arch copied from above catalog
  • In both cases, run the mirrored catalogs with
podman run -it localhost:5000/cfe-825/redhat/redhat-operator-index:v4.13 serve /configs --cache-only --cache-dir=/tmp/cache --cache-enforce-integrity

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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 force-pushed the CFE-825 branch 2 times, most recently from 59ec3d0 to f101e83 Compare June 7, 2023 14:58
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 8, 2023
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 9, 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 Jun 19, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 20, 2023

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

In response to this:

Description

This PR implements the changes described in CFE-825.
This is a Work In Progress.

List of Done:

List of ToDo:

  • Update test-catalog images used by E2E tests in quay.io/redhatgov
  • To be discussed: how to unit test easily this code - requires a fair load of mocking, and changes in function signatures to inject mocks.
  • To be discussed: how to improve performance: for each catalog, an extraction (and pull of image) is done using operator-registry code to render declarativeConfig. Then another extraction (and pull) is done to extract opm binary (uses crane)
  • Tests against official redhat catalogs in various versions >=4.11
  • Implement logic for the case where the catalog doesn't have the cache feature implemented
  • Fix E2E tests: Investigate why verification of catalog contents fails while extracting catalogs using crane
Error: archive/tar: cannot encode header: Format specifies PAX; and PAX cannot encode Mode=2147484136
  • Add E2E test for the case of OCI local catalogs
  • Test on different platforms, to validate that the opm binary extraction is correct

Fixes CFE-825.

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?

  • Tested manually with registry.redhat.io/redhat/redhat-operator-index:v4.13
  • Tested manually with OCI local catalog multi-arch copied from above catalog
  • In both cases, run the mirrored catalogs with
podman run -it localhost:5000/cfe-825/redhat/redhat-operator-index:v4.13 serve /configs --cache-only --cache-dir=/tmp/cache --cache-enforce-integrity

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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 force-pushed the CFE-825 branch 4 times, most recently from 0633d31 to c211924 Compare June 30, 2023 14:04
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 30, 2023

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

In response to this:

Description

This PR implements the changes described in CFE-825.
This is a Work In Progress.

List of Done:

  • Extracts the opm binary from the catalog
    • Accounts for remote catalogs
    • Accounts for local oci catalogs
    • Accounts for multi-arch local oci catalogs
      • by extracting binaries from the manifest that corresponds to the machine's platform and os
  • Assumes that the opm binaries are suffixed opm

List of ToDo:

  • Update test-catalog images used by E2E tests in quay.io/redhatgov
  • To be discussed: how to unit test easily this code - requires a fair load of mocking, and changes in function signatures to inject mocks.
  • To be discussed: how to improve performance: for each catalog, an extraction (and pull of image) is done using operator-registry code to render declarativeConfig. Then another extraction (and pull) is done to extract opm binary (uses crane)
  • Tests against official redhat catalogs in various versions >=4.11
  • If opm version is 1.25 or greater, opm serve --cache-only should work. Otherwise, the cache generation should not be done
  • Implement logic for the case where the catalog doesn't have the cache feature implemented
  • Fix E2E tests: Investigate why verification of catalog contents fails while extracting catalogs using crane
Error: archive/tar: cannot encode header: Format specifies PAX; and PAX cannot encode Mode=2147484136
  • Add E2E test for the case of OCI local catalogs
  • Test on different platforms, to validate that the opm binary extraction is correct

Fixes CFE-825.

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?

  • Tested manually with registry.redhat.io/redhat/redhat-operator-index:v4.13
  • Tested manually with OCI local catalog multi-arch copied from above catalog
  • In both cases, run the mirrored catalogs with
podman run -it localhost:5000/cfe-825/redhat/redhat-operator-index:v4.13 serve /configs --cache-only --cache-dir=/tmp/cache --cache-enforce-integrity

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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 force-pushed the CFE-825 branch 2 times, most recently from a811186 to 4de9da1 Compare July 6, 2023 14:39
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 6, 2023

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

In response to this:

Description

This PR implements the changes described in CFE-825.
This is a Work In Progress.

List of Done:

  • Extracts the opm binary from the catalog
    • Accounts for remote catalogs
    • Accounts for local oci catalogs
    • Accounts for multi-arch local oci catalogs
      • by extracting binaries from the manifest that corresponds to the machine's platform and os
  • Assumes that the opm binaries are suffixed opm

List of ToDo:

  • Update test-catalog images used by E2E tests in quay.io/redhatgov
  • To be discussed: how to unit test easily this code - requires a fair load of mocking, and changes in function signatures to inject mocks.
  • To be discussed: how to improve performance: for each catalog, an extraction (and pull of image) is done using operator-registry code to render declarativeConfig. Then another extraction (and pull) is done to extract opm binary (uses crane)
  • Tests against official redhat catalogs in various versions >=4.11
  • If opm version is 1.25 or greater, opm serve --cache-only should work. Otherwise, the cache generation should not be done
  • Implement logic for the case where the catalog doesn't have the cache feature implemented
  • Test on different platforms, to validate that the opm binary extraction is correct

Fixes CFE-825.

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?

  • Tested manually with registry.redhat.io/redhat/redhat-operator-index:v4.13
  • Tested manually with OCI local catalog multi-arch copied from above catalog
  • In both cases, run the mirrored catalogs with
podman run -it localhost:5000/cfe-825/redhat/redhat-operator-index:v4.13 serve /configs --cache-only --cache-dir=/tmp/cache --cache-enforce-integrity

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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-robot
Copy link

openshift-ci-robot commented Jul 6, 2023

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

In response to this:

Description

This PR implements the changes described in CFE-825.
This is a Work In Progress.

List of Done:

  • Extracts the opm binary from the catalog
    • Accounts for remote catalogs
    • Accounts for local oci catalogs
    • Accounts for multi-arch local oci catalogs
      • by extracting binaries from the manifest that corresponds to the machine's platform and os
  • Assumes that the opm binaries are suffixed opm

List of ToDo:

  • If opm version is 1.25 or greater, opm serve --cache-only should work. Otherwise, the cache generation should not be done
  • Implement logic for the case where the catalog doesn't have the cache feature implemented
  • (Implement?) and test on different platforms, to validate that the opm binary extraction is correct
  • Update test-catalog images used by E2E tests in quay.io/redhatgov
  • To be discussed: how to unit test easily this code - requires a fair load of mocking, and changes in function signatures to inject mocks.
  • To be discussed: how to improve performance: for each catalog, an extraction (and pull of image) is done using operator-registry code to render declarativeConfig. Then another extraction (and pull) is done to extract opm binary (uses crane)
  • Tests against official redhat catalogs in various versions >=4.11

Fixes CFE-825.

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?

  • Tested manually with registry.redhat.io/redhat/redhat-operator-index:v4.13
  • Tested manually with OCI local catalog multi-arch copied from above catalog
  • In both cases, run the mirrored catalogs with
podman run -it localhost:5000/cfe-825/redhat/redhat-operator-index:v4.13 serve /configs --cache-only --cache-dir=/tmp/cache --cache-enforce-integrity

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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 force-pushed the CFE-825 branch 2 times, most recently from 31892d4 to c99376f Compare July 24, 2023 11:42
@lmzuccarelli
Copy link
Contributor

@sherine-k - Once we get feedback from QE lets get this PR merged. You have addressed most of John's suggestions.

@jchunkins
Copy link
Contributor

@sherine-k I added a new comment in #651 (comment) but the comment thread was marked as resolved and the buttons for marking it as unresolved are not present. I wanted to make sure you saw this reply.

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

/retest

pkg/cli/mirror/catalog_images.go Outdated Show resolved Hide resolved
pkg/cli/mirror/catalog_images.go Outdated Show resolved Hide resolved
return fmt.Errorf("unable to determine location of cache for image %s. Cache generation failed: %v", ctlgRef, err)
}
cacheLocation := string(dat)
cacheLocationElmts := strings.Split(strings.TrimPrefix(cacheLocation, string(os.PathSeparator)), string(os.PathSeparator))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I've not tested this, but doesn't filepath.SplitList() handle this?

pkg/cli/mirror/catalog_images.go Outdated Show resolved Hide resolved
if err != nil {
return err
}
cfl.Close()
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: isn't this handled at line 400 in the defer?

@@ -87,6 +87,12 @@ const (
// IndexDir is the location of the
// file-based catalog json file.
IndexDir = "index"
// TmpDir is the location of the
// catalog cache directory.
TmpDir = "tmp/cache"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Might be good to update the workspace tree diagram with this new directory

pkg/cli/mirror/catalog_images.go Outdated Show resolved Hide resolved
…resence of argument `--cache-dir` in the original image container CMD
@sherine-k sherine-k force-pushed the CFE-825 branch 2 times, most recently from fd4efc5 to 7511209 Compare August 9, 2023 13:23
@openshift-ci
Copy link

openshift-ci bot commented Aug 9, 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 WIP CFE-825: As a oc-mirror user, I would like mirrored operator catalogs to have valid caches CFE-825: As a oc-mirror user, I would like mirrored operator catalogs to have valid caches Aug 9, 2023
@sherine-k
Copy link
Contributor Author

/unhold

@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 Aug 9, 2023
@lmzuccarelli
Copy link
Contributor

@sherine-k - great work , lets get this PR merged

@lmzuccarelli
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 9, 2023
@openshift-merge-robot openshift-merge-robot merged commit dba4a0c into openshift:main Aug 9, 2023
5 checks passed
sherine-k added a commit to sherine-k/oc-mirror that referenced this pull request Sep 8, 2023
… to have valid caches (openshift#651)

* Regenerate opm cache when building catalog images

* Recreate the cache of local OCI catalogs

* Incomplete - Include opm cache integrity verification to E2E
Fix code regarding finding the location of the opm binary

* TEMPORARY: use a different repository for source catalogs
Fix E2E test catalog_full

* Make cache regeneration during catalog rebuild conditional based on presence of argument `--cache-dir` in the original image container CMD

* Fix review comments
openshift-merge-robot pushed a commit that referenced this pull request Sep 11, 2023
…o deploy because of invalid caches (#691)

* CFE-825: As a oc-mirror user, I would like mirrored operator catalogs to have valid caches (#651)

* Regenerate opm cache when building catalog images

* Recreate the cache of local OCI catalogs

* Incomplete - Include opm cache integrity verification to E2E
Fix code regarding finding the location of the opm binary

* TEMPORARY: use a different repository for source catalogs
Fix E2E test catalog_full

* Make cache regeneration during catalog rebuild conditional based on presence of argument `--cache-dir` in the original image container CMD

* Fix review comments

* OCPBUGS-17545: Improve extracting opm binary from catalogs (#676)

* Improve extracting opm binary from catalogs

* Fix OCPBUGS-17545 - Force pull catalog by platform architecture

* Rewrite extractOPMBinary in a non-recursive way

* Attempt 2 -  Rewrite extractOPMBinary in a non-recursive way
This new implementation extracts the whole catalog to a local folder in order to make it easier to grab the opm binary.

* Account for cases where catalog image's entrypoint might be empty

* Add comments to opm binary extraction logic

* Fix E2E tests after conflict resolution
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

5 participants