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

Bump async from 2.18.0 to 2.19.0 #971

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 8, 2024

Bumps async from 2.18.0 to 2.19.0.

Changelog

Sourced from async's changelog.

v2.19.0

Async::Scheduler Debugging

Occasionally on issues, I encounter people asking for help and I need more information. Pressing Ctrl-C to exit a hung program is common, but it usually doesn't provide enough information to diagnose the problem. Setting the CONSOLE_LEVEL=debug environment variable will now print additional information about the scheduler when you interrupt it, including a backtrace of the current tasks.

> CONSOLE_LEVEL=debug bundle exec ruby ./test.rb
^C  0.0s    debug: Async::Reactor [oid=0x974] [ec=0x988] [pid=9116] [2024-11-08 14:12:03 +1300]
               | Scheduler interrupted: Interrupt
               | #<Async::Reactor:0x0000000000000974 1 children (running)>
               | 	#<Async::Task:0x000000000000099c /Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:185:in `transfer' (running)>
               | 	→ /Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:185:in `transfer'
               | 	  /Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:185:in `block'
               | 	  /Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:207:in `kernel_sleep'
               | 	  /Users/samuel/Developer/socketry/async/test.rb:7:in `sleep'
               | 	  /Users/samuel/Developer/socketry/async/test.rb:7:in `sleepy'
               | 	  /Users/samuel/Developer/socketry/async/test.rb:12:in `block in <top (required)>'
               | 	  /Users/samuel/Developer/socketry/async/lib/async/task.rb:197:in `block in run'
               | 	  /Users/samuel/Developer/socketry/async/lib/async/task.rb:420:in `block in schedule'
/Users/samuel/Developer/socketry/async/lib/async/scheduler.rb:317:in `select': Interrupt
... (backtrace continues) ...

This gives better visibility into what the scheduler is doing, and should help diagnose issues.

Console Shims

The async gem depends on console gem, because my goal was to have good logging by default without thinking about it too much. However, some users prefer to avoid using the console gem for logging, so I've added an experimental set of shims which should allow you to bypass the console gem entirely.

require 'async/console'
require 'async'
Async{raise "Boom"}

Will now use Kernel#warn to print the task failure warning:

#<Async::Task:0x00000000000012d4 /home/samuel/Developer/socketry/async/lib/async/task.rb:104:in `backtrace' (running)>
Task may have ended with unhandled exception.
(irb):4:in `block in <top (required)>': Boom (RuntimeError)
	from /home/samuel/Developer/socketry/async/lib/async/task.rb:197:in `block in run'
	from /home/samuel/Developer/socketry/async/lib/async/task.rb:420:in `block in schedule'
Commits
  • a0737d8 Bump minor version.
  • 9b54ad3 Replace ASYNC_SCHEDULER_DEBUG with Console.debug.
  • 21f9d55 Add ASYNC_SCHEDULER_DEBUG feature for diagnosing hangs.
  • 0a79692 Add release notes.
  • 4a7549e Use simpler interface for emitting warnings, and add shim for Console gem.
  • 1c70c17 Expand Kernel::system tests.
  • 9639048 Add test for non-existant executable.
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [async](https://github.com/socketry/async) from 2.18.0 to 2.19.0.
- [Release notes](https://github.com/socketry/async/releases)
- [Changelog](https://github.com/socketry/async/blob/main/releases.md)
- [Commits](socketry/async@v2.18.0...v2.19.0)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Nov 8, 2024
@chadlwilson chadlwilson merged commit 79b768a into master Nov 8, 2024
1 check passed
@dependabot dependabot bot deleted the dependabot/bundler/async-2.19.0 branch November 8, 2024 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant