rails-profiler 0.44.6 → 0.44.7

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: '0827bb99cc60c4197b855d01901a5faadc46ae4d735b8593ff46b1c25e5d0a83'
4
- data.tar.gz: 0fcfd9836905f32dd2a38cc82720e02bd4bc52e21d881e8ac3cfba52c5b3fe5d
3
+ metadata.gz: 7e5e67693969c446b7da7edacf21a86db824285009870c5a9efa6600d9f8cf45
4
+ data.tar.gz: a80f11e81cb4ba3a1d9873dc266b47ea7f58947af1411348b12a889576ef6574
5
5
  SHA512:
6
- metadata.gz: a684c6601be9538b0a98b49ed6feddcbd151cafbd5fad5d85894a193d30f83af85e3704145efb38ca77ae9563f86b9027025cb9c32e5e92b2812207b527561a0
7
- data.tar.gz: fde9fb7c8a41f711cf9d940be8304fc885c05b4ea01e23e64706036084013f3502bba139b8c7775b554b2b925d34c3983bb5b0d14805922d96e394f17bcd25fb
6
+ metadata.gz: c06fbe2c4dffe19ee1d74b97b946986d823a97c207e5928ce799cb05aafb81def4d74893250aacc1b6f71ff4b240a11b367334039ff74ff47bfd269559d82a03
7
+ data.tar.gz: 5c133bd5c4a834c4259cf62a9999615d4317ae7e2d442047a9737619e3bb4d8b9a48b779de83891ddddb76d9dc4172b05db2e2ce70755751107e3449d66a38f5
data/CHANGELOG.md CHANGED
@@ -19,6 +19,18 @@ every commit of every tag interval is accounted for one way or the other.
19
19
 
20
20
  ## [Unreleased]
21
21
 
22
+ ## [0.44.7] - 2026-10-22
23
+
24
+ <!-- stamped -->
25
+
26
+ ### Fixed
27
+
28
+ - **Cluster:** the `post` method of `MasterClient` now includes `write_timeout` alongside `open_timeout`
29
+ and `read_timeout`, preventing extended waits when the master server stops responding mid-write.
30
+ - **Cluster:** configuration errors in the heartbeat loop (invalid `master_url` or missing secret) are
31
+ now logged once instead of on every heartbeat cycle, eliminating log noise from unrecoverable
32
+ configuration problems.
33
+
22
34
  ## [0.44.6] - 2026-10-21
23
35
 
24
36
  <!-- stamped -->
@@ -87,7 +87,8 @@ module Profiler
87
87
  def post(uri, body)
88
88
  Profiler.untracked_http do
89
89
  Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https",
90
- open_timeout: OPEN_TIMEOUT, read_timeout: READ_TIMEOUT) do |http|
90
+ open_timeout: OPEN_TIMEOUT, read_timeout: READ_TIMEOUT,
91
+ write_timeout: READ_TIMEOUT) do |http|
91
92
  http.post(uri.request_uri, body, request_headers)
92
93
  end
93
94
  end
@@ -135,12 +136,22 @@ module Profiler
135
136
  rescue => e
136
137
  @registered = false
137
138
  @failed = true
138
- log_warn("communication with the master failed, will retry", e)
139
+ if configuration_error?(e)
140
+ Profiler.log_error_once(:cluster_config, "Cluster: communication with the master failed due to configuration", e)
141
+ else
142
+ log_warn("communication with the master failed, will retry", e)
143
+ end
139
144
  ensure
140
145
  sleep interval
141
146
  end
142
147
  end
143
148
 
149
+ # True when the error is a permanent configuration problem that will not resolve by retrying.
150
+ def configuration_error?(error)
151
+ message = error.message.to_s
152
+ message.start_with?("master_url") || message.include?("secret")
153
+ end
154
+
144
155
  def log_info(msg)
145
156
  Profiler.log_info("Cluster: #{msg}")
146
157
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Profiler
4
- VERSION = "0.44.6"
4
+ VERSION = "0.44.7"
5
5
 
6
6
  GEM_ROOT = File.expand_path("../..", __dir__)
7
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-profiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.44.6
4
+ version: 0.44.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Duplessy