consul-templaterb 1.10.0 → 1.10.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d389019e21022ecf1c1e1783133ff49379d6e97141cf5a083b2c9c805c013f7
4
- data.tar.gz: 4860d2607e32173aae5e4e2aa606564bc1cc1ccec4876d2079c7f22404c2a4b0
3
+ metadata.gz: 7d992cca0fe8acc08d28b9d284f033caf1f84804a3a0597474d6a915aaeb9b1b
4
+ data.tar.gz: b9ca91c0a8ad433926232cd85103829cdb4e285e343e1801497828014930d827
5
5
  SHA512:
6
- metadata.gz: d092840b101377b92a526778b6b77aa73cac04f7f97526fcd8e8c52a54bb9e335e8644e4c18362fa07cba982f5edd748d47bd0d2440c7f3ad0b4c037ec9d5cbf
7
- data.tar.gz: 8805e42b635107b8936daf0b71e1f789afa9da4b61fb88aca3c0d3f4192d5d5a03f997cda5df5e3526433e81de95d436e8c4dbc5290673d357b29a1753c6449b
6
+ metadata.gz: 5a1866f696551f174f146172633f9613b133a4caf9aa797670d8e6ace14e06e0bf7647f194881db57cb5e6f4e5918a3e7d78bf2ab2524d93aeffc5bb13c69322
7
+ data.tar.gz: 46e23baa70aefeb927cd60965708206818844a130ba9dc4f4214a850583a6be67f3969bfdbd2720abd330d321400a4a129d0f4049a0e49d9ddd80ee134743d24
data/CHANGELOG.md CHANGED
@@ -2,10 +2,16 @@
2
2
 
3
3
  ## (UNRELEASED)
4
4
 
5
- IMPROVEMENTS:
5
+ ## 1.10.1 (February 28, 2019)
6
+
7
+ BUGFIX:
8
+
9
+ * Ensure that timeline sort properly events when healthchecks are removed (eg: maintenance)
6
10
 
7
11
  ## 1.10.0 (February 27, 2019)
8
12
 
13
+ IMPROVEMENTS:
14
+
9
15
  * new sample [samples/tools/find_all_failing_services.txt.erb](samples/tools/find_all_failing_services.txt.erb)
10
16
  to find all failing service instances on all DCs very easily.
11
17
  * Do not report timestamps in metrics.erb as it is toxic for Prometheus
@@ -1,5 +1,5 @@
1
1
  module Consul
2
2
  module Async
3
- VERSION = '1.10.0'.freeze
3
+ VERSION = '1.10.1'.freeze
4
4
  end
5
5
  end
@@ -95,6 +95,12 @@ end
95
95
  def compute_checks(old_state, cur_state, service_name, instance_name)
96
96
  old_checks = old_state.dig(service_name, instance_name, 'checks') || {}
97
97
  new_checks = cur_state.dig(service_name, instance_name, 'checks') || {}
98
+ old_index = old_state.dig(service_name, instance_name, 'idx')
99
+ # In case of removal of a check (eg: maintenance), Idx might be decreased, ensure it is not
100
+ if old_index
101
+ new_index = cur_state.dig(service_name, instance_name, 'idx')
102
+ cur_state[service_name][instance_name]['idx'] = @newest_index if new_index && new_index < old_index
103
+ end
98
104
  all_checks = Set.new(old_checks.keys + new_checks.keys)
99
105
  checks = []
100
106
  all_checks.each do |check_id|
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.10.0
4
+ version: 1.10.1
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-02-27 00:00:00.000000000 Z
11
+ date: 2019-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: em-http-request