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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/omq/cli/pipe.rb +22 -0
- data/lib/omq/cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a03141c60a8af670aa4de42bc5b5d286fbf3a975c5a455e9276bc2d4b87a0fb8
|
|
4
|
+
data.tar.gz: 2755cb1054df95a64b5faebe481e93ac2e3f391e878f54b5a30a17514dde399a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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 }
|
data/lib/omq/cli/version.rb
CHANGED