-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump Go and Sarama version on server package (#29)
* Bump Go version to 1.22 * Fix producer and load-test commands to run in docker * Upgrade ginkgo library * Update ginkgo on Makefile * Upgrade multiple dependencies * Remove Open Telemetry Sarama dependency * Bump Sarama to IBM package latest version * Add docker volume to load-test and producer commands * Fix makefile * Trying to fix action not handling error code * Force Server tests to fail for testing github action error handling * Fixing CI * Revert force fail server tests * Added healthcheck to eventsgateway api on docker compose * Testing tests on docker * Fix docker run client tests * Debugging CI * Debugging CI * Debugging CI * Debugging CI * Add custom test methods for CI * Debugging CI * Decouple CI and local test commands
- Loading branch information
1 parent
5930965
commit 0148951
Showing
13 changed files
with
353 additions
and
759 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,33 +16,33 @@ build-dev: | |
@make -f server/Makefile build-dev | ||
|
||
test: | ||
docker compose up client-tests | ||
@make deps-start | ||
@docker run -i -v ./:/app --network eventsgateway_eventsgateway eventsgateway-client-dev sh -c 'make test-go' | ||
|
||
spark-notebook: | ||
@docker compose up jupyter | ||
|
||
producer: | ||
@echo "Will connect to server at ${MY_IP}:5000" | ||
@go run main.go producer -d | ||
@docker run -it -v ./:/app --network eventsgateway_eventsgateway eventsgateway-client-dev sh -c "go run main.go producer -d" | ||
|
||
load-test: | ||
@echo "Will connect to server at ${MY_IP}:5000" | ||
@go run main.go load-test -d | ||
@docker run -it -v ./:/app --network eventsgateway_eventsgateway eventsgateway-client-dev sh -c "go run main.go load-test -d" | ||
|
||
deps-start: | ||
@docker compose up -d eventsgateway-api | ||
@docker compose up -d eventsgateway-api --wait | ||
|
||
setup: | ||
@go install github.com/onsi/ginkgo/v2/ginkgo@v2.1.4 | ||
@go install github.com/onsi/ginkgo/v2/ginkgo@v2.19.1 | ||
@go install github.com/wadey/[email protected] | ||
@go mod tidy | ||
@cd .git/hooks && ln -sf ./hooks/pre-commit.sh pre-commit | ||
|
||
setup-ci: | ||
@go install github.com/mattn/[email protected] | ||
@go install github.com/onsi/ginkgo/v2/[email protected] | ||
@go install github.com/wadey/[email protected] | ||
@go mod tidy | ||
# Run all CI commands inside a single Make target to make easier debugging. | ||
test-ci: | ||
@docker build -t eventsgateway-client-dev -f dev.Dockerfile . | ||
@docker build -t eventsgateway-server -f server/Dockerfile server | ||
@docker compose -f docker-compose-ci.yaml up -d eventsgateway-api --wait | ||
@docker run -i --network eventsgateway_eventsgateway eventsgateway-client-dev sh -c 'make test-go' | ||
|
||
test-go: unit integration test-coverage-func | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,10 @@ FROM golang:1.17-alpine | |
|
||
WORKDIR /app | ||
|
||
RUN apk add make build-base | ||
|
||
ADD .. /app | ||
|
||
RUN apk add make build-base | ||
|
||
RUN go install github.com/wadey/[email protected] && \ | ||
go install github.com/onsi/ginkgo/v2/[email protected] && \ | ||
go mod tidy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
services: | ||
zookeeper: | ||
image: confluentinc/cp-zookeeper:6.2.15 | ||
ports: | ||
- 2181:2181 | ||
environment: | ||
ZOOKEEPER_CLIENT_PORT: 2181 | ||
networks: | ||
- eventsgateway | ||
|
||
kafka: | ||
image: confluentinc/cp-kafka:6.2.15 #Kafka 2.8 | ||
ports: | ||
- 9092:9092 | ||
environment: | ||
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092 | ||
KAFKA_LISTENERS: PLAINTEXT://:9092 | ||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | ||
KAFKA_CREATE_TOPICS: uploads-au_default:1:0 | ||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1" | ||
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: "1" | ||
depends_on: | ||
zookeeper: | ||
condition: service_started | ||
healthcheck: | ||
test: [ "CMD", "nc", "-z", "localhost", "9092" ] | ||
interval: 5s | ||
timeout: 10s | ||
retries: 10 | ||
networks: | ||
- eventsgateway | ||
|
||
jaeger: | ||
image: jaegertracing/all-in-one:latest | ||
environment: | ||
- COLLECTOR_OTLP_ENABLED=true | ||
ports: | ||
- "5775:5775/udp" | ||
- "6831:6831/udp" | ||
- "6832:6832/udp" | ||
- "5778:5778" | ||
- "16686:16686" | ||
- "4317:4317" | ||
networks: | ||
- eventsgateway | ||
|
||
eventsgateway-api: | ||
image: eventsgateway-server | ||
ports: | ||
- "5000:5000" | ||
- "6060:6060" | ||
depends_on: | ||
kafka: | ||
condition: service_healthy | ||
jaeger: | ||
condition: service_started | ||
healthcheck: | ||
test: [ "CMD", "nc", "-z", "localhost", "5000" ] | ||
interval: 5s | ||
timeout: 10s | ||
retries: 10 | ||
|
||
networks: | ||
- eventsgateway | ||
|
||
networks: | ||
eventsgateway: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.