pact_broker 2.59.1 → 2.62.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +53 -0
  3. data/README.md +1 -1
  4. data/db/migrations/20200922_add_event_to_triggered_webhook.rb +5 -0
  5. data/lib/pact_broker/api/contracts/verifiable_pacts_json_query_schema.rb +10 -3
  6. data/lib/pact_broker/api/contracts/verifiable_pacts_query_schema.rb +1 -0
  7. data/lib/pact_broker/api/decorators/triggered_webhook_decorator.rb +1 -0
  8. data/lib/pact_broker/api/decorators/verifiable_pact_decorator.rb +5 -5
  9. data/lib/pact_broker/api/pact_broker_urls.rb +9 -2
  10. data/lib/pact_broker/api/resources/all_webhooks.rb +1 -6
  11. data/lib/pact_broker/api/resources/can_i_deploy.rb +0 -4
  12. data/lib/pact_broker/api/resources/default_base_resource.rb +9 -0
  13. data/lib/pact_broker/api/resources/error_handler.rb +2 -4
  14. data/lib/pact_broker/api/resources/error_test.rb +4 -2
  15. data/lib/pact_broker/api/resources/group.rb +0 -4
  16. data/lib/pact_broker/api/resources/index.rb +11 -8
  17. data/lib/pact_broker/api/resources/integration.rb +0 -4
  18. data/lib/pact_broker/api/resources/integrations.rb +0 -4
  19. data/lib/pact_broker/api/resources/label.rb +0 -8
  20. data/lib/pact_broker/api/resources/latest_pact.rb +1 -5
  21. data/lib/pact_broker/api/resources/latest_pacts.rb +1 -5
  22. data/lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb +0 -4
  23. data/lib/pact_broker/api/resources/matrix.rb +4 -0
  24. data/lib/pact_broker/api/resources/matrix_for_consumer_and_provider.rb +4 -0
  25. data/lib/pact_broker/api/resources/metrics.rb +4 -0
  26. data/lib/pact_broker/api/resources/pact.rb +4 -8
  27. data/lib/pact_broker/api/resources/pact_content_diff.rb +4 -0
  28. data/lib/pact_broker/api/resources/pact_triggered_webhooks.rb +5 -1
  29. data/lib/pact_broker/api/resources/pact_versions.rb +5 -1
  30. data/lib/pact_broker/api/resources/pact_webhooks.rb +5 -1
  31. data/lib/pact_broker/api/resources/pact_webhooks_status.rb +5 -1
  32. data/lib/pact_broker/api/resources/pacticipant.rb +5 -9
  33. data/lib/pact_broker/api/resources/pacticipants.rb +0 -4
  34. data/lib/pact_broker/api/resources/pacticipants_for_label.rb +4 -0
  35. data/lib/pact_broker/api/resources/previous_distinct_pact_version.rb +4 -9
  36. data/lib/pact_broker/api/resources/provider_pacts.rb +1 -5
  37. data/lib/pact_broker/api/resources/provider_pacts_for_verification.rb +8 -6
  38. data/lib/pact_broker/api/resources/relationships.rb +4 -2
  39. data/lib/pact_broker/api/resources/tag.rb +5 -5
  40. data/lib/pact_broker/api/resources/tagged_pact_versions.rb +5 -2
  41. data/lib/pact_broker/api/resources/triggered_webhook_logs.rb +7 -5
  42. data/lib/pact_broker/api/resources/verification.rb +5 -5
  43. data/lib/pact_broker/api/resources/verification_triggered_webhooks.rb +6 -12
  44. data/lib/pact_broker/api/resources/verifications.rb +5 -5
  45. data/lib/pact_broker/api/resources/version.rb +5 -5
  46. data/lib/pact_broker/api/resources/versions.rb +5 -2
  47. data/lib/pact_broker/api/resources/webhook.rb +4 -0
  48. data/lib/pact_broker/api/resources/webhook_execution.rb +4 -0
  49. data/lib/pact_broker/api/resources/webhooks.rb +5 -1
  50. data/lib/pact_broker/app.rb +1 -1
  51. data/lib/pact_broker/badges/service.rb +1 -1
  52. data/lib/pact_broker/certificates/service.rb +2 -2
  53. data/lib/pact_broker/configuration.rb +21 -1
  54. data/lib/pact_broker/db.rb +14 -0
  55. data/lib/pact_broker/db/table_dependency_calculator.rb +45 -0
  56. data/lib/pact_broker/doc/views/provider-pacts-for-verification.markdown +78 -0
  57. data/lib/pact_broker/domain/pact.rb +9 -0
  58. data/lib/pact_broker/domain/webhook_request.rb +3 -1
  59. data/lib/pact_broker/matrix/deployment_status_summary.rb +1 -1
  60. data/lib/pact_broker/pacts/build_verifiable_pact_notices.rb +7 -4
  61. data/lib/pact_broker/pacts/content.rb +30 -5
  62. data/lib/pact_broker/pacts/repository.rb +25 -31
  63. data/lib/pact_broker/pacts/selector.rb +8 -0
  64. data/lib/pact_broker/test/test_data_builder.rb +1 -1
  65. data/lib/pact_broker/version.rb +1 -1
  66. data/lib/pact_broker/webhooks/job.rb +8 -2
  67. data/lib/pact_broker/webhooks/repository.rb +3 -2
  68. data/lib/pact_broker/webhooks/service.rb +2 -2
  69. data/lib/pact_broker/webhooks/triggered_webhook.rb +1 -3
  70. data/lib/pact_broker/webhooks/webhook_event.rb +1 -2
  71. data/script/seed.rb +39 -17
  72. data/spec/features/get_provider_pacts_for_verification_spec.rb +8 -0
  73. data/spec/lib/pact_broker/api/contracts/verifiable_pacts_json_query_schema_spec.rb +23 -4
  74. data/spec/lib/pact_broker/api/decorators/pact_webhooks_status_decorator_spec.rb +2 -1
  75. data/spec/lib/pact_broker/api/decorators/triggered_webhook_decorator_spec.rb +3 -1
  76. data/spec/lib/pact_broker/api/pact_broker_urls_spec.rb +15 -0
  77. data/spec/lib/pact_broker/api/resources/default_base_resource_spec.rb +10 -5
  78. data/spec/lib/pact_broker/api/resources/error_handler_spec.rb +18 -1
  79. data/spec/lib/pact_broker/api/resources/provider_pacts_for_verification_spec.rb +1 -1
  80. data/spec/lib/pact_broker/api/resources/verification_triggered_webhooks_spec.rb +0 -1
  81. data/spec/lib/pact_broker/badges/service_spec.rb +1 -1
  82. data/spec/lib/pact_broker/certificates/service_spec.rb +3 -3
  83. data/spec/lib/pact_broker/pacts/content_spec.rb +90 -0
  84. data/spec/lib/pact_broker/pacts/repository_find_for_verification_fallback_spec.rb +14 -0
  85. data/spec/lib/pact_broker/pacts/repository_find_for_verification_spec.rb +62 -0
  86. data/spec/lib/pact_broker/webhooks/job_spec.rb +19 -1
  87. data/spec/lib/pact_broker/webhooks/repository_spec.rb +3 -2
  88. data/spec/lib/pact_broker/webhooks/service_spec.rb +2 -2
  89. data/spec/support/database_cleaner.rb +1 -5
  90. data/tasks/database.rb +1 -0
  91. data/tasks/database/table_dependency_calculator.rb +4 -41
  92. metadata +5 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b6703933e244f375a0ebc2a9be4ecc7d9baa65c1f72950e7ee9bd4bfc7fca6c
