consul-templaterb 1.9.5 → 1.9.6
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/.rubocop.yml +1 -1
- data/CHANGELOG.md +11 -0
- data/lib/consul/async/consul_endpoint.rb +4 -2
- data/lib/consul/async/version.rb +1 -1
- data/samples/consul-ui/timeline.json.erb +6 -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: d97e523ed7d46b52d6f8076263af42d649f01f74085d5ae58a613cf38ab14e31
|
4
|
+
data.tar.gz: 99255a8e34cae9c05d685f88df56452b77b939d99c6c0b0d48fa3b2156e40457
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6c10ccb302c52e4c97d5b7620b6123cbbca69abe720b8ef2764fbc30fd449ea5fc89412ad9bf7ade0de3c8f12b67dcb5d6058159cf3db212bf452c6efaa9067
|
7
|
+
data.tar.gz: 168bf127d58cff2c48de8cddda29b6eeac7d113563c61b15dea881fbfb2339e46b69734ad681ba6d3298d50a548b87707faea3d506ce9188f7580de321126b8f
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
|
3
3
|
## (UNRELEASED)
|
4
4
|
|
5
|
+
## 1.9.6 (January 15, 2019)
|
6
|
+
|
7
|
+
BUGFIX:
|
8
|
+
|
9
|
+
* Keep connections open properly as it increase timeouts on Consul servers on
|
10
|
+
very large templates
|
11
|
+
|
12
|
+
IMPROVEMENTS:
|
13
|
+
|
14
|
+
* Display error message when Retrying every 10 errors
|
15
|
+
|
5
16
|
## 1.9.5 (January 14, 2019)
|
6
17
|
|
7
18
|
BUGFIX:
|
@@ -215,7 +215,9 @@ module Consul
|
|
215
215
|
# Dirty hack, but contrary to other path, when key is not present, Consul returns 404
|
216
216
|
is_kv_empty = path.start_with?('/v1/kv') && http.response_header.status == 404
|
217
217
|
if !is_kv_empty && enforce_json_200 && http.response_header.status != 200 && http.response_header['Content-Type'] != 'application/json'
|
218
|
-
_handle_error(http, consul_index)
|
218
|
+
_handle_error(http, consul_index) do
|
219
|
+
STDERR.puts "[RETRY][#{path}] (#{@consecutive_errors} errors)" if (@consecutive_errors % 10) == 1
|
220
|
+
end
|
219
221
|
else
|
220
222
|
n_consul_index = find_x_consul_index(http)
|
221
223
|
@x_consul_index = n_consul_index.to_i if n_consul_index
|
@@ -250,7 +252,7 @@ module Consul
|
|
250
252
|
http.errback do
|
251
253
|
unless @stopping
|
252
254
|
_handle_error(http, consul_index) do
|
253
|
-
|
255
|
+
STDERR.puts "[RETRY][#{path}] (#{@consecutive_errors} errors) due to #{http.error}" if (@consecutive_errors % 10) == 1
|
254
256
|
end
|
255
257
|
end
|
256
258
|
end
|
data/lib/consul/async/version.rb
CHANGED
@@ -32,12 +32,17 @@ cur_state = services.map do |service_name, _tags|
|
|
32
32
|
instances = snodes
|
33
33
|
.sort { |a, b| a['Node']['Node'] <=> b['Node']['Node'] }
|
34
34
|
.map do |instance|
|
35
|
+
mod_index = instance['Service']['ModifyIndex'] || 0
|
36
|
+
instance['Checks'].each do |chk|
|
37
|
+
mindex = chk['ModifyIndex'] || 0
|
38
|
+
mod_index = mindex if mod_index < mindex
|
39
|
+
end
|
35
40
|
["#{instance['Node']['Node']}:#{instance['Service']['ID']}",
|
36
41
|
{
|
37
42
|
'address' => instance.service_address,
|
38
43
|
'node' => instance['Node']['Node'],
|
39
44
|
'port' => instance['Service']['Port'],
|
40
|
-
'idx' =>
|
45
|
+
'idx' => mod_index || cur_index,
|
41
46
|
'status' => instance.status,
|
42
47
|
'stats' => cur_stats,
|
43
48
|
'checks' => instance['Checks'].map { |check| [check['CheckID'], { 'name' => check['Name'], 'status' => check['Status'], 'output' => check['Output'] }] }.to_h
|
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.6
|
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-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: em-http-request
|