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

Update dependency async to v2.20.0 #258

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 14, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
async 2.18.0 -> 2.20.0 age adoption passing confidence

Release Notes

socketry/async (async)

v2.20.0

Compare Source

Traces and Metrics Providers

Async now has traces and metrics providers for various core classes. This allows you to emit traces and metrics to a suitable backend (including DataDog, New Relic, OpenTelemetry, etc.) for monitoring and debugging purposes.

To take advantage of this feature, you will need to introduce your own config/traces.rb and config/metrics.rb. Async's own repository includes these files for testing purposes, you could copy them into your own project and modify them as needed.

v2.19.0

Compare Source

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'

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

github-actions bot commented Nov 14, 2024

Container Scanning Status: ✅ Success


ghcr.io/pulibrary/imagecat-rails:pr-258 (debian 12.8)
=====================================================
Total: 0 (HIGH: 0, CRITICAL: 0)

@renovate renovate bot force-pushed the renovate/all-minor-patch branch from fdd9df3 to d7ec48b Compare November 14, 2024 22:15
@tpendragon tpendragon merged commit 334fb1e into main Nov 14, 2024
5 checks passed
@tpendragon tpendragon deleted the renovate/all-minor-patch branch November 14, 2024 22:56
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.

1 participant