bugsnag-maze-runner 9.31.4 → 9.32.1
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 +4 -4
- data/bin/maze-runner +1 -0
- data/lib/maze/client/appium/bs_devices.rb +3 -6
- data/lib/maze/configuration.rb +3 -0
- data/lib/maze/option/parser.rb +6 -0
- data/lib/maze/option/processor.rb +3 -1
- data/lib/maze/option/validator.rb +12 -0
- data/lib/maze/option.rb +1 -0
- data/lib/maze/repeaters/hub_repeater.rb +35 -0
- data/lib/maze/servlets/servlet.rb +2 -0
- data/lib/maze.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76ebb1a5265e614bce15a22bea6c10ec76e9d28bfe062f341692fbb24bfb25ef
|
4
|
+
data.tar.gz: c6024cf2546cd75909373941fafba438b287354253dae0c1b52d9b0d9ef63418
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e49dd521c0cf6da0fb01a54dc12bd69019a34a156aaee6ac54576375d23865bd26deb85f1cbf164aabaffd04e59c99e434528a7a43bf7249c9517b6c9462f162
|
7
|
+
data.tar.gz: b359166e3e5d896cf4db71cebb75f358b78015dba28c300edc0b84d134b79ddfa5cf613c18a77055448754d8829aa7d753037d000090c8d887956bd89d4c4393
|
data/bin/maze-runner
CHANGED
@@ -55,6 +55,7 @@ require_relative '../lib/maze/proxy'
|
|
55
55
|
require_relative '../lib/maze/retry_handler'
|
56
56
|
require_relative '../lib/maze/repeaters/request_repeater'
|
57
57
|
require_relative '../lib/maze/repeaters/bugsnag_repeater'
|
58
|
+
require_relative '../lib/maze/repeaters/hub_repeater'
|
58
59
|
require_relative '../lib/maze/runner'
|
59
60
|
require_relative '../lib/maze/terminating_server'
|
60
61
|
|
@@ -74,19 +74,18 @@ module Maze
|
|
74
74
|
'ANDROID_15' => make_android_hash('Google Pixel 9', '15.0'),
|
75
75
|
'ANDROID_14' => make_android_hash('Google Pixel 8', '14.0'),
|
76
76
|
'ANDROID_13' => make_android_hash('Google Pixel 6 Pro', '13.0'),
|
77
|
-
'ANDROID_12' => make_android_hash('Google Pixel
|
77
|
+
'ANDROID_12' => make_android_hash('Google Pixel 6', '12.0'),
|
78
78
|
'ANDROID_11' => make_android_hash('Samsung Galaxy S21', '11.0'),
|
79
|
-
'ANDROID_10' => make_android_hash('Google Pixel 4', '10.0'),
|
79
|
+
'ANDROID_10' => make_android_hash('Google Pixel 4 XL', '10.0'),
|
80
80
|
'ANDROID_9' => make_android_hash('Google Pixel 3', '9.0'),
|
81
81
|
'ANDROID_8' => make_android_hash('Samsung Galaxy S9', '8.0'),
|
82
|
-
'ANDROID_7' => make_android_hash('Samsung Galaxy S8', '7.0'),
|
83
82
|
|
84
83
|
# iOS devices
|
85
84
|
'IOS_18' => make_ios_hash('iPhone 14', '18'),
|
86
85
|
'IOS_17' => make_ios_hash('iPhone 15', '17'),
|
87
86
|
'IOS_16' => make_ios_hash('iPhone 14', '16'),
|
88
87
|
'IOS_15' => make_ios_hash('iPhone 13', '15'),
|
89
|
-
'IOS_14' => make_ios_hash('iPhone
|
88
|
+
'IOS_14' => make_ios_hash('iPhone 12', '14'),
|
90
89
|
'IOS_13' => make_ios_hash('iPhone 11', '13'),
|
91
90
|
'IOS_12' => make_ios_hash('iPhone XS', '12'),
|
92
91
|
}
|
@@ -99,8 +98,6 @@ module Maze
|
|
99
98
|
|
100
99
|
add_android 'Samsung Galaxy S9', '8.0', hash # ANDROID_8_0_SAMSUNG_GALAXY_S9
|
101
100
|
|
102
|
-
add_android 'Samsung Galaxy S8', '7.0', hash # ANDROID_7_0_SAMSUNG_GALAXY_S8
|
103
|
-
|
104
101
|
# Specific iOS devices
|
105
102
|
add_ios 'iPhone 15', '17.0', hash # IOS_17_0_IPHONE_15
|
106
103
|
add_ios 'iPhone 12 Pro', '17.0', hash # IOS_17_0_IPHONE_12_PRO
|
data/lib/maze/configuration.rb
CHANGED
@@ -75,6 +75,9 @@ module Maze
|
|
75
75
|
# API key to use when repeating requests to Bugsnag
|
76
76
|
attr_accessor :bugsnag_repeater_api_key
|
77
77
|
|
78
|
+
# API key to use when repeating requests to InsightHub
|
79
|
+
attr_accessor :hub_repeater_api_key
|
80
|
+
|
78
81
|
# Enables awareness of a public IP address on Buildkite with the Elastic CI Stack for AWS.
|
79
82
|
attr_accessor :aws_public_ip
|
80
83
|
|
data/lib/maze/option/parser.rb
CHANGED
@@ -52,6 +52,11 @@ module Maze
|
|
52
52
|
short: :none,
|
53
53
|
type: :string
|
54
54
|
|
55
|
+
opt Option::HUB_REPEATER_API_KEY,
|
56
|
+
'Enables forwarding of all received POST requests to InsightHub, using the API key provided. MAZE_HUB_REPEATER_API_KEY may also be set.',
|
57
|
+
short: :none,
|
58
|
+
type: :string
|
59
|
+
|
55
60
|
text ''
|
56
61
|
text 'Server options:'
|
57
62
|
|
@@ -277,6 +282,7 @@ module Maze
|
|
277
282
|
end
|
278
283
|
|
279
284
|
options[Option::BUGSNAG_REPEATER_API_KEY] ||= ENV['MAZE_REPEATER_API_KEY']
|
285
|
+
options[Option::HUB_REPEATER_API_KEY] ||= ENV['MAZE_HUB_REPEATER_API_KEY']
|
280
286
|
options[Option::SB_LOCAL] ||= ENV['MAZE_SB_LOCAL'] || '/SBSecureTunnel'
|
281
287
|
options[Option::BS_LOCAL] ||= ENV['MAZE_BS_LOCAL'] || '/BrowserStackLocal'
|
282
288
|
options[Option::PORT] ||= ENV['MAZE_PORT'] || 9339
|
@@ -23,7 +23,9 @@ module Maze
|
|
23
23
|
config.enable_retries = options[Maze::Option::RETRIES]
|
24
24
|
config.enable_bugsnag = options[Maze::Option::BUGSNAG]
|
25
25
|
bugsnag_repeater_api_key = options[Maze::Option::BUGSNAG_REPEATER_API_KEY]
|
26
|
-
config.bugsnag_repeater_api_key = bugsnag_repeater_api_key unless bugsnag_repeater_api_key&.empty?
|
26
|
+
config.bugsnag_repeater_api_key = bugsnag_repeater_api_key unless bugsnag_repeater_api_key&.empty?
|
27
|
+
hub_repeater_api_key = options[Maze::Option::HUB_REPEATER_API_KEY]
|
28
|
+
config.hub_repeater_api_key = hub_repeater_api_key unless hub_repeater_api_key&.empty?
|
27
29
|
|
28
30
|
# Document server options
|
29
31
|
config.document_server_root = options[Maze::Option::DS_ROOT]
|
@@ -41,6 +41,18 @@ module Maze
|
|
41
41
|
errors << "--#{Option::BUGSNAG_REPEATER_API_KEY} must be set to a 32-character hex value"
|
42
42
|
end
|
43
43
|
|
44
|
+
# --hub-repeater-api-key
|
45
|
+
key = options[Option::HUB_REPEATER_API_KEY]
|
46
|
+
if key&.empty?
|
47
|
+
$logger.warn "A hub-repeater-api-key option was provided with an empty string. This won't be used during this test run"
|
48
|
+
key = nil
|
49
|
+
end
|
50
|
+
key_regex = /^[0-9a-fA-F]{32}$/
|
51
|
+
|
52
|
+
if key && !key_regex.match?(key)
|
53
|
+
errors << "--#{Option::HUB_REPEATER_API_KEY} must be set to a 32-character hex value"
|
54
|
+
end
|
55
|
+
|
44
56
|
# Farm specific options
|
45
57
|
validate_bs options, errors if farm == 'bs'
|
46
58
|
validate_bitbar options, errors if farm == 'bb'
|
data/lib/maze/option.rb
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
module Maze
|
2
|
+
module Repeaters
|
3
|
+
# Repeats Bugsnag requests
|
4
|
+
class HubRepeater < RequestRepeater
|
5
|
+
|
6
|
+
private
|
7
|
+
|
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
|
+
request['bugsnag-api-key'] = Maze.config.hub_repeater_api_key
|
12
|
+
end
|
13
|
+
|
14
|
+
def enabled?
|
15
|
+
# enabled if the config option is on and this request type should be repeated
|
16
|
+
Maze.config.hub_repeater_api_key && url_for_request_type
|
17
|
+
end
|
18
|
+
|
19
|
+
def url_for_request_type
|
20
|
+
url = case @request_type
|
21
|
+
when :errors then 'https://notify.insighthub.smartbear.com/'
|
22
|
+
when :sessions then 'https://sessions.insighthub.smartbear.com/'
|
23
|
+
when :traces then "https://#{Maze.config.hub_repeater_api_key}.otlp.insighthub.smartbear.com/v1/traces"
|
24
|
+
else return nil
|
25
|
+
end
|
26
|
+
URI.parse(url)
|
27
|
+
end
|
28
|
+
|
29
|
+
def include_header?(key, value)
|
30
|
+
# Include all headers apart from the API key, which is set separately
|
31
|
+
key != 'bugsnag-api-key'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -40,6 +40,7 @@ module Maze
|
|
40
40
|
@request_type = request_type
|
41
41
|
@schema = JSONSchemer.schema(schema) unless schema.nil?
|
42
42
|
@bugsnag_repeater = Maze::Repeaters::BugsnagRepeater.new(@request_type)
|
43
|
+
@hub_repeater = Maze::Repeaters::HubRepeater.new(@request_type)
|
43
44
|
end
|
44
45
|
|
45
46
|
# Logs an incoming GET WEBrick request.
|
@@ -59,6 +60,7 @@ module Maze
|
|
59
60
|
def do_POST(request, response)
|
60
61
|
|
61
62
|
@bugsnag_repeater.repeat request
|
63
|
+
@hub_repeater.repeat request
|
62
64
|
|
63
65
|
# Turn the WEBrick HttpRequest into our internal HttpRequest delegate
|
64
66
|
request = Maze::HttpRequest.new(request)
|
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 = '9.
|
11
|
+
VERSION = '9.32.1'
|
12
12
|
|
13
13
|
class << self
|
14
14
|
attr_accessor :check, :driver, :internal_hooks, :mode, :start_time, :dynamic_retry, :public_address,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bugsnag-maze-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.32.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Kirkland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -496,6 +496,7 @@ files:
|
|
496
496
|
- lib/maze/plugins/logging_scenarios_plugin.rb
|
497
497
|
- lib/maze/proxy.rb
|
498
498
|
- lib/maze/repeaters/bugsnag_repeater.rb
|
499
|
+
- lib/maze/repeaters/hub_repeater.rb
|
499
500
|
- lib/maze/repeaters/request_repeater.rb
|
500
501
|
- lib/maze/request_list.rb
|
501
502
|
- lib/maze/retry_handler.rb
|