4
- data.tar.gz: 3d2e0906da58faeb0e882eb78cc4e255d52d1efd7a8ee19d7feeb8d8a31b00e3
3
+ metadata.gz: 0d90410ba82c9f6ee8681073d1a9435660abf73045fa4ea08658294512771106
4
+ data.tar.gz: ff2c697fa385d574c26225ebf3aa6bb93276a749bfc6851685dc17728aa18fb0
5
5
  SHA512:
6
- metadata.gz: 9022f0a89698c8cb3d648a895040059e908c7199489cc56e9183650a9b398592c5d1f1aff3394444e2d40417a02d02f621691c8db7e4de6500582a2ce4704c52
7
- data.tar.gz: ba3ea7d815830ae6e35339190909e5e2d06c799c69665ce01563bd952804961f54ef2a9424ab3cc8c323d2701abf305231d9796d4c86d9bd930f528981891dc9
6
+ metadata.gz: 95c87ab86bd54c472362e678a8fd6307637ad34059beb390baf59fa33456014ed47bd725940fe792ffd7151c80201baf9c063d670b7ed4c857708c22e60e352a
7
+ data.tar.gz: 3c101564948c497f80d286eccfd70cc92734c5a94b280825bd437c3a6ab4141caf7e98fefb6594b230d0021bba732c44704e9338df081c630d752f0bbb3140cc
@@ -1,3 +1,56 @@
1
+ <a name="v2.62.0"></a>
2
+ ### v2.62.0 (2020-09-23)
3
+
4
+ #### Features
5
+
6
+ * **webhooks**
7
+ * remove user-agent and accept-encoding headers which the Ruby HTTP library adds by default ([ef25b88c](/../../commit/ef25b88c))
8
+
9
+ * add event name to triggered webhook ([ecce16fd](/../../commit/ecce16fd))
10
+
11
+ #### Bug Fixes
12
+
13
+ * **webhooks**
14
+ * use path to initialise http request, rather than full URL ([ecbac9a6](/../../commit/ecbac9a6))
15
+
16
+ * gracefully handle corrupt webhook metadata in pact URL ([ba94c355](/../../commit/ba94c355))
17
+
18
+ <a name="v2.61.0"></a>
19
+ ### v2.61.0 (2020-09-12)
20
+
21
+ #### Features
22
+
23
+ * add back support for GET requests to the 'pacts for verification' API with a deprecation notice in the response ([8f45cc9f](/../../commit/8f45cc9f))
24
+
25
+ <a name="v2.60.1"></a>
26
+ ### v2.60.1 (2020-09-10)
27
+
28
+ #### Bug Fixes
29
+
30
+ * href for beta:provider-pacts-for-verification ([3949fdd1](/../../commit/3949fdd1))
31
+
32
+ <a name="v2.60.0"></a>
33
+ ### v2.60.0 (2020-09-08)
34
+
35
+ #### Features
36
+
37
+ * **pacts for verification**
38
+ * add deprecation title to beta:provider-pacts-for-verification relation ([47a61f69](/../../commit/47a61f69))
39
+ * do not require environment variable feature toggle to enable feature ([7d0fe1ea](/../../commit/7d0fe1ea))
40
+ * allow consumer to be specified with fallback tags, and overall latest to be specified with or without a consumer ([2d52d173](/../../commit/2d52d173))
41
+
42
+ #### Bug Fixes
43
+
44
+ * correctly handle new test results format when merging test results with pact contents ([b35ab71b](/../../commit/b35ab71b))
45
+
46
+ <a name="v2.59.2"></a>
47
+ ### v2.59.2 (2020-08-06)
48
+
49
+ #### Bug Fixes
50
+
51
+ * gracefully handle contracts without interactions or messages in deployment status warnings ([6c223e69](/../../commit/6c223e69))
52
+ * add missing info level log for business level errors ([80a895bf](/../../commit/80a895bf))
53
+
1
54
  <a name="v2.59.1"></a>
