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: don't fail if cache is corrupted #7728

Closed
wants to merge 1 commit into from

Conversation

sileht
Copy link

@sileht sileht commented Mar 28, 2023

Related #7718

  • Added tests for changed code.
  • Updated documentation for changed code.

@sileht
Copy link
Author

sileht commented Mar 28, 2023

The goal is to show which cache key/path is corrupted to help to debug and get more information in future issues opened on this subject.

Tell me if the new behavior looks good, or if you prefer to keep the failure as before and convert the JSONDecodeError exception into a custom Exception that contains the key and the path of the problèmatic cache entry.

(I will add tests once we are ok with the solution).

@radoering
Copy link
Member

IMO it makes sense to remove invalid entries. Maybe, the warning should say that the invalid entry is removed. If it only says that there is an invalid entry, but IIUC the entry is removed and will probably be replaced by a valid entry, an interested user, who opens the mentioned file, might be confused that the invalid entry seems to be valid.

@dimbleby
Copy link
Contributor

duplicates #7453

@radoering
Copy link
Member

Closing in favor of #7453

@radoering radoering closed this Mar 31, 2023
Copy link

github-actions bot commented Mar 3, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants