Skip to content

Commit

Permalink
Merge pull request #729 from bugsnag/tms/remove-aspecto
Browse files Browse the repository at this point in the history
Remove Aspecto repeater
  • Loading branch information
twometresteve authored Mar 6, 2025
2 parents b10eb9a + 9867bf8 commit 401f03f
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 63 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 9.25.0 - 2025/03/05

## Removals

- Remove Aspecto repeater [729](https://github.com/bugsnag/maze-runner/pull/729)

# 9.24.0 - 2025/03/04

## Enhancements
Expand Down
1 change: 0 additions & 1 deletion bin/maze-runner
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ require_relative '../lib/maze/network'
require_relative '../lib/maze/proxy'
require_relative '../lib/maze/retry_handler'
require_relative '../lib/maze/repeaters/request_repeater'
require_relative '../lib/maze/repeaters/aspecto_repeater'
require_relative '../lib/maze/repeaters/bugsnag_repeater'
require_relative '../lib/maze/runner'
require_relative '../lib/maze/terminating_server'
Expand Down
1 change: 0 additions & 1 deletion docs/Test_Inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Maze Runner recognises various environment variables, as follows:
`MAZE_SB_LOCAL` - location of the SmartBear secure tunnel binary.
`BITBAR_USERNAME`/`BITBAR_ACCESS_KEY` - BitBar account credentials.

`MAZE_ASPECTO_REPEATER_API_KEY` - Enables forwarding of all received POST trace requests to Aspecto, using the API key provided.
`MAZE_REPEATER_API_KEY` - Enables forwarding of all received session, error and trace requests to Bugsnag, using the API key provided.

#### BrowserStack
Expand Down
3 changes: 0 additions & 3 deletions lib/maze/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ def initialize
# The server endpoints for which invalid requests should be captured and cause tests to fail
attr_accessor :captured_invalid_requests

# API key to use when repeating requests to Bugsnag
attr_accessor :aspecto_repeater_api_key

# API key to use when repeating requests to Bugsnag
attr_accessor :bugsnag_repeater_api_key

Expand Down
1 change: 0 additions & 1 deletion lib/maze/option.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ module Option

# General options
AWS_PUBLIC_IP = 'aws-public-ip'
ASPECTO_REPEATER_API_KEY = 'aspecto-repeater-api-key'
BUGSNAG_REPEATER_API_KEY = 'repeater-api-key'
BUGSNAG = 'bugsnag'
RETRIES = 'retries'
Expand Down
6 changes: 0 additions & 6 deletions lib/maze/option/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ def parse(args)
short: :none,
default: true

opt Option::ASPECTO_REPEATER_API_KEY,
'Enables forwarding of all received POST requests to Aspecto, using the API key provided. MAZE_ASPECTO_REPEATER_API_KEY may also be set.',
short: :none,
type: :string

opt Option::BUGSNAG_REPEATER_API_KEY,
'Enables forwarding of all received POST requests to Bugsnag, using the API key provided. MAZE_REPEATER_API_KEY may also be set.',
short: :none,
Expand Down Expand Up @@ -281,7 +276,6 @@ def populate_environmental_defaults(options)
options[Option::SELENIUM_SERVER] ||= ENV['MAZE_SELENIUM_SERVER'] || 'https://us-west-desktop-hub.bitbar.com/wd/hub'
end

options[Option::ASPECTO_REPEATER_API_KEY] ||= ENV['MAZE_ASPECTO_REPEATER_API_KEY']
options[Option::BUGSNAG_REPEATER_API_KEY] ||= ENV['MAZE_REPEATER_API_KEY']
options[Option::SB_LOCAL] ||= ENV['MAZE_SB_LOCAL'] || '/SBSecureTunnel'
options[Option::BS_LOCAL] ||= ENV['MAZE_BS_LOCAL'] || '/BrowserStackLocal'
Expand Down
2 changes: 0 additions & 2 deletions lib/maze/option/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ def populate(config, options)
config.aws_public_ip = options[Maze::Option::AWS_PUBLIC_IP]
config.enable_retries = options[Maze::Option::RETRIES]
config.enable_bugsnag = options[Maze::Option::BUGSNAG]
aspecto_repeater_api_key = options[Maze::Option::ASPECTO_REPEATER_API_KEY]
config.aspecto_repeater_api_key = aspecto_repeater_api_key unless aspecto_repeater_api_key&.empty?
bugsnag_repeater_api_key = options[Maze::Option::BUGSNAG_REPEATER_API_KEY]
config.bugsnag_repeater_api_key = bugsnag_repeater_api_key unless bugsnag_repeater_api_key&.empty?

Expand Down
34 changes: 0 additions & 34 deletions lib/maze/repeaters/aspecto_repeater.rb

This file was deleted.

2 changes: 0 additions & 2 deletions lib/maze/servlets/servlet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def initialize(server, request_type, schema=nil)
super server
@request_type = request_type
@schema = JSONSchemer.schema(schema) unless schema.nil?
@aspecto_repeater = Maze::Repeaters::AspectoRepeater.new(@request_type)
@bugsnag_repeater = Maze::Repeaters::BugsnagRepeater.new(@request_type)
end

Expand All @@ -59,7 +58,6 @@ def do_GET(request, _response)
# @param response [HTTPResponse] The response to return
def do_POST(request, response)

@aspecto_repeater.repeat request
@bugsnag_repeater.repeat request

# Turn the WEBrick HttpRequest into our internal HttpRequest delegate
Expand Down
3 changes: 0 additions & 3 deletions test/unit/maze/option/parser_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def setup
ENV.delete('MAZE_SELENIUM_SERVER')
ENV.delete('MAZE_APPLE_TEAM_ID')
ENV.delete('MAZE_UDID')
ENV.delete('MAZE_ASPECTO_REPEATER_API_KEY')
ENV.delete('MAZE_REPEATER_API_KEY')
ENV.delete('BITBAR_USERNAME')
ENV.delete('BITBAR_ACCESS_KEY')
Expand Down Expand Up @@ -136,7 +135,6 @@ def test_environment_values
ENV['MAZE_SELENIUM_SERVER'] = 'ENV_SELENIUM_SERVER'
ENV['MAZE_APPLE_TEAM_ID'] = 'ENV_TEAM_ID'
ENV['MAZE_UDID'] = 'ENV_UDID'
ENV['MAZE_ASPECTO_REPEATER_API_KEY'] = 'ENV_ASPECTO_REPEATER_API_KEY'
ENV['MAZE_REPEATER_API_KEY'] = 'ENV_REPEATER_API_KEY'

args = %w[--farm=bb]
Expand All @@ -149,7 +147,6 @@ def test_environment_values
# Local-only options
assert_equal('ENV_TEAM_ID', options[Maze::Option::APPLE_TEAM_ID])
assert_equal('ENV_UDID', options[Maze::Option::UDID])
assert_equal('ENV_ASPECTO_REPEATER_API_KEY', options[Maze::Option::ASPECTO_REPEATER_API_KEY])
assert_equal('ENV_REPEATER_API_KEY', options[Maze::Option::BUGSNAG_REPEATER_API_KEY])
end

Expand Down
11 changes: 1 addition & 10 deletions test/unit/maze/option/processor_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def test_default_options
assert_false config.always_log
assert_false config.https
assert_nil config.bugsnag_repeater_api_key
assert_nil config.aspecto_repeater_api_key
end

def test_overriden_defaults
Expand Down Expand Up @@ -142,38 +141,30 @@ def test_filename_options
end

def test_repeater_key_responses
normal_args = %w[--repeater-api-key=foo --aspecto-repeater-api-key=bar]
normal_args = %w[--repeater-api-key=foo]
normal_options = Maze::Option::Parser.parse normal_args
normal_config = Maze::Configuration.new
Maze::Option::Processor.populate normal_config, normal_options
assert_equal 'foo', normal_config.bugsnag_repeater_api_key
assert_equal 'bar', normal_config.aspecto_repeater_api_key

empty_args = %w[--repeater-api-key= --aspecto-repeater-api-key=]
empty_options = Maze::Option::Parser.parse empty_args
empty_config = Maze::Configuration.new
Maze::Option::Processor.populate empty_config, empty_options
assert_nil empty_config.bugsnag_repeater_api_key
assert_nil empty_config.aspecto_repeater_api_key

ENV['MAZE_ASPECTO_REPEATER_API_KEY'] = 'test_1'
ENV['MAZE_REPEATER_API_KEY'] = 'test_2'
env_options = Maze::Option::Parser.parse []
env_config = Maze::Configuration.new
Maze::Option::Processor.populate env_config, env_options
assert_equal 'test_1', env_config.aspecto_repeater_api_key
assert_equal 'test_2', env_config.bugsnag_repeater_api_key
ENV.delete('MAZE_ASPECTO_REPEATER_API_KEY')
ENV.delete('MAZE_REPEATER_API_KEY')

ENV['MAZE_ASPECTO_REPEATER_API_KEY'] = ''
ENV['MAZE_REPEATER_API_KEY'] = ''
empty_env_options = Maze::Option::Parser.parse []
empty_env_config = Maze::Configuration.new
Maze::Option::Processor.populate empty_env_config, empty_env_options
assert_nil empty_env_config.bugsnag_repeater_api_key
assert_nil empty_env_config.aspecto_repeater_api_key
ENV.delete('MAZE_ASPECTO_REPEATER_API_KEY')
ENV.delete('MAZE_REPEATER_API_KEY')
end

Expand Down

0 comments on commit 401f03f

Please sign in to comment.