Skip to content

Conversation

grokspawn
Copy link
Contributor

Description of the change:
Make cachedir creation contingent on a requested extractContent.cacheDir configuration.

Motivation for the change:
Otherwise, in-cluster opm will find an existing-but-empty cache directory in the filespace and will recognize it as a broken cache. This is correct, since it could be that the creator intended to put cache content in the destination, but forgot|failed to.

Architectural changes:

Testing remarks:
approach:

  1. bring up a kind olm cluster via make run-local
  2. clone the default operatorhubio catsrc but w/ on-cluster (cacheless) unpacking
    1. dump the catsrc yaml
    2. add extractConfig stanza (only configs)
    3. dump the catsrc contents opm render to local fs (in a subdir $catdir)
    4. opm generate dockerfile -i scratch $catdir to make a binless catsrc dockerfile
    5. edit the dockerfile & comment out the cache build/copy to the destination image
    6. build/push the image to an accessible registry (I used quay.io/jordankeister/catalogs:cacheless)
    7. change the modified catsrc yaml .status.image, ..metadata.name, spec.displayName to make this catsrc unique
    8. deploy the new catsrc via kubectl apply -f catsrc.yaml
  3. profit!

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Bug fixes are accompanied by regression test(s)
  • e2e tests and flake fixes are accompanied evidence of flake testing, e.g. executing the test 100(0) times
  • tech debt/todo is accompanied by issue link(s) in comments in the surrounding code
  • Tests are comprehensible, e.g. Ginkgo DSL is being used appropriately
  • Docs updated or added to /doc
  • Commit messages sensible and descriptive
  • Tests marked as [FLAKE] are truly flaky and have an issue
  • Code is properly formatted

@openshift-ci openshift-ci bot requested review from dtfranz and tmshort May 30, 2025 16:45
@grokspawn grokspawn added this pull request to the merge queue Jun 2, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 2, 2025
@grokspawn grokspawn added this pull request to the merge queue Jun 2, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 2, 2025
@grokspawn grokspawn added this pull request to the merge queue Jun 2, 2025
Merged via the queue into operator-framework:master with commit 88bdcf1 Jun 2, 2025
13 checks passed
@grokspawn grokspawn deleted the cacheless-cats-2 branch June 2, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants