Skip to content

Commit

Permalink
Remove handling of GW timeout errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie committed Sep 24, 2024
1 parent 4e624c9 commit 19ccfdc
Show file tree
Hide file tree
Showing 15 changed files with 2 additions and 443 deletions.
2 changes: 0 additions & 2 deletions components/services/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ def process
HandleSQSMessageEvent.call(event:)
when :service_action
event.service_action.call(**event.parameters)
when :cloudwatch_log_event
HandleLogEvents.call(event:)
end
end

Expand Down
55 changes: 0 additions & 55 deletions components/services/app/parsers/cloudwatch_log_event_parser.rb

This file was deleted.

6 changes: 0 additions & 6 deletions components/services/app/parsers/event_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ def parse_event
SQSMessageEventParser
elsif service_action?
ServiceActionParser
elsif cloudwatch_log_event?
CloudWatchLogEventParser
end

parser.new(event).parse_event
Expand All @@ -32,8 +30,4 @@ def ecs_event?
def service_action?
event.key?("serviceAction")
end

def cloudwatch_log_event?
event.keys.size == 1 && event.key?("awslogs")
end
end
17 changes: 0 additions & 17 deletions components/services/app/parsers/opensips_log_event_parser.rb

This file was deleted.

63 changes: 0 additions & 63 deletions components/services/app/workflows/find_ecs_task.rb

This file was deleted.

19 changes: 0 additions & 19 deletions components/services/app/workflows/handle_log_events.rb

This file was deleted.

65 changes: 0 additions & 65 deletions components/services/app/workflows/handle_opensips_log_event.rb

This file was deleted.

1 change: 0 additions & 1 deletion components/services/config/initializers/sentry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
Sentry.init do |config|
config.dsn = AppSettings[:sentry_dsn]
config.environment = AppSettings.env
config.debug = true
config.background_worker_threads = 0
end
6 changes: 2 additions & 4 deletions components/services/lib/somleng_region/region.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ class RegionNotFound < StandardError; end
alias: "hydrogen",
group_id: 1,
human_name: "South East Asia (Singapore)",
nat_ip: "13.250.230.15",
vpc_cidr: "10.10.0.0/22"
nat_ip: "13.250.230.15"
),
new(
identifier: "us-east-1",
alias: "helium",
group_id: 2,
human_name: "North America (N. Virginia, USA)",
nat_ip: "52.4.242.134",
vpc_cidr: "10.20.0.0/20"
nat_ip: "52.4.242.134"
)
]

Expand Down

This file was deleted.

43 changes: 0 additions & 43 deletions components/services/spec/requests/cloudwatch_log_events_spec.rb

This file was deleted.

2 changes: 0 additions & 2 deletions components/services/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
end

ENV["PUBLIC_GATEWAY_LOG_GROUP"] = "public-gateway"
ENV["CLIENT_GATEWAY_LOG_GROUP"] = "client-gateway"
ENV["SWITCH_GROUP"] = "service:somleng-switch"
ENV["MEDIA_PROXY_GROUP"] = "service:media-proxy"
ENV["CLIENT_GATEWAY_GROUP"] = "service:client-gateway"
Expand Down
37 changes: 0 additions & 37 deletions components/services/spec/support/aws_stubs.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
AWSRequests = Array.new
AWSRequest = Struct.new(:context, :operation_name, keyword_init: true)

Aws.config[:ecs] = {
stub_responses: {
describe_container_instances: lambda { |_context|
Expand All @@ -9,40 +6,6 @@
ec2_instance_id: "ec2-instance-id"
]
}
},
list_clusters: ->(context) {
{
cluster_arns: [ "arn:aws:ecs:#{context.client.config.region}:123456789012:cluster/cluster-1" ]
}
},
list_tasks: ->(context) {
{
task_arns: [ "arn:aws:ecs:#{context.client.config.region}:123456789012:task/cluster-1/#{SecureRandom.uuid.gsub('-', '')}" ]
}
},
describe_tasks: ->(context) {
{
tasks: [
{
attachments: [
{
type: "ElasticNetworkInterface",
details: [
{
name: "privateIPv4Address",
value: "10.10.1.180"
}
]
}
],
task_arn: "arn:aws:ecs:#{context.client.config.region}:123456789012:task/cluster-1/#{SecureRandom.uuid.gsub('-', '')}",
cluster_arn: "arn:aws:ecs:#{context.client.config.region}:123456789012:cluster/cluster-1"
}
]
}
},
stop_task: ->(context) {
AWSRequests << AWSRequest.new(context:, operation_name: :stop_task)
}
}
}
Expand Down
Loading

0 comments on commit 19ccfdc

Please sign in to comment.