ReleaseUpdater: refactor to use Process.send_after #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We had a rogue test failing in our test suite after upgrading to Elixir 1.4.0-rc.1 (currently on tzdata 0.5.9 too). After a lot of digging it seems like something is failing due to how Tasks are spawned. I couldn't figure out what the exact issue was, but this refactoring seemed to fix it.
Here's the error I was seeing which was being thrown by the
Task.async
calls almost immediately in our test.It looks like those are being thrown because the Task is trying to
send
back to the Server process after running, and the server is crashing because it's trying to parse the message as ahandle_info
: https://github.com/elixir-lang/elixir/blob/master/lib/elixir/lib/task/supervised.ex#L36. It's a little in the weeds for me, but I think this is generally caught by Task.await, but is being bubbled up to the GenServer implementation insteadThis refactor re-uses the existing Server process instead of creating a Task process