omq-cli 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e3472d73b7d467c20072e00da82aa7222c1cc99cc99e4147f833cb010422e11
4
- data.tar.gz: 0d2f5fff5723cc45af838de506d92d47581dbb24feb302d63b297565393cd182
3
+ metadata.gz: a03141c60a8af670aa4de42bc5b5d286fbf3a975c5a455e9276bc2d4b87a0fb8
4
+ data.tar.gz: 2755cb1054df95a64b5faebe481e93ac2e3f391e878f54b5a30a17514dde399a
5
5
  SHA512:
6
- metadata.gz: 10001c2717aded533e3c902c481d34bf5a6870e55207cec33b04c7043f7f19cfb71c68f99f467554ca619cebba352a6258bc634538d781caeeefb76cc0813b18
7
- data.tar.gz: 1fd287acb7bd0fb85d7c260a74c7ef32208c4893b819f780e1a9b05e3ea7219619a4b00e41847ae03a2a5cb1356348416e17d4e74f1a5cb4c8fcf42cd5741013
6
+ metadata.gz: f245e7f524d745382074347852f1d34e5e1f46e633fe024b7888c05942a399639e69e876ae92c5ace5172800b0dc6a3bd8cd088d3b52f389ea0fb212e0f8da58
7
+ data.tar.gz: 34992fe5962fd2639b0c3e92597e3d2d6a134f3ac4fecadfa3d64b1d566994cf9f8ef36ce08fc929ab97bfcf7a7b4dd7f9c1de241b8c87e2a207ce17a838c7d2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.1 — 2026-04-07
4
+
5
+ ### Fixed
6
+
7
+ - **Pipe `-P` preresolves TCP hostnames** — DNS resolution happens on the
8
+ main thread before spawning Ractors, avoiding `Ractor::IsolationError`
9
+ on `Resolv::DefaultResolver`. All resolved addresses (IPv4 + IPv6) are
10
+ passed to workers.
11
+
3
12
  ## 0.7.0 — 2026-04-07
4
13
 
5
14
  ### Changed
data/lib/omq/cli/pipe.rb CHANGED
@@ -132,6 +132,8 @@ module OMQ
132
132
  def run_parallel(task)
133
133
  OMQ.freeze_for_ractors!
134
134
  in_eps, out_eps = resolve_endpoints
135
+ in_eps = preresolve_tcp(in_eps)
136
+ out_eps = preresolve_tcp(out_eps)
135
137
  workers = spawn_workers(config, in_eps, out_eps)
136
138
  workers.each do |w|
137
139
  w.join
@@ -240,6 +242,26 @@ module OMQ
240
242
  # ── Shared helpers ────────────────────────────────────────────────
241
243
 
242
244
 
245
+ # Resolves TCP hostnames to IP addresses so Ractors don't touch
246
+ # Resolv::DefaultResolver (which is not shareable).
247
+ #
248
+ def preresolve_tcp(endpoints)
249
+ endpoints.flat_map do |ep|
250
+ url = ep.url
251
+ if url.start_with?("tcp://")
252
+ host, port = OMQ::Transport::TCP.parse_endpoint(url)
253
+ Addrinfo.getaddrinfo(host, port, nil, :STREAM).map do |addr|
254
+ ip = addr.ip_address
255
+ ip = "[#{ip}]" if ip.include?(":")
256
+ Endpoint.new("tcp://#{ip}:#{addr.ip_port}", ep.bind?)
257
+ end
258
+ else
259
+ ep
260
+ end
261
+ end
262
+ end
263
+
264
+
243
265
  def with_timeout(seconds)
244
266
  if seconds
245
267
  Async::Task.current.with_timeout(seconds) { yield }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OMQ
4
4
  module CLI
5
- VERSION = "0.7.0"
5
+ VERSION = "0.7.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omq-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Wenger