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 #3501 flakey test #3593

Merged
merged 1 commit into from
May 4, 2023

Conversation

samspills
Copy link
Contributor

resolves #3501 for real this time!

With help from Arman, we figured out the problem I mentioned in my comment on the parent issue, where it looked like unsafeToFutureCancelable was failing before the release task was even enqueued. What's actually happening is that when the double check on alive fails, we try to cancel the task by submitting the cancellation to the dispatcher as a new task. It was the cancellation that was failing immediately because we'd already started the release process.

Short term (this pr): adding a small sleep as part of the task before the release ensures that we finish the task and don't get caught trying to cancel with an already shut-down dispatcher. This should resolve the flake.

Longer term: Arman and I have been chatting about a way to possibly change the enqueueing so that we don't need the double-check on alive. If we figure that out, then it would remove that race condition for good :)

@samspills samspills self-assigned this May 4, 2023
Copy link
Member

@armanbilge armanbilge left a comment

Choose a reason for hiding this comment

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

Thanks for chasing it up! This was Fun:tm: to investigate.

@armanbilge armanbilge merged commit b34edeb into typelevel:series/3.x May 4, 2023
@samspills samspills deleted the sam/3501/flakey-test branch May 4, 2023 02:01
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.

Closing a Dispatcher from within it seems to enter invalid state (?)
2 participants