consul-templaterb 1.9.7 → 1.9.8
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/consul/async/consul_endpoint.rb +9 -4
- data/lib/consul/async/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0e7163a9f8ea72026dcc50a91da551a7e7ac27b4d276e3bcf4cbe71f14e2a9d4
|
|
4
|
+
data.tar.gz: e54468d856039191d377eced8706adae58c50a7c17b3a23c2a52ee2ae18a9481
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a56201067ca649e23c8d53370d4134cfb413543400ac5c1cbf615b31d16d7e69b8b9b6578125c1eb0348f2960628aafa29058c690b66893d6ef30328c6f93b9
|
|
7
|
+
data.tar.gz: 7599a3b441da669a0e43800a2e345f4d7586232d9ea5abd78ab9f2269ba8ceae3f6e219b299fd71f910ed753d387774b487845feeb90bcf67344c96e91f685a3
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
## (UNRELEASED)
|
|
4
4
|
|
|
5
|
+
## 1.9.8 (January 16, 2019)
|
|
6
|
+
|
|
7
|
+
BUGFIX:
|
|
8
|
+
|
|
9
|
+
* When default value was the same as real value, endpoints were always marked as
|
|
10
|
+
dirty, thus rendering of templates did never succeed.
|
|
11
|
+
Since default value for service was '[]', trying to fetch a non-existing service
|
|
12
|
+
did forbid templates to converge.
|
|
13
|
+
|
|
5
14
|
## 1.9.7 (January 15, 2019)
|
|
6
15
|
|
|
7
16
|
IMPROVEMENTS:
|
|
@@ -62,7 +62,7 @@ module Consul
|
|
|
62
62
|
end
|
|
63
63
|
class ConsulResult
|
|
64
64
|
attr_reader :data, :http, :x_consul_index, :last_update, :stats, :retry_in
|
|
65
|
-
def initialize(data, modified, http, x_consul_index, stats, retry_in)
|
|
65
|
+
def initialize(data, modified, http, x_consul_index, stats, retry_in, fake: false)
|
|
66
66
|
@data = data
|
|
67
67
|
@modified = modified
|
|
68
68
|
@http = http
|
|
@@ -70,6 +70,11 @@ module Consul
|
|
|
70
70
|
@last_update = Time.now.utc
|
|
71
71
|
@stats = stats
|
|
72
72
|
@retry_in = retry_in
|
|
73
|
+
@fake = fake
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def fake?
|
|
77
|
+
@fake
|
|
73
78
|
end
|
|
74
79
|
|
|
75
80
|
def modified?
|
|
@@ -120,7 +125,7 @@ module Consul
|
|
|
120
125
|
@query_params = query_params
|
|
121
126
|
@stopping = false
|
|
122
127
|
@stats = EndPointStats.new
|
|
123
|
-
@last_result = ConsulResult.new(default_value, false, HttpResponse.new(nil), 0, stats, 1)
|
|
128
|
+
@last_result = ConsulResult.new(default_value, false, HttpResponse.new(nil), 0, stats, 1, fake: true)
|
|
124
129
|
on_response { |result| @stats.on_response result }
|
|
125
130
|
on_error { |http| @stats.on_error http }
|
|
126
131
|
_enable_network_debug if conf.debug && conf.debug[:network]
|
|
@@ -228,7 +233,7 @@ module Consul
|
|
|
228
233
|
HttpResponse.new(http)
|
|
229
234
|
end
|
|
230
235
|
new_content = http_result.response.freeze
|
|
231
|
-
modified = @last_result.
|
|
236
|
+
modified = @last_result.fake? || @last_result.data != new_content
|
|
232
237
|
if n_consul_index == consul_index || n_consul_index.nil?
|
|
233
238
|
retry_in = modified ? conf.missing_index_retry_time_on_diff : conf.missing_index_retry_time_on_unchanged
|
|
234
239
|
n_consul_index = consul_index
|
|
@@ -242,7 +247,7 @@ module Consul
|
|
|
242
247
|
queue.push(n_consul_index)
|
|
243
248
|
end
|
|
244
249
|
end
|
|
245
|
-
result = ConsulResult.new(new_content, modified, http_result, n_consul_index, stats, retry_in)
|
|
250
|
+
result = ConsulResult.new(new_content, modified, http_result, n_consul_index, stats, retry_in, fake: false)
|
|
246
251
|
@last_result = result
|
|
247
252
|
@ready = true
|
|
248
253
|
@s_callbacks.each { |c| c.call(result) }
|
data/lib/consul/async/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: consul-templaterb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SRE Core Services
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-01-
|
|
11
|
+
date: 2019-01-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: em-http-request
|