Skip to content

Commit

Permalink
Allow test cases to specify arguments for the collector
Browse files Browse the repository at this point in the history
This is used to disable feature gates that effect the removal of
deprecated components, allowing them to continue to be tested until
they are fully removed.
  • Loading branch information
Aneurysm9 committed Jun 14, 2024
1 parent b184bd6 commit d89a557
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 4 deletions.
3 changes: 2 additions & 1 deletion terraform/mock/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ locals {
otconfig_template_path = fileexists("${var.testcase}/otconfig.tpl") ? "${var.testcase}/otconfig.tpl" : module.common.default_otconfig_path
otconfig_file_path = "./otconfig.yml"
docker_compose_path = "./docker_compose.yml"
collector_args = concat(["--config=/tmp/otconfig.yaml"], var.otconfig_args)

mock_endpoint = var.mock_endpoint
sample_app_listen_address = "${module.common.sample_app_listen_address_ip}:${module.common.sample_app_listen_address_port}"
Expand Down Expand Up @@ -59,7 +60,7 @@ data "template_file" "docker_compose" {

vars = {
collector_repo_path = var.collector_repo_path
otconfig_path = local.otconfig_file_path
collector_args = jsonencode(local.collector_args)
grpc_port = module.common.grpc_port
udp_port = module.common.udp_port
http_port = module.common.http_port
Expand Down
5 changes: 3 additions & 2 deletions terraform/mock/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ variable "mock_endpoint" {
default = "mocked-server/put-data"
}



variable "otconfig_args" {
default = []
}
2 changes: 1 addition & 1 deletion terraform/templates/local/docker_compose.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
args:
BUILDMODE: copy

command: ["--config=/tmp/otconfig.yaml"]
command: ${collector_args}
volumes:
- ./otconfig.yml:/tmp/otconfig.yaml
- "../../mocked_servers/https/certificates/ssl/certificate.crt:/etc/ssl/certs/ca-certificates.crt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ soaking_data_mode = "metric"
sample_app = "spark"

sample_app_image = "public.ecr.aws/aws-otel-test/aws-otel-java-spark:latest"

otconfig_args = ["--feature-gates=-adot.exporter.datadogexporter.deprecation"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ soaking_data_mode = "trace"
sample_app = "spark"

sample_app_image = "public.ecr.aws/aws-otel-test/aws-otel-java-spark:latest"

otconfig_args = ["--feature-gates=-adot.exporter.datadogexporter.deprecation"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ soaking_data_mode = "trace"
sample_app = "spark"

sample_app_image = "public.ecr.aws/aws-otel-test/aws-otel-java-spark:latest"

otconfig_args = ["--feature-gates=-adot.exporter.logzioexporter.deprecation"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ soaking_data_mode = "trace"
sample_app = "spark"

sample_app_image = "public.ecr.aws/aws-otel-test/aws-otel-java-spark:latest"

otconfig_args = ["--feature-gates=-adot.exporter.sapmexporter.deprecation"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ soaking_data_mode = "metric"
sample_app = "spark"

sample_app_image = "public.ecr.aws/aws-otel-test/aws-otel-java-spark:latest"

otconfig_args = ["--feature-gates=-adot.exporter.signalfxexporter.deprecation"]

0 comments on commit d89a557

Please sign in to comment.