2
55
  ### v2.59.1 (2020-08-04)
3
56
 
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![Code Climate](https://codeclimate.com/github/pact-foundation/pact_broker/badges/gpa.svg)](https://codeclimate.com/github/pact-foundation/pact_broker)
7
7
  [![Test Coverage](https://codeclimate.com/github/pact-foundation/pact_broker/badges/coverage.svg)](https://codeclimate.com/github/pact-foundation/pact_broker/coverage)
8
8
 
9
- The Pact Broker is an application for sharing for consumer driven contracts and verification results. It is optimised for use with "pacts" (contracts created by the [Pact][pact-docs] framework), but can be used for any type of contract that can be serialized to JSON.
9
+ The Pact Broker is an application for sharing of consumer driven contracts and verification results. It is optimised for use with "pacts" (contracts created by the [Pact][pact-docs] framework), but can be used for any type of contract that can be serialized to JSON.
10
10
 
11
11
  <br/>
12
12
  <a href="https:/pactflow.io/?utm_source=github&utm_campaign=pact_broker_intro"><img src="docs/images/Pactflow logo - black small.png"></a>
@@ -0,0 +1,5 @@
1
+ Sequel.migration do
2
+ change do
3
+ add_column(:triggered_webhooks, :event_name, String)
4
+ end
5
+ end
@@ -1,5 +1,6 @@
1
1
  require 'dry-validation'
2
2
  require 'pact_broker/hash_refinements'
3
+ require 'pact_broker/string_refinements'
3
4
  require 'pact_broker/api/contracts/dry_validation_workarounds'
4
5
  require 'pact_broker/api/contracts/dry_validation_predicates'
5
6
 
@@ -9,6 +10,7 @@ module PactBroker
9
10
  class VerifiablePactsJSONQuerySchema
10
11
  extend DryValidationWorkarounds
11
12
  using PactBroker::HashRefinements
13
+ using PactBroker::StringRefinements
12
14
 
13
15
  SCHEMA = Dry::Validation.Schema do
14
16
  configure do
@@ -24,7 +26,7 @@ module PactBroker
24
26
  # end
25
27
  # end
26
28
 
27
- required(:tag).filled(:str?)
29
+ optional(:tag).filled(:str?)
28
30
  optional(:latest).filled(included_in?: [true, false])
29
31
  optional(:fallbackTag).filled(:str?)
30
32
  optional(:consumer).filled(:str?, :not_blank?)
@@ -54,8 +56,9 @@ module PactBroker
54
56
  errors << "fallbackTag can only be set if latest is true (at index #{index})"
55
57
  end
56
58
 
57
- if selector[:consumer] && selector[:latest]
58
- errors << "specifying a consumer with latest == true is not yet supported (at index #{index})"
59
+
60
+ if not_provided?(selector[:tag]) && selector[:latest] != true
61
+ errors << "latest must be true, or a tag must be provided (at index #{index})"
59
62
  end
60
63
  end
61
64
  if errors.any?
@@ -64,6 +67,10 @@ module PactBroker
64
67
  end
65
68
  end
66
69
  end
70
+
71
+ def self.not_provided?(value)
72
+ value.nil? || value.blank?
73
+ end
67
74
  end
68
75
  end
69
76
  end
@@ -30,6 +30,7 @@ module PactBroker
30
30
  def self.call(params)
31
31
  select_first_message(flatten_indexed_messages(SCHEMA.call(params&.symbolize_keys).messages(full: true)))
32
32
  end
33
+
33
34
  end
34
35
  end
35
36
  end
@@ -9,6 +9,7 @@ module PactBroker
9
9
  property :number_of_attempts_made, as: :attemptsMade
10
10
  property :number_of_attempts_remaining, as: :attemptsRemaining
11
11
  property :trigger_type, as: :triggerType
12
+ property :event_name, as: :eventName
12
13
 
13
14
  property :created_at, as: :triggeredAt
14
15
 
@@ -14,14 +14,14 @@ module PactBroker
14
14
 
15
15
  property :pending,
16
16
  if: ->(context) { context[:options][:user_options][:include_pending_status] }
17
- property :wip, if: -> (context) { context[:represented].wip }
18
-
19
- property :notices, getter: -> (context) { context[:decorator].notices(context[:options][:user_options]) }
20
- property :noteToDevelopers, getter: -> (_) { "Please print out the text from the 'notices' rather than using the inclusionReason and the pendingReason fields. These will be removed when this API moves out of beta."}
17
+ property :wip,
18
+ if: -> (context) { context[:represented].wip }
19
+ property :notices,
20
+ getter: -> (context) { context[:decorator].notices(context[:options][:user_options]) }
21
21
 
22
22
  def notices(user_options)
23
23
  pact_url = pact_version_url(represented, user_options[:base_url])
24
- PactBroker::Pacts::BuildVerifiablePactNotices.call(represented, pact_url, include_pending_status: user_options[:include_pending_status])
24
+ PactBroker::Pacts::BuildVerifiablePactNotices.call(represented, pact_url, user_options)
25
25
  end
26
26
  end
27
27
 
@@ -1,11 +1,13 @@
1
1
  require 'erb'
2
2
  require 'pact_broker/pacts/metadata'
3
+ require 'pact_broker/logging'
3
4
 
4
5
  module PactBroker
5
6
  module Api
6
7
  module PactBrokerUrls
7
8
 
8
9
  include PactBroker::Pacts::Metadata
10
+ include PactBroker::Logging
9
11
  # TODO make base_url the last and optional argument for all methods, defaulting to ''
10
12
 
11
13
  extend self
@@ -70,8 +72,13 @@ module PactBroker
70
72
 
71
73
  def decode_webhook_metadata(metadata)
72
74
  if metadata
73
- Rack::Utils.parse_nested_query(Base64.strict_decode64(metadata)).each_with_object({}) do | (k, v), new_hash |
74
- new_hash[k.to_sym] = v
75
+ begin
76
+ Rack::Utils.parse_nested_query(Base64.strict_decode64(metadata)).each_with_object({}) do | (k, v), new_hash |
77
+ new_hash[k.to_sym] = v
78
+ end
79
+ rescue StandardError => e
80
+ logger.warn("Exception parsing webhook metadata: #{metadata}", e)
81
+ {}
75
82
  end
76
83
  else
77
84
  {}
@@ -46,12 +46,7 @@ module PactBroker
46
46
  end
47
47
 
48
48
  def policy_name
49
- :'webhooks::webooks'
50
- end
51
-
52
- def policy_record
53
- # Note: consumer and provider not yet set on new webhook
54
- request.post? ? webhook : webhooks
49
+ :'webhooks::webhooks'
55
50
  end
56
51
 
57
52
  private
@@ -25,10 +25,6 @@ module PactBroker
25
25
  :'matrix::can_i_deploy'
26
26
  end
27
27
 
28
- def policy_record
29
- selectors
30
- end
31
-
32
28
  private
33
29
 
34
30
  attr_reader :query_params, :selectors, :options
@@ -202,6 +202,15 @@ module PactBroker
202
202
  @pact ||= pact_service.find_pact(pact_params)
203
203
  end
204
204
 
205
+ # Not necessarily an existing integration
206
+ def integration
207
+ if consumer_specified? && provider_specified?
208
+ OpenStruct.new(consumer: consumer, provider: provider)
209
+ else
210
+ nil
211
+ end
212
+ end
213
+
205
214
  def database_connector
206
215
  request.env["pactbroker.database_connector"]
207
216
  end
@@ -5,11 +5,8 @@ module PactBroker
5
5
  module Api
6
6
  module Resources
7
7
  class ErrorHandler
8
-
9
8
  include PactBroker::Logging
10
9
 
11
- WARNING_ERROR_CLASSES = [Sequel::ForeignKeyConstraintViolation]
12
-
13
10
  def self.call e, request, response
14
11
  error_reference = generate_error_reference
15
12
  if log_as_warning?(e)
@@ -17,6 +14,7 @@ module PactBroker
17
14
  elsif reportable?(e)
18
15
  log_error(e, "Error reference #{error_reference}")
19
16
  report(e, error_reference, request)
17
+ else
20
18
  logger.info("Error reference #{error_reference}", e)
21
19
  end
22
20
  response.body = response_body_hash(e, error_reference).to_json
@@ -31,7 +29,7 @@ module PactBroker
31
29
  end
32
30
 
33
31
  def self.log_as_warning?(e)
34
- WARNING_ERROR_CLASSES.any? { |clazz| e.is_a?(clazz) }
32
+ PactBroker.configuration.warning_error_classes.any? { |clazz| e.is_a?(clazz) }
35
33
  end
36
34
 
37
35
  def self.display_message(e, error_reference)
@@ -4,9 +4,7 @@ require 'pact_broker/error'
4
4
  module PactBroker
5
5
  module Api
6
6
  module Resources
7
-
8
7
  class ErrorTest < BaseResource
9
-
10
8
  def content_types_provided
11
9
  [
12
10
  ["application/hal+json", :to_json]
@@ -24,6 +22,10 @@ module PactBroker
24
22
  def process_post
25
23
  raise PactBroker::TestError.new("Don't panic. This is a test API error.")
26
24
  end
25
+
26
+ def policy_name
27
+ :'default'
28
+ end
27
29
  end
28
30
  end
29
31
  end
@@ -26,10 +26,6 @@ module PactBroker
26
26
  :'groups::group'
27
27
  end
28
28
 
29
- def policy_record
30
- pacticipant
31
- end
32
-
33
29
  private
34
30
 
35
31
  def group
@@ -121,6 +121,17 @@ module PactBroker
121
121
  title: "Determine if an application can be safely deployed to an environment identified by the given tag",
122
122
  templated: true
123
123
  },
124
+ 'pb:provider-pacts-for-verification' => {
125
+ href: base_url + '/pacts/provider/{provider}/for-verification',
126
+ title: 'Pact versions to be verified for the specified provider',
127
+ templated: true
128
+ },
129
+ 'beta:provider-pacts-for-verification' => {
130
+ name: 'beta',
131
+ href: base_url + '/pacts/provider/{provider}/for-verification',
132
+ title: 'DEPRECATED - please use pb:provider-pacts-for-verification',
133
+ templated: true
134
+ },
124
135
  'curies' =>
125
136
  [{
126
137
  name: 'pb',
@@ -133,14 +144,6 @@ module PactBroker
133
144
  }]
134
145
  }
135
146
 
136
- if PactBroker.feature_enabled?(:pacts_for_verification)
137
- links_hash['beta:provider-pacts-for-verification'] = {
138
- href: base_url + '/pacts/provider/{provider}/for-verification',
139
- title: 'Pact versions to be verified for the specified provider',
140
- templated: true
141
- }
142
- end
143
-
144
147
  links_hash
145
148
  end
146
149
 
@@ -21,10 +21,6 @@ module PactBroker
21
21
  :'integrations::integration'
22
22
  end
23
23
 
24
- def policy_resource
25
- integration
26
- end
27
-
28
24
  def integration
29
25
  @integration ||= OpenStruct.new(consumer: consumer, provider: provider)
30
26
  end
@@ -37,10 +37,6 @@ module PactBroker
37
37
  def policy_name
38
38
  :'integrations::integrations'
39
39
  end
40
-
41
- def policy_resource
42
- integrations
43
- end
44
40
  end
45
41
  end
46
42
  end
@@ -30,18 +30,10 @@ module PactBroker
30
30
  !!label
31
31
  end
32
32
 
33
- def resource_object
34
- label
35
- end
36
-
37
33
  def policy_name
38
34
  :'labels::label'
39
35
  end
40
36
 
41
- def policy_record
42
- label
43
- end
44
-
45
37
  def to_json
46
38
  PactBroker::Api::Decorators::LabelDecorator.new(label).to_json(decorator_options)
47
39
  end
@@ -25,11 +25,7 @@ module PactBroker
25
25
  end
26
26
 
27
27
  def policy_name
28
- :'pacts:pact'
29
- end
30
-
31
- def policy_record
32
- pact
28
+ :'pacts::pact'
33
29
  end
34
30
 
35
31
  def to_json
@@ -22,11 +22,7 @@ module PactBroker
22
22
  end
23
23
 
24
24
  def policy_name
25
- :'pacts:pacts'
26
- end
27
-
28
- def policy_record
29
- pacts
25
+ :'pacts::pacts'
30
26
  end
31
27
  end
32
28
  end
@@ -30,10 +30,6 @@ module PactBroker
30
30
  :'verifications::verifications'
31
31
  end
32
32
 
33
- def policy_record
34
- version
35
- end
36
-
37
33
  private
38
34
 
39
35
  def version
@@ -43,6 +43,10 @@ module PactBroker
43
43
  PactBroker::Api::Decorators::MatrixTextDecorator.new(results).to_text(decorator_options)
44
44
  end
45
45
 
46
+ def policy_name
47
+ :'matrix::matrix'
48
+ end
49
+
46
50
  def results
47
51
  @results ||= matrix_service.find(selectors, options)
48
52
  end
@@ -27,6 +27,10 @@ module PactBroker
27
27
  PactBroker::Api::Decorators::MatrixDecorator.new(results).to_json(decorator_options)
28
28
  end
29
29
 
30
+ def policy_name
31
+ :'matrix::matrix'
32
+ end
33
+
30
34
  private
31
35
 
32
36
  attr_reader :options
@@ -15,6 +15,10 @@ module PactBroker
15
15
  def to_json
16
16
  metrics_service.metrics.to_json
17
17
  end
18
+
19
+ def policy_name
20
+ :'metrics::metrics'
21
+ end
18
22
  end
19
23
  end
20
24
  end