govuk_app_config 2.7.1 → 2.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -2
- data/govuk_app_config.gemspec +3 -3
- data/lib/govuk_app_config/govuk_error.rb +4 -0
- data/lib/govuk_app_config/govuk_error/configure.rb +1 -0
- data/lib/govuk_app_config/govuk_healthcheck.rb +1 -0
- data/lib/govuk_app_config/govuk_healthcheck/redis.rb +25 -0
- data/lib/govuk_app_config/govuk_statsd.rb +1 -1
- data/lib/govuk_app_config/version.rb +1 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33e68122dc749c8469335b186722c24e478858c06e336d7ee800f6ab123b4976
|
4
|
+
data.tar.gz: fd63ff5feb1c2351d501d979dc22cff55ae8a09d3399d1c06ae45f2cfbaa11a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 474d4e1c5cfb393875e0347c24a201017923dfd5f327b4d95563d2d1a791e45aae4d9094a3b44dc2dd1493bb4ce519f4146b2159b88efb3b4a4f5520eb2eed3e
|
7
|
+
data.tar.gz: d1dceb6b4dc58280cb84a73771c95cb2ec9e7c37b11cd66d8594e49b23b4d396dce0ee07a1f074a32b00bde6b49f5d8b921a8f6a3f3507787376420d19e5f263
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,31 @@
|
|
1
|
+
# 2.8.4
|
2
|
+
|
3
|
+
* Ensure Redis healthcheck avoids potential race condition ([#185](https://github.com/alphagov/govuk_app_config/pull/185))
|
4
|
+
|
5
|
+
# 2.8.3
|
6
|
+
|
7
|
+
* Add new Redis healthcheck and relevant tests ([#183](https://github.com/alphagov/govuk_app_config/pull/183))
|
8
|
+
|
9
|
+
# 2.8.2
|
10
|
+
|
11
|
+
* Allow apps to configure the host and protocol for Statsd ([#180](https://github.com/alphagov/govuk_app_config/pull/180))
|
12
|
+
|
13
|
+
# 2.8.1
|
14
|
+
|
15
|
+
* Add `GdsApi::ContentStore::ItemNotFound` to `data_sync_excluded_exceptions` (https://github.com/alphagov/govuk_app_config/pull/178)
|
16
|
+
* Dependabot bumps to allow latest versions of logstasher ([#177](https://github.com/alphagov/govuk_app_config/pull/177)) and unicorn ([#175](https://github.com/alphagov/govuk_app_config/pull/175))
|
17
|
+
|
18
|
+
# 2.8.0
|
19
|
+
|
20
|
+
* Adds govuk_app_config version to every Sentry call (https://github.com/alphagov/govuk_app_config/pull/174)
|
21
|
+
|
1
22
|
# 2.7.1
|
2
23
|
|
3
|
-
* Fix broken data sync error handling for non-Rails apps
|
24
|
+
* Fix broken data sync error handling for non-Rails apps (https://github.com/alphagov/govuk_app_config/pull/172)
|
4
25
|
|
5
26
|
# 2.7.0
|
6
27
|
|
7
|
-
* Ignore intermittent template retrieval errors from Slimmer
|
28
|
+
* Ignore intermittent template retrieval errors from Slimmer (https://github.com/alphagov/govuk_app_config/pull/170)
|
8
29
|
|
9
30
|
# 2.6.0
|
10
31
|
|
data/govuk_app_config.gemspec
CHANGED
@@ -20,10 +20,10 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = %w[lib]
|
22
22
|
|
23
|
-
spec.add_dependency "logstasher", ">= 1.2.2", "<
|
23
|
+
spec.add_dependency "logstasher", ">= 1.2.2", "< 2.2.0"
|
24
24
|
spec.add_dependency "sentry-raven", "~> 3.1.1"
|
25
|
-
spec.add_dependency "statsd-ruby", "~> 1.
|
26
|
-
spec.add_dependency "unicorn", ">= 5.4", "< 5.
|
25
|
+
spec.add_dependency "statsd-ruby", "~> 1.5.0"
|
26
|
+
spec.add_dependency "unicorn", ">= 5.4", "< 5.9"
|
27
27
|
|
28
28
|
spec.add_development_dependency "byebug"
|
29
29
|
spec.add_development_dependency "climate_control"
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require "sentry-raven"
|
2
2
|
require "govuk_app_config/govuk_statsd"
|
3
3
|
require "govuk_app_config/govuk_error/configuration"
|
4
|
+
require "govuk_app_config/version"
|
4
5
|
|
5
6
|
module GovukError
|
6
7
|
def self.notify(exception_or_message, args = {})
|
@@ -9,6 +10,9 @@ module GovukError
|
|
9
10
|
args[:extra] ||= {}
|
10
11
|
args[:extra].merge!(parameters: args.delete(:parameters))
|
11
12
|
|
13
|
+
args[:tags] ||= {}
|
14
|
+
args[:tags][:govuk_app_config_version] = GovukAppConfig::VERSION
|
15
|
+
|
12
16
|
Raven.capture_exception(exception_or_message, args)
|
13
17
|
end
|
14
18
|
|
@@ -2,6 +2,7 @@ require "govuk_app_config/govuk_healthcheck/checkup"
|
|
2
2
|
require "govuk_app_config/govuk_healthcheck/active_record"
|
3
3
|
require "govuk_app_config/govuk_healthcheck/mongoid"
|
4
4
|
require "govuk_app_config/govuk_healthcheck/rails_cache"
|
5
|
+
require "govuk_app_config/govuk_healthcheck/redis"
|
5
6
|
require "govuk_app_config/govuk_healthcheck/sidekiq_redis"
|
6
7
|
require "govuk_app_config/govuk_healthcheck/threshold_check"
|
7
8
|
require "govuk_app_config/govuk_healthcheck/sidekiq_queue_check"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require "securerandom"
|
2
|
+
|
3
|
+
module GovukHealthcheck
|
4
|
+
class Redis
|
5
|
+
def name
|
6
|
+
:redis_connectivity
|
7
|
+
end
|
8
|
+
|
9
|
+
def status
|
10
|
+
client = ::Redis.new
|
11
|
+
|
12
|
+
key = "healthcheck-#{SecureRandom.hex}"
|
13
|
+
|
14
|
+
client.set(key, "val")
|
15
|
+
client.get(key)
|
16
|
+
client.del(key)
|
17
|
+
|
18
|
+
client.close
|
19
|
+
|
20
|
+
GovukHealthcheck::OK
|
21
|
+
rescue StandardError
|
22
|
+
GovukHealthcheck::CRITICAL
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -8,7 +8,7 @@ module GovukStatsd
|
|
8
8
|
|
9
9
|
def self.client
|
10
10
|
@client ||= begin
|
11
|
-
statsd_client = ::Statsd.new("localhost")
|
11
|
+
statsd_client = ::Statsd.new(ENV["GOVUK_STATSD_HOST"] || "localhost", 8125, ENV["GOVUK_STATSD_PROTOCOL"]&.to_sym || :udp)
|
12
12
|
statsd_client.namespace = ENV["GOVUK_STATSD_PREFIX"].to_s
|
13
13
|
statsd_client
|
14
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_app_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstasher
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 1.2.2
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 2.2.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 1.2.2
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 2.2.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: sentry-raven
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
53
|
+
version: 1.5.0
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 1.
|
60
|
+
version: 1.5.0
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: unicorn
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
version: '5.4'
|
68
68
|
- - "<"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: '5.
|
70
|
+
version: '5.9'
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -77,7 +77,7 @@ dependencies:
|
|
77
77
|
version: '5.4'
|
78
78
|
- - "<"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: '5.
|
80
|
+
version: '5.9'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: byebug
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -236,6 +236,7 @@ files:
|
|
236
236
|
- lib/govuk_app_config/govuk_healthcheck/checkup.rb
|
237
237
|
- lib/govuk_app_config/govuk_healthcheck/mongoid.rb
|
238
238
|
- lib/govuk_app_config/govuk_healthcheck/rails_cache.rb
|
239
|
+
- lib/govuk_app_config/govuk_healthcheck/redis.rb
|
239
240
|
- lib/govuk_app_config/govuk_healthcheck/sidekiq_queue_check.rb
|
240
241
|
- lib/govuk_app_config/govuk_healthcheck/sidekiq_queue_latency_check.rb
|
241
242
|
- lib/govuk_app_config/govuk_healthcheck/sidekiq_redis.rb
|