Skip to content

Commit

Permalink
Add async workflow integration test step to CI (uber#5681)
Browse files Browse the repository at this point in the history
  • Loading branch information
taylanisikdemir authored Feb 22, 2024
1 parent aab0c0a commit e88d718
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .buildkite/pipeline-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,21 @@ steps:
run: integration-test-ndc-postgres
config: docker/buildkite/docker-compose.yml

- label: ":golang: async wf integration test with kafka"
agents:
queue: "workers"
docker: "*"
commands:
- "make .just-build" # ensure that we are not rebuilding binaries and not regenerating code
- "go test -timeout 60s -run ^TestAsyncWFIntegrationSuite -tags asyncwfintegration -count 1 -v github.com/uber/cadence/host"
retry:
automatic:
limit: 1
plugins:
- docker-compose#v3.0.0:
run: integration-test-async-wf
config: docker/buildkite/docker-compose.yml

- wait

- label: ":golang: code-coverage"
Expand Down
17 changes: 17 additions & 0 deletions .buildkite/pipeline-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ steps:
- docker-compose#v3.0.0:
run: integration-test-cassandra
config: docker/buildkite/docker-compose-es7.yml

- label: ":golang: integration test with cassandra with OpenSearch v2"
agents:
queue: "workers"
Expand All @@ -84,6 +85,7 @@ steps:
- docker-compose#v3.0.0:
run: integration-test-cassandra
config: docker/buildkite/docker-compose-opensearch2.yml

- label: ":golang: integration ndc test with cassandra"
agents:
queue: "workers"
Expand Down Expand Up @@ -169,6 +171,21 @@ steps:
run: integration-test-ndc-postgres
config: docker/buildkite/docker-compose.yml

- label: ":golang: async wf integration test with kafka"
agents:
queue: "workers"
docker: "*"
commands:
- "make .just-build" # ensure that we are not rebuilding binaries and not regenerating code
- "go test -timeout 60s -run ^TestAsyncWFIntegrationSuite -tags asyncwfintegration -count 1 -v github.com/uber/cadence/host"
retry:
automatic:
limit: 1
plugins:
- docker-compose#v3.0.0:
run: integration-test-async-wf
config: docker/buildkite/docker-compose.yml

- wait

- label: ":golang: code-coverage"
Expand Down
1 change: 1 addition & 0 deletions docker/buildkite/docker-compose-local-async-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ services:
- "7935:7935"
- "7939:7939"
environment:
- "ASYNC_WF_KAFKA_QUEUE_TOPIC=async-wf-topic1"
- "CASSANDRA=1"
- "CASSANDRA_SEEDS=cassandra"
- "ES_SEEDS=elasticsearch"
Expand Down
31 changes: 31 additions & 0 deletions docker/buildkite/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ services:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
# for async wf tests, create a topic with 10 partitions and 1 replica
# topic name must match ASYNC_WF_KAFKA_QUEUE_TOPIC
KAFKA_CREATE_TOPICS: "async-wf-topic1:10:1"

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.22
Expand Down Expand Up @@ -281,6 +284,34 @@ services:
aliases:
- integration-test-ndc

integration-test-async-wf:
build:
context: ../../
dockerfile: ./docker/buildkite/Dockerfile
environment:
- "ASYNC_WF_KAFKA_QUEUE_TOPIC=async-wf-topic1"
- "CASSANDRA=1"
- "CASSANDRA_SEEDS=cassandra"
- "ES_SEEDS=elasticsearch"
- "KAFKA_SEEDS=kafka"
- "KAFKA_PORT=9092"
- BUILDKITE_AGENT_ACCESS_TOKEN
- BUILDKITE_JOB_ID
- BUILDKITE_BUILD_ID
- BUILDKITE_BUILD_NUMBER
depends_on:
cassandra:
condition: service_healthy
kafka:
condition: service_started
volumes:
- ../../:/cadence
- /usr/bin/buildkite-agent:/usr/bin/buildkite-agent
networks:
services-network:
aliases:
- integration-test-async-wf

coverage-report:
build:
context: ../../
Expand Down
2 changes: 1 addition & 1 deletion host/testdata/integration_async_wf_with_kafka_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ asyncwfqueues:
connection:
brokers:
- "${KAFKA_SEEDS}:${KAFKA_PORT}"
topic: async-wf-topic1
topic: "${ASYNC_WF_KAFKA_QUEUE_TOPIC}"
messagingclientconfig:
usemock: true
historyconfig:
Expand Down

0 comments on commit e88d718

Please sign in to comment.