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

Ignore incomplete entries in JSON 'run files map' caches #547

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

takluyver
Copy link
Member

There was a bug in FileAccess where if we read a valid run files map without legacy_sources, it wouldn't look at the files to identify legacy_sources.

We have tried to be clever, by using the available information from the cache in such cases and getting the new information from the files. This has some performance benefit, because you read less from the files, but it means more complexity, creating bugs like this one. And we still have to open every file to read something from it.

So I think we should go with the simpler option, ignoring incomplete cache entries entirely, even if that is a bit slower.

[We should also extend it to allow caching runs from the red folder into scratch, but that's a separate question]

cc @turkot @philsmt

@takluyver takluyver added the bug Something isn't working label Aug 28, 2024
@takluyver takluyver added this to the 1.18 milestone Aug 28, 2024
Copy link
Contributor

@philsmt philsmt left a comment

Choose a reason for hiding this comment

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

Caching and impure functions don't mix 😒

Thanks for the fix, and I agree the performance benefit is likely negligible. LGTM!

extra_data/run_files_map.py Outdated Show resolved Hide resolved
extra_data/run_files_map.py Outdated Show resolved Hide resolved
@takluyver takluyver merged commit 6a5aecc into master Sep 9, 2024
9 checks passed
@takluyver takluyver deleted the fix/run-cache-ignore-partial branch September 9, 2024 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants