bugsnag-maze-runner 10.10.1 → 10.11.0

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: 4a7d682e0072d55b08a1ba2c30bef8c53b8b18e13c778ba6064c0b790ec4004c
4
- data.tar.gz: c6fc983aff0c56cc4f488e5d2181ede2b48f373082dda1e83a2bfcb148957636
3
+ metadata.gz: b7ae708450f19ea699929433b641f8c458b95e10884dc3d8a0f6967676423f9e
4
+ data.tar.gz: 8049cb8c426b125a06fac27a427f1aa6dbcac95d663f2767e78939ff926af2c8
5
5
  SHA512:
6
- metadata.gz: 06b3dff2015dc1904c5bf496f287613ba18aa4e42e5c1e7c75bc8ddc7f8ac63a721c513fd6948c110c83cfebf2b4549aa436a30a689e0791df5add4695116be0
7
- data.tar.gz: 8467396c63704238af9b03b854b9d217aa08d9377c55a5296ee63c03a8ee734fd3839096d1108cf18bbc7f157b43fb554e4dc31660528a5ffd453aeea1c4d348
6
+ metadata.gz: 073a3899375467dc4637c7b0eaecf21bddafff44de74a5b10c37d19cfaed9a83b19a20d900d031ac52c87e623987280290d396ee13f5c2c73cd2264208ff8013
7
+ data.tar.gz: 38a8f5c10cac797fe567e2d1378cea593177be1989d626b2ecc8e5e24f1e9883fb3914efdcb5d659d630398d9df162c3c51271a6baa6b5a37926b2204724f5f9
@@ -10,7 +10,7 @@ require_relative '../lib/maze'
10
10
  require_relative '../lib/maze/loggers/logger'
11
11
 
12
12
  class DatadogMetricsIngester
13
- def initialize(api_key:, app_key:, host: 'platforms-benchmark')
13
+ def initialize(api_key:, app_key:, host: 'platforms-benchmark', prefix: nil)
14
14
  configuration = DatadogAPIClient::Configuration.new
15
15
  configuration.api_key['apiKeyAuth'] = api_key
16
16
  configuration.api_key['appKeyAuth'] = app_key
@@ -18,6 +18,7 @@ class DatadogMetricsIngester
18
18
  api_client = DatadogAPIClient::APIClient.new(configuration)
19
19
  @api = DatadogAPIClient::V2::MetricsAPI.new(api_client)
20
20
  @host = host
21
+ @prefix = prefix
21
22
  end
22
23
 
23
24
  def self.run(args)
@@ -26,6 +27,7 @@ class DatadogMetricsIngester
26
27
  opt :csv_file, 'Path to the CSV file containing metrics', type: :string, required: true
27
28
  opt :api_key, 'Datadog API key', type: :string
28
29
  opt :app_key, 'Datadog App key', type: :string
30
+ opt :prefix, 'Prefix to prepend to metric names', type: :string
29
31
  end
30
32
 
31
33
  opts = Optimist::with_standard_exception_handling(parser) do
@@ -43,7 +45,7 @@ class DatadogMetricsIngester
43
45
  errors << "App key is missing" if app_key.to_s.empty?
44
46
  abort(errors) unless errors.empty?
45
47
 
46
- new(api_key: api_key, app_key: app_key).ingest_csv(csv_file)
48
+ new(api_key: api_key, app_key: app_key, prefix: opts[:prefix]).ingest_csv(csv_file)
47
49
  end
48
50
 
49
51
  def self.abort(errors)
@@ -90,7 +92,8 @@ class DatadogMetricsIngester
90
92
  end
91
93
 
92
94
  def build_tags(row)
93
- tags = ["env:platforms-testing", "benchmark:#{row['benchmark']}"]
95
+ benchmark_value = @prefix && !@prefix.to_s.empty? ? "#{@prefix}:#{row['benchmark']}" : row['benchmark']
96
+ tags = ["env:platforms-testing", "benchmark:#{benchmark_value}"]
94
97
  tags << "cpu_intensive:true" if row['cpu'] == 'true'
95
98
  tags << "memory_intensive:true" if row['memory'] == 'true'
96
99
  tags << "rendering_enabled:true" if row['rendering'] == 'true'
@@ -27,8 +27,6 @@ end
27
27
  #
28
28
  # @step_input payload_version [String] The payload version expected
29
29
  # @step_input notifier_name [String] The expected name of the notifier
30
- # TODO: I'm reluctant to risk changing the previous step implementation right now, but we should consider
31
- # refactoring the two at some point to avoid duplication.
32
30
  Then('the session is valid for the session reporting API version {string} for the React Native notifier') do |payload_version|
33
31
  steps %{
34
32
  Then the session "bugsnag-api-key" header equals "#{$api_key}"
@@ -143,8 +143,6 @@ After do |scenario|
143
143
  # This is here to stop sessions from one test hitting another.
144
144
  # However this does mean that tests take longer.
145
145
  # In addition, reset the last captured exit code
146
- # TODO:SM We could try and fix this by generating unique endpoints
147
- # for each test.
148
146
  Maze::Docker.reset
149
147
 
150
148
  # Make sure that any scripts are killed between test runs
@@ -167,7 +167,6 @@ module Maze
167
167
  @session_metadata.success = false
168
168
  @session_metadata.failure_message = Maze.driver.failure_reason
169
169
  else
170
- # TODO: The call to quit could also fail
171
170
  Maze.driver.driver_quit
172
171
  @session_metadata.success = true
173
172
  end
@@ -49,7 +49,7 @@ module Maze
49
49
  $logger.info "Selected device group: #{device_or_group_names} (#{platform} #{platform_version})"
50
50
  end
51
51
 
52
- # TODO: Setting the config here is rather a side effect and factoring it out would be better.
52
+ # Setting the config here is rather a side effect and factoring it out would be better.
53
53
  # For now, though, it means not having to provide the --os and --os-version options on the command line.
54
54
  Maze.config.os = platform
55
55
  Maze.config.os_version = platform_version.to_f.floor
data/lib/maze/docker.rb CHANGED
@@ -48,7 +48,6 @@ module Maze
48
48
  run_docker_compose_command("build #{service}")
49
49
  run_docker_compose_command("run --use-aliases #{service} #{command}")
50
50
  else
51
- # TODO: Consider adding a logs command here
52
51
  run_docker_compose_command("up -d --build #{service}")
53
52
  end
54
53
  @services_started = true
data/lib/maze/helper.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'cgi'
3
4
  require 'digest/sha1'
4
5
  require 'json'
5
6
 
@@ -1,6 +1,4 @@
1
1
  require 'pty'
2
- # TODO: Removed pending PLAT-6322
3
- # require 'boring'
4
2
 
5
3
  module Maze
6
4
  # Encapsulates a shell session, retaining state and input streams for interactive tests
@@ -35,8 +33,6 @@ module Maze
35
33
  @stderr_lines = []
36
34
  @on_exit_blocks = []
37
35
  @current_buffer = ''
38
- # TODO: Removed pending PLAT-6322
39
- # @boring = Boring.new
40
36
 
41
37
  start_threaded_shell(shell)
42
38
  end
@@ -168,8 +164,6 @@ module Maze
168
164
  end
169
165
 
170
166
  def format_line(line)
171
- # TODO: Removed pending PLAT-6322
172
- # @boring.scrub(line.strip)
173
167
  line.strip
174
168
  end
175
169
 
@@ -6,8 +6,6 @@ module Maze
6
6
  private
7
7
 
8
8
  def set_headers(request)
9
- # TODO Also overwrite apiKey in the payload, if present, recalculate the integrity header (handling
10
- # compressed payloads if the content-encoding header is set accordingly)
11
9
  request['bugsnag-api-key'] = Maze.config.bugsnag_repeater_api_key
12
10
  end
13
11
 
@@ -6,8 +6,6 @@ module Maze
6
6
  private
7
7
 
8
8
  def set_headers(request)
9
- # TODO Also overwrite apiKey in the payload, if present, recalculate the integrity header (handling
10
- # compressed payloads if the content-encoding header is set accordingly)
11
9
  request['bugsnag-api-key'] = Maze.config.hub_repeater_api_key
12
10
  end
13
11
 
@@ -12,7 +12,6 @@ module Maze
12
12
 
13
13
  return unless enabled?
14
14
 
15
- # TODO Forwarding of internal errors to be considered later
16
15
  return if request.header.keys.any? { |key| key.downcase == 'bugsnag-internal-error' }
17
16
 
18
17
  uri = url_for_request_type
@@ -42,7 +42,7 @@ module Maze
42
42
  content_type = request['Content-Type']
43
43
 
44
44
  # For JSON, pull the instructions from the body. Otherwise, take them from the query string.
45
- if content_type.include?('application/json')
45
+ if !content_type.nil? && content_type.include?('application/json')
46
46
  body = JSON.parse(request.body)
47
47
  delay_ms = body['delay_ms']
48
48
  status = body['status']
data/lib/maze.rb CHANGED
@@ -8,7 +8,7 @@ require_relative 'maze/timers'
8
8
  # providing an alternative to the proliferation of global variables or singletons.
9
9
  module Maze
10
10
 
11
- VERSION = '10.10.1'
11
+ VERSION = '10.11.0'
12
12
 
13
13
  class << self
14
14
  attr_accessor :check, :driver, :internal_hooks, :mode, :start_time, :dynamic_retry, :public_address,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugsnag-maze-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.10.1
4
+ version: 10.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Kirkland
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-12-15 00:00:00.000000000 Z
12
+ date: 2026-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber