consul-templaterb 1.9.7 → 1.9.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8362a90f73e7dfef755f1daeba28b350b62951f3ddaf795eb3449f6b7f489be6
4
- data.tar.gz: 57d7df6ab6061ef40349698d3a7ac8eab02d7f7fbf84a5c22fa9e89e88a72771
3
+ metadata.gz: 0e7163a9f8ea72026dcc50a91da551a7e7ac27b4d276e3bcf4cbe71f14e2a9d4
4
+ data.tar.gz: e54468d856039191d377eced8706adae58c50a7c17b3a23c2a52ee2ae18a9481
5
5
  SHA512:
6
- metadata.gz: d0ebfdef413617a55914847a798123a5541fcec5968e88967fb8919fb9ab0005d7ed2c29972bf5de71cd36764bec6c013fc4943e095f83fde22f4edcfc06a85b
7
- data.tar.gz: 5de05990e69ec4c009990728233288b09ea22c32181fe441fbfd11e52c93d831c08ce5be87fd55a0666070e2992a250e55c9f2ac878fb77f800283b61334cbec
6
+ metadata.gz: 3a56201067ca649e23c8d53370d4134cfb413543400ac5c1cbf615b31d16d7e69b8b9b6578125c1eb0348f2960628aafa29058c690b66893d6ef30328c6f93b9
7
+ data.tar.gz: 7599a3b441da669a0e43800a2e345f4d7586232d9ea5abd78ab9f2269ba8ceae3f6e219b299fd71f910ed753d387774b487845feeb90bcf67344c96e91f685a3
@@ -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.nil? ? true : @last_result.data != new_content
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) }
@@ -1,5 +1,5 @@
1
1
  module Consul
2
2
  module Async
3
- VERSION = '1.9.7'.freeze
3
+ VERSION = '1.9.8'.freeze
4
4
  end
5
5
  end
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.7
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-15 00:00:00.000000000 Z
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