Skip to content

Fix liftover caching bug in tests #878

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

Merged
merged 14 commits into from
Aug 20, 2024
Merged

Conversation

bpblanken
Copy link
Collaborator

@bpblanken bpblanken commented Aug 20, 2024

There's a sneaky issue we're running into in the tests with hail's liftover being cached between unit tests. We're also not correctly using the locally stored leftovers but we should be!

@bpblanken bpblanken changed the title Benb/fix caching bug in tests Fix leftover caching bug in tests Aug 20, 2024
@bpblanken bpblanken changed the title Fix leftover caching bug in tests Fix liftover caching bug in tests Aug 20, 2024
@bpblanken bpblanken marked this pull request as ready for review August 20, 2024 20:23
@bpblanken bpblanken requested a review from a team as a code owner August 20, 2024 20:23
# This runs "before" as task to account for situations where
# the Hail write fails and we do not have the chance to
# run this method.
remove_liftover()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I understand why we want this for testing, but in production why wouldn't we want to use the cached liftover form a previous run?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In some sense yes. But our current setup runs almost task in a fresh dataproc job so we're getting an empty and clean Hail for the most part anyways.

I could definitely be convinced to move this into the tearDown of the tests since that's more logically correct and more performant (but likely not noticeably), but I think it's easier to reason about this in the application code as part of the initialization process for a task. I don't like there being sneaky state inside of a task context without it being clear as to why.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't like there being sneaky state inside of a task context without it being clear as to why.

Maybe update the comment to reflect this to make it clearer why this is being cleaned up at all (the current comment is just explaining why it runs in the before but not why its being run at all)

@bpblanken bpblanken merged commit 1bfe3b3 into dev Aug 20, 2024
3 checks passed
@bpblanken bpblanken deleted the benb/fix_caching_bug_in_tests branch August 20, 2024 22:08
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.

2 participants