-
-
Notifications
You must be signed in to change notification settings - Fork 3
ref: Remove Kafka/Arroyo consumer code #596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
79e7c09
ef7964e
dd60b11
bdb896a
3f2795d
790136b
08f0fbe
41bc6ff
ab64fe8
5fa7c19
cddea81
72d016c
095bc80
63671d5
566d29d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,75 +64,20 @@ jobs: | |
| - name: Install dependencies | ||
| run: make install-dev | ||
|
|
||
| - name: Start Kafka with devservices | ||
| run: | | ||
| .venv/bin/devservices up --mode default | ||
|
|
||
| echo "Waiting for Kafka to be ready..." | ||
| KAFKA_READY=false | ||
| for i in {1..30}; do | ||
| KAFKA_CONTAINER=$(docker ps -qf "name=kafka") | ||
| if [ -z "$KAFKA_CONTAINER" ]; then | ||
| echo "Waiting for Kafka container to start... attempt $i/30" | ||
| sleep 2 | ||
| continue | ||
| fi | ||
|
|
||
| HEALTH_STATUS=$(docker inspect --format='{{.State.Health.Status}}' $KAFKA_CONTAINER 2>/dev/null || echo "none") | ||
| if [ "$HEALTH_STATUS" = "healthy" ]; then | ||
| echo "Kafka is ready!" | ||
| KAFKA_READY=true | ||
| break | ||
| fi | ||
| echo "Waiting for Kafka health check (status: $HEALTH_STATUS)... attempt $i/30" | ||
| sleep 2 | ||
| done | ||
|
|
||
| if [ "$KAFKA_READY" = "false" ]; then | ||
| echo "ERROR: Kafka failed to become healthy after 60 seconds" | ||
| echo "=== Docker containers ===" | ||
| docker ps -a | ||
| echo "=== Kafka logs ===" | ||
| docker logs $(docker ps -aqf "name=kafka") --tail 100 || echo "Could not get Kafka logs" | ||
| exit 1 | ||
| fi | ||
|
|
||
| docker ps | ||
|
|
||
| - name: Build Docker image with test fixtures | ||
| run: docker build --build-arg TEST_BUILD=true -t launchpad-test . | ||
|
|
||
| - name: Run all tests in Docker | ||
| run: | | ||
| # Get Kafka container info for network connectivity | ||
| KAFKA_CONTAINER=$(docker ps -qf "name=kafka") | ||
| KAFKA_NETWORK=$(docker inspect $KAFKA_CONTAINER --format='{{range $net,$v := .NetworkSettings.Networks}}{{$net}}{{end}}') | ||
|
|
||
| docker run --rm \ | ||
| --network $KAFKA_NETWORK \ | ||
| -e LAUNCHPAD_ENV=development \ | ||
| -e LAUNCHPAD_HOST=localhost \ | ||
| -e LAUNCHPAD_PORT=2218 \ | ||
| -e LAUNCHPAD_RPC_SHARED_SECRET="launchpad-test-secret" \ | ||
| -e KAFKA_BOOTSTRAP_SERVERS="kafka:9093" \ | ||
| -e KAFKA_GROUP_ID="launchpad-test-ci" \ | ||
| -e KAFKA_TOPICS="preprod-artifact-events" \ | ||
| --entrypoint python launchpad-test -m pytest -n auto tests/ --ignore=tests/e2e -v | ||
|
|
||
| - name: Show Kafka logs on failure | ||
| if: failure() | ||
| run: | | ||
| if docker ps -qf "name=kafka" >/dev/null 2>&1; then | ||
| echo "=== Kafka logs ===" | ||
| docker logs $(docker ps -qf "name=kafka") --tail 100 | ||
| fi | ||
|
|
||
| - name: Test CLI installation and basic functionality in Docker | ||
| run: | | ||
| docker run --rm \ | ||
| -e LAUNCHPAD_ENV=development \ | ||
| -e LAUNCHPAD_HOST=localhost \ | ||
| -e LAUNCHPAD_PORT=2218 \ | ||
| launchpad-test --help | ||
|
|
||
| e2e: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are the e2e tests being removed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the e2e testing was only for the arroyo setup. We can add it back for taskworker, but if anything ill do it in a later PR
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok added e2e testing code back |
||
|
|
@@ -141,106 +86,76 @@ jobs: | |
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 | ||
| with: | ||
| python-version: "3.13" | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7 | ||
| with: | ||
| enable-cache: true | ||
| cache-dependency-glob: pyproject.toml | ||
|
|
||
| - name: Install dependencies | ||
| run: make install-dev | ||
| - name: Build E2E Docker images | ||
| run: docker compose -f docker-compose.e2e.yml build | ||
|
|
||
| - name: Start Kafka with devservices | ||
| - name: Start E2E services | ||
| run: | | ||
| .venv/bin/devservices up --mode default | ||
|
|
||
| echo "Waiting for Kafka to be ready..." | ||
| KAFKA_READY=false | ||
| docker compose -f docker-compose.e2e.yml up -d kafka | ||
| echo "Waiting for Kafka to be healthy..." | ||
| for i in {1..30}; do | ||
| KAFKA_CONTAINER=$(docker ps -qf "name=kafka") | ||
| if [ -z "$KAFKA_CONTAINER" ]; then | ||
| echo "Waiting for Kafka container to start... attempt $i/30" | ||
| sleep 2 | ||
| continue | ||
| fi | ||
|
|
||
| HEALTH_STATUS=$(docker inspect --format='{{.State.Health.Status}}' $KAFKA_CONTAINER 2>/dev/null || echo "none") | ||
| if [ "$HEALTH_STATUS" = "healthy" ]; then | ||
| if docker compose -f docker-compose.e2e.yml ps kafka | grep -q "healthy"; then | ||
| echo "Kafka is ready!" | ||
| KAFKA_READY=true | ||
| break | ||
| fi | ||
| echo "Waiting for Kafka health check (status: $HEALTH_STATUS)... attempt $i/30" | ||
| sleep 2 | ||
| echo "Waiting for Kafka... attempt $i/30" | ||
| sleep 3 | ||
| done | ||
|
|
||
| if [ "$KAFKA_READY" = "false" ]; then | ||
| echo "ERROR: Kafka failed to become healthy after 60 seconds" | ||
| echo "=== Docker containers ===" | ||
| docker ps -a | ||
| echo "=== Kafka logs ===" | ||
| docker logs $(docker ps -aqf "name=kafka") --tail 100 || echo "Could not get Kafka logs" | ||
| if ! docker compose -f docker-compose.e2e.yml ps kafka | grep -q "healthy"; then | ||
| echo "ERROR: Kafka failed to become healthy" | ||
| docker compose -f docker-compose.e2e.yml logs kafka | ||
| exit 1 | ||
| fi | ||
|
|
||
| docker ps | ||
|
|
||
| - name: Create Kafka topic | ||
| run: | | ||
| KAFKA_CONTAINER=$(docker ps -qf "name=kafka") | ||
| echo "Creating preprod-artifact-events topic..." | ||
| docker exec $KAFKA_CONTAINER kafka-topics --bootstrap-server localhost:9092 --create --topic preprod-artifact-events --partitions 1 --replication-factor 1 --if-not-exists | ||
| echo "Topic created successfully" | ||
|
|
||
| - name: Build E2E Docker images | ||
| run: docker compose -f docker-compose.e2e.yml build | ||
|
|
||
| - name: Start E2E services | ||
| run: | | ||
| # Start services in detached mode (minio, mock-sentry-api, launchpad) | ||
| docker compose -f docker-compose.e2e.yml up -d minio mock-sentry-api launchpad | ||
| docker compose -f docker-compose.e2e.yml up -d taskbroker minio mock-sentry-api | ||
| echo "Waiting for mock-sentry-api to be healthy..." | ||
| for i in {1..20}; do | ||
| if docker compose -f docker-compose.e2e.yml ps mock-sentry-api | grep -q "healthy"; then | ||
| echo "Mock Sentry API is ready!" | ||
| break | ||
| fi | ||
| echo "Waiting for Mock API... attempt $i/20" | ||
| sleep 3 | ||
| done | ||
| if ! docker compose -f docker-compose.e2e.yml ps mock-sentry-api | grep -q "healthy"; then | ||
| echo "ERROR: Mock Sentry API failed to become healthy" | ||
| docker compose -f docker-compose.e2e.yml logs mock-sentry-api | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Wait for launchpad to be healthy | ||
| echo "Waiting for Launchpad to be healthy..." | ||
| LAUNCHPAD_READY=false | ||
| docker compose -f docker-compose.e2e.yml up -d launchpad | ||
| echo "Waiting for Launchpad worker to be healthy..." | ||
| for i in {1..30}; do | ||
| if docker compose -f docker-compose.e2e.yml ps launchpad | grep -q "healthy"; then | ||
| echo "Launchpad is ready!" | ||
| LAUNCHPAD_READY=true | ||
| break | ||
| fi | ||
| echo "Waiting for Launchpad... attempt $i/30" | ||
| sleep 5 | ||
| done | ||
|
|
||
| if [ "$LAUNCHPAD_READY" = "false" ]; then | ||
| echo "ERROR: Launchpad failed to become healthy" | ||
| if ! docker compose -f docker-compose.e2e.yml ps launchpad | grep -q "healthy"; then | ||
| echo "ERROR: Launchpad worker failed to become healthy" | ||
| docker compose -f docker-compose.e2e.yml logs launchpad | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Show running services | ||
| docker compose -f docker-compose.e2e.yml ps | ||
|
|
||
| - name: Run E2E tests | ||
| run: | | ||
| docker compose -f docker-compose.e2e.yml run --rm e2e-tests | ||
| timeout-minutes: 10 | ||
| run: docker compose -f docker-compose.e2e.yml run --rm e2e-tests pytest e2e_tests/test_e2e_flow.py -v --tb=short | ||
| timeout-minutes: 5 | ||
|
|
||
| - name: Show service logs on failure | ||
| if: failure() | ||
| run: | | ||
| echo "=== Launchpad logs ===" | ||
| docker compose -f docker-compose.e2e.yml logs launchpad | ||
| echo "=== TaskBroker logs ===" | ||
| docker compose -f docker-compose.e2e.yml logs taskbroker | ||
| echo "=== Mock API logs ===" | ||
| docker compose -f docker-compose.e2e.yml logs mock-sentry-api | ||
| echo "=== Kafka logs ===" | ||
| docker logs $(docker ps -qf "name=kafka") --tail 100 || echo "Could not get Kafka logs" | ||
| docker compose -f docker-compose.e2e.yml logs kafka | ||
|
|
||
| - name: Cleanup E2E environment | ||
| if: always() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,47 +3,36 @@ x-sentry-service-config: | |
| version: 0.1 | ||
| service_name: launchpad | ||
| dependencies: | ||
| kafka: | ||
| description: Shared instance of kafka used by sentry services | ||
| remote: | ||
| repo_name: sentry-shared-kafka | ||
| branch: main | ||
| repo_link: https://github.com/getsentry/sentry-shared-kafka.git | ||
| launchpad: | ||
| description: Service that powers preprod artifact analysis | ||
| modes: | ||
| default: [kafka] | ||
| containerized: [kafka, launchpad] | ||
| default: [] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need any dependencies now?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The worker connects to TaskBroker via gRPC. Kafka and TaskBroker are managed by sentry's devservices, not launchpad's, so yeah we shouldn't need it anymore from what i can tell |
||
| containerized: [launchpad] | ||
|
|
||
| x-programs: | ||
| devserver: | ||
| command: make serve | ||
| command: make worker | ||
|
|
||
| # Assuming we only have remote dependencies (currently the case), then below is only relevant when running launchpad as a dependency of the monolith. | ||
| # Below is only relevant when running launchpad as a dependency of the monolith. | ||
| services: | ||
| launchpad: | ||
| image: ghcr.io/getsentry/launchpad:nightly | ||
| ports: | ||
| - 127.0.0.1:2218:2218 # Bind to localhost only - no external access | ||
| command: | ||
| - serve | ||
| - worker | ||
| - --verbose | ||
| healthcheck: | ||
| test: curl -f http://127.0.0.1:2218/health || exit 1 | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 3 | ||
| start_period: 30s | ||
NicoHinderling marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| environment: | ||
| PYTHONUNBUFFERED: 1 | ||
| KAFKA_BOOTSTRAP_SERVERS: kafka:9093 | ||
| KAFKA_GROUP_ID: launchpad-devservices | ||
| KAFKA_TOPICS: preprod-artifact-events | ||
| LAUNCHPAD_HOST: "0.0.0.0" # Inside container, but port binding restricts access | ||
| LAUNCHPAD_PORT: "2218" | ||
| LAUNCHPAD_ENV: "development" | ||
| SENTRY_BASE_URL: "http://host.docker.internal:8000" | ||
| LAUNCHPAD_RPC_SHARED_SECRET: "launchpad-also-very-long-value-haha" | ||
| LAUNCHPAD_WORKER_RPC_HOST: "host.docker.internal:50051" | ||
| LAUNCHPAD_WORKER_CONCURRENCY: "1" | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "[ -f /tmp/health ]"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 3 | ||
| start_period: 15s | ||
| platform: linux/amd64 | ||
| extra_hosts: | ||
NicoHinderling marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| host.docker.internal: host-gateway | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.