-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.e2e.yml
More file actions
125 lines (118 loc) · 3.71 KB
/
Copy pathdocker-compose.e2e.yml
File metadata and controls
125 lines (118 loc) · 3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# E2E test setup for Launchpad (fully self-contained, no devservices needed)
services:
# Kafka (KRaft mode, no Zookeeper)
kafka:
image: confluentinc/cp-kafka:7.7.1
environment:
KAFKA_NODE_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_PROCESS_ROLES: broker,controller
CLUSTER_ID: e2e-test-cluster-id-001
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_LOG_RETENTION_HOURS: 1
KAFKA_HEAP_OPTS: "-Xmx256m -Xms256m"
healthcheck:
test: ["CMD", "kafka-topics", "--bootstrap-server", "localhost:9092", "--list"]
interval: 10s
timeout: 10s
retries: 5
start_period: 20s
networks:
- launchpad-e2e
# TaskBroker (gRPC bridge between Kafka and workers)
taskbroker:
image: ghcr.io/getsentry/taskbroker:nightly
environment:
TASKBROKER_KAFKA_CLUSTER: "kafka:9092"
TASKBROKER_KAFKA_TOPIC: "taskworker-launchpad"
TASKBROKER_KAFKA_DEADLETTER_TOPIC: "taskworker-launchpad-dlq"
TASKBROKER_KAFKA_CONSUMER_GROUP: "taskbroker-launchpad"
TASKBROKER_CREATE_MISSING_TOPICS: "true"
TASKBROKER_GRPC_SHARED_SECRET: '["test-secret-key-for-e2e"]'
depends_on:
kafka:
condition: service_healthy
platform: linux/amd64
networks:
- launchpad-e2e
# Mock Sentry API server
mock-sentry-api:
build:
context: .
dockerfile: tests/e2e/mock-sentry-api/Dockerfile
ports:
- "8001:8000"
environment:
PYTHONUNBUFFERED: "1"
healthcheck:
test: ["CMD", "curl", "-f", "-L", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 3
volumes:
- mock-api-data:/app/data
networks:
- launchpad-e2e
# Launchpad worker (connects to TaskBroker via gRPC)
launchpad:
build:
context: .
dockerfile: Dockerfile
args:
TEST_BUILD: "true"
environment:
PYTHONUNBUFFERED: "1"
LAUNCHPAD_ENV: "e2e-test"
SENTRY_BASE_URL: "http://mock-sentry-api:8000"
LAUNCHPAD_RPC_SHARED_SECRET: "test-secret-key-for-e2e"
TASKWORKER_SHARED_SECRET: '["test-secret-key-for-e2e"]'
LAUNCHPAD_WORKER_RPC_HOST: "taskbroker:50051"
LAUNCHPAD_WORKER_CONCURRENCY: "3"
LAUNCHPAD_WORKER_MAX_CHILD_TASK_COUNT: "10"
KAFKA_BOOTSTRAP_SERVERS: "kafka:9092"
TASKWORKER_TOPIC: "taskworker-launchpad"
SENTRY_DSN: ""
healthcheck:
test: ["CMD-SHELL", "[ -f /tmp/health ]"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
depends_on:
taskbroker:
condition: service_started
mock-sentry-api:
condition: service_healthy
networks:
- launchpad-e2e
# Test runner (dispatches tasks via taskbroker-client)
e2e-tests:
build:
context: .
dockerfile: tests/e2e/Dockerfile.test-runner
environment:
MOCK_API_URL: "http://mock-sentry-api:8000"
KAFKA_BOOTSTRAP_SERVERS: "kafka:9092"
TASKWORKER_TOPIC: "taskworker-launchpad"
TASKWORKER_SHARED_SECRET: '["test-secret-key-for-e2e"]'
depends_on:
launchpad:
condition: service_healthy
mock-sentry-api:
condition: service_healthy
volumes:
- ./tests/e2e/results:/app/results
command: pytest e2e_tests/test_e2e_flow.py -v --tb=short
networks:
- launchpad-e2e
volumes:
mock-api-data:
networks:
launchpad-e2e:
name: launchpad-e2e