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

🐛 Fix FS cache for image refs with tags #394

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

m1kola
Copy link
Member

@m1kola m1kola commented Sep 11, 2024

Fixes #392

@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 Sep 11, 2024
@m1kola
Copy link
Member Author

m1kola commented Sep 11, 2024

Edit: Ready for review

Leaving in a draft for now because ideally we want to fail the test if we do not hit cache.

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 33.66%. Comparing base (aff9901) to head (df2b2f0).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #394      +/-   ##
==========================================
- Coverage   33.95%   33.66%   -0.29%     
==========================================
  Files          16       16              
  Lines         698      695       -3     
==========================================
- Hits          237      234       -3     
- Misses        435      436       +1     
+ Partials       26       25       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>
@m1kola m1kola marked this pull request as ready for review September 12, 2024 10:40
@m1kola m1kola requested a review from a team as a code owner September 12, 2024 10:40
@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 Sep 12, 2024
@@ -344,6 +347,16 @@ func TestImageRegistry(t *testing.T) {
BaseCachePath: testCache,
}

// Create a logger with a simple function-based LogSink that writes to the buffer
var buf bytes.Buffer
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

@@ -263,6 +263,8 @@ func (r *ClusterCatalogReconciler) needsUnpacking(catalog *v1alpha1.ClusterCatal
return false
}
// if the spec.Source.Image.Ref was changed, unpack the new ref
// NOTE: we must compare image reference WITHOUT sha hash here
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you!

@perdasilva perdasilva added this pull request to the merge queue Sep 12, 2024
Merged via the queue into operator-framework:main with commit dfe121e Sep 12, 2024
12 of 13 checks passed
@m1kola m1kola deleted the fix_fs_cache branch September 12, 2024 12:17
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.

catalogd never uses filesystem cache for image references with tags
2 participants