govuk_app_config 2.7.0 → 2.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -1
- 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_error/govuk_data_sync.rb +1 -1
- data/lib/govuk_app_config/govuk_healthcheck.rb +1 -0
- data/lib/govuk_app_config/govuk_healthcheck/redis.rb +21 -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: 9fccd65df32419e21a65fae91568840f4c7c6b111d2386ffc633e940352d3ad3
|
4
|
+
data.tar.gz: 613f34451cdb152bf35cfe1f5ae300c6ddf64931cf182aa36dfe486202514f36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dc8c194c93c515a222f3256f9611ddeb621785776b4c637f63adf586b29d978d373d29dd781eec7b6ae7538dd511ff96c66c5dc885454f6495146a59397ba1e
|
7
|
+
data.tar.gz: 528cfb7a65d10637edb6a5b149ad9cff2b33851e5de7d1c1c858c201256d679064fcaf73016bf946017a69a26c98cb7851d5cd83c4b4484bc8a9f9b0b47debf1
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,27 @@
|
|
1
|
+
# 2.8.3
|
2
|
+
|
3
|
+
* Add new Redis healthcheck and relevant tests (https://github.com/alphagov/govuk_app_config/pull/183)
|
4
|
+
|
5
|
+
# 2.8.2
|
6
|
+
|
7
|
+
* Allow apps to configure the host and protocol for Statsd ([#180](https://github.com/alphagov/govuk_app_config/pull/180))
|
8
|
+
|
9
|
+
# 2.8.1
|
10
|
+
|
11
|
+
* Add `GdsApi::ContentStore::ItemNotFound` to `data_sync_excluded_exceptions` (https://github.com/alphagov/govuk_app_config/pull/178)
|
12
|
+
* 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))
|
13
|
+
|
14
|
+
# 2.8.0
|
15
|
+
|
16
|
+
* Adds govuk_app_config version to every Sentry call (https://github.com/alphagov/govuk_app_config/pull/174)
|
17
|
+
|
18
|
+
# 2.7.1
|
19
|
+
|
20
|
+
* Fix broken data sync error handling for non-Rails apps (https://github.com/alphagov/govuk_app_config/pull/172)
|
21
|
+
|
1
22
|
# 2.7.0
|
2
23
|
|
3
|
-
* Ignore intermittent template retrieval errors from Slimmer
|
24
|
+
* Ignore intermittent template retrieval errors from Slimmer (https://github.com/alphagov/govuk_app_config/pull/170)
|
4
25
|
|
5
26
|
# 2.6.0
|
6
27
|
|
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,21 @@
|
|
1
|
+
module GovukHealthcheck
|
2
|
+
class Redis
|
3
|
+
def name
|
4
|
+
:redis
|
5
|
+
end
|
6
|
+
|
7
|
+
def status
|
8
|
+
client = ::Redis.new
|
9
|
+
|
10
|
+
client.set("healthcheck", "val")
|
11
|
+
client.get("healthcheck")
|
12
|
+
client.del("healthcheck")
|
13
|
+
|
14
|
+
client.close
|
15
|
+
|
16
|
+
GovukHealthcheck::OK
|
17
|
+
rescue StandardError
|
18
|
+
GovukHealthcheck::CRITICAL
|
19
|
+
end
|
20
|
+
end
|
21
|
+
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.3
|
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-13 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
|