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

🐛 unpack cache cleanup should ignore missing files #404

Merged

Conversation

joelanford
Copy link
Member

No description provided.

@joelanford joelanford requested a review from a team as a code owner September 17, 2024 21:27
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 37.45%. Comparing base (f0ef22a) to head (c01f5ee).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/source/containers_image.go 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #404      +/-   ##
==========================================
- Coverage   37.89%   37.45%   -0.45%     
==========================================
  Files          15       15              
  Lines         789      793       +4     
==========================================
- Hits          299      297       -2     
- Misses        446      449       +3     
- Partials       44       47       +3     

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

m1kola
m1kola previously approved these changes Sep 18, 2024
Copy link
Collaborator

@anik120 anik120 left a comment

Choose a reason for hiding this comment

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

@joelanford fyi incorporated this in #379 to move that faster

Comment on lines +177 to +179
if err := deleteRecursive(i.catalogPath(catalog.Name)); err != nil {
return fmt.Errorf("error deleting catalog cache: %w", err)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

For now at least, deleteRecursive already has a wrapper text:

error making catalog cache writable for deletion:.

Do we need this?

Alternatively, if we want the nice to have error deleting catalog cache: error making catalog cache writable for deletion:.. wrappers, the next line should return nil (it's recalling deleteRecursive again)

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1 to the below line needing a change.

I'm not strongly opinionated on the wrapping, but generally I always try to add more context where possible to help with "tracing" the actions taken from error logs

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, this is leftover from me manually testing idempotence. I'll remove.

internal/source/containers_image_test.go Show resolved Hide resolved
Copy link
Collaborator

@anik120 anik120 left a comment

Choose a reason for hiding this comment

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

leaving a "change request" to prevent it from accidentally getting in.

@joelanford
Copy link
Member Author

@anik120 I want to merge this as a separate fix since it is generally unrelated to your PR. Updating now to address comments.

Copy link
Member

@LalatenduMohanty LalatenduMohanty left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 18, 2024
Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 18, 2024
Copy link

openshift-ci bot commented Sep 18, 2024

New changes are detected. LGTM label has been removed.

@joelanford joelanford dismissed anik120’s stale review September 18, 2024 20:38

We want to merge this separate from the PR that found the bug.

@joelanford joelanford added this pull request to the merge queue Sep 18, 2024
Merged via the queue into operator-framework:main with commit 8c6625f Sep 18, 2024
12 of 13 checks passed
@joelanford joelanford deleted the resilient-delete-recursive branch October 22, 2024 13:03
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.

5 participants