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

Add retries to taxonomy reading. #205

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Add retries to taxonomy reading. #205

merged 1 commit into from
Mar 26, 2024

Conversation

jdangerx
Copy link
Member

@jdangerx jdangerx commented Mar 22, 2024

Overview

Addresses catalyst-cooperative/pudl#3449

What problem does this address?

When we try to load a taxonomy multiple times concurrently, we run into FileExistsErrors as the various threads try to cache files at the same location.

What did you change in this PR?

I made us retry the taxonomy read if the cache is confused.

I also added a surprisingly hard-to-write test that runs these taxonomy reads in parallel.

Testing

How did you make sure this worked? How can a reviewer verify this?

To-do list

Tasks

@jdangerx jdangerx requested review from a team and zschira and removed request for a team March 22, 2024 20:00
When we try to load a taxonomy multiple times concurrently, we run into
`FileExistsError`s as the various threads try to cache files at the same
location.
@zaneselvans
Copy link
Member

I know you didn't ask for my review but it's quick and I'd love for this to get fully in before the 1st of the month so we can get the new FERC archives nailed down.

@jdangerx
Copy link
Member Author

Thanks for the review! I had just tagged @catalyst-cooperative/inframundo for review & the round-robin picked @zschira - I had no strong preference for review here :)

Fortunately, the FERC monthly archives should already be fixed by this PR. But this is part of getting the PUDL nightly builds to be more reliable, so still worth getting it in sooner rather than later.

@jdangerx jdangerx merged commit 9fc1f35 into main Mar 26, 2024
14 checks passed
@jdangerx jdangerx deleted the retry-taxonomy-reads branch March 26, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants