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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa45d48161bdb68ef1bb2adee7901a3b236ffb829ca83a57b7ef6019fa6323fc
4
- data.tar.gz: 341a67dd46d52bc0a6e423b16485e27af63976ab668f957ba31d1849e1bd7aaa
3
+ metadata.gz: 9fccd65df32419e21a65fae91568840f4c7c6b111d2386ffc633e940352d3ad3
4
+ data.tar.gz: 613f34451cdb152bf35cfe1f5ae300c6ddf64931cf182aa36dfe486202514f36
5
5
  SHA512:
6
- metadata.gz: f65f512a4ce726b72a15772196b4b67aed030a4df1d79ebd304c528eb52948f9ea3e64405b608dbd25ddd36f02dea219b24365be7f117c45ecf1a63270c838a6
7
- data.tar.gz: edd08dc605fbd6112fecb6def2dcb9f0ad7c08b94db78321fd68c363b19f450f89aae5a81bf42c1cfb9c1eedfbd2ccb9983c2e981c65f8e33947255fe3f9bfb8
6
+ metadata.gz: 0dc8c194c93c515a222f3256f9611ddeb621785776b4c637f63adf586b29d978d373d29dd781eec7b6ae7538dd511ff96c66c5dc885454f6495146a59397ba1e
7
+ data.tar.gz: 528cfb7a65d10637edb6a5b149ad9cff2b33851e5de7d1c1c858c201256d679064fcaf73016bf946017a69a26c98cb7851d5cd83c4b4484bc8a9f9b0b47debf1
@@ -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
 
@@ -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", "< 1.4.0"
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.4.0"
26
- spec.add_dependency "unicorn", ">= 5.4", "< 5.8"
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
 
@@ -61,6 +61,7 @@ GovukError.configure do |config|
61
61
  # rate-limited by Sentry.
62
62
  config.data_sync_excluded_exceptions = [
63
63
  "PG::Error",
64
+ "GdsApi::ContentStore::ItemNotFound",
64
65
  ]
65
66
 
66
67
  config.transport_failure_callback = proc {
@@ -28,7 +28,7 @@ module GovukError
28
28
  end
29
29
 
30
30
  def in_progress?
31
- from.present? && to.present? && in_time_range?(from, to)
31
+ !from.nil? && !to.nil? && in_time_range?(from, to)
32
32
  end
33
33
 
34
34
  private
@@ -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
@@ -1,3 +1,3 @@
1
1
  module GovukAppConfig
2
- VERSION = "2.7.0".freeze
2
+ VERSION = "2.8.3".freeze
3
3
  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.7.0
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: 2020-11-10 00:00:00.000000000 Z
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: 1.4.0
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: 1.4.0
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.4.0
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.4.0
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.8'
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.8'
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