From 9f0828e8a2445949857bb3e84728af194e257a57 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Mon, 23 Oct 2023 16:30:41 -0300 Subject: [PATCH 01/48] run tests through agent --- .github/workflows/docker.yaml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 2e90a2a..389b329 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -32,4 +32,32 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max tags: | - kubeshop/demo-pokemon-api:latest \ No newline at end of file + kubeshop/demo-pokemon-api:latest + + tracet-tests: + needs: [build] + name: Tracetests + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Tracetest + uses: kubeshop/tracetest-agent-action@main + with: + apiKey: ${{ secrets.TRACETEST_API_KEY }} + + - name: Start pokeshop services + uses: isbang/compose-action@v1.5.1 + with: + compose-file: | + docker-compose.yml + docker-compose.stream.yml + - name: Run tracetests + run: | + tracetest \ + --config ./tracetest/config/tracetest-cli.yaml \ + --file ./tracetest/teests/testsuite.yaml + + From 67e3593e9bf925e1d36b57378f62016f015535a3 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Mon, 23 Oct 2023 18:12:16 -0300 Subject: [PATCH 02/48] test disable cache --- .github/workflows/docker.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 389b329..d2f852a 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -29,8 +29,8 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - cache-from: type=gha - cache-to: type=gha,mode=max + # cache-from: type=gha + # cache-to: type=gha,mode=max tags: | kubeshop/demo-pokemon-api:latest From e299e13e99e32741d4b8f40b83c1583986fee673 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Mon, 23 Oct 2023 18:22:32 -0300 Subject: [PATCH 03/48] revert --- .github/workflows/docker.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index d2f852a..389b329 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -29,8 +29,8 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - # cache-from: type=gha - # cache-to: type=gha,mode=max + cache-from: type=gha + cache-to: type=gha,mode=max tags: | kubeshop/demo-pokemon-api:latest From d015ba587dca6358ac785c2ca2a64f5a5646e164 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Mon, 23 Oct 2023 18:34:56 -0300 Subject: [PATCH 04/48] test improvements to dockerfile --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f04d03f..e4849e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,7 @@ FROM node:20.5.1-alpine as build-ui WORKDIR /ui ENV PATH /ui/node_modules/.bin:$PATH -COPY ./web/package.json ./ -COPY ./web/package-lock.json ./ +COPY ./web/package*.json ./ RUN npm ci --silent COPY ./web ./ @@ -27,12 +26,11 @@ FROM node:alpine as app WORKDIR /app COPY ./api/package.json ./api/package-lock.json ./ -RUN npm clean-install - EXPOSE 80 ENV NPM_RUN_COMMAND=api +COPY --from=build /build/node_modules ./ COPY --from=build /build/.build/* ./ COPY --from=build /build/migrations/* ./migrations/ COPY --from=build-ui /ui/build ./ui From 20c5c26bd05475f2a228d075f0f7a52a5dd0e973 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Mon, 23 Oct 2023 18:50:19 -0300 Subject: [PATCH 05/48] more tests --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e4849e8..cbb3e36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20.5.1-alpine as build-ui +FROM node:21-alpine as build-ui WORKDIR /ui ENV PATH /ui/node_modules/.bin:$PATH @@ -10,7 +10,7 @@ COPY ./web ./ RUN npm run build # build -FROM node:alpine as build +FROM node:21-alpine as build WORKDIR /build RUN npm i -g typescript @@ -22,7 +22,7 @@ COPY ./api ./ RUN npm run build # app -FROM node:alpine as app +FROM node:21-alpine as app WORKDIR /app COPY ./api/package.json ./api/package-lock.json ./ From 2c70f7881497e8823c0598fb33c11c193e76f3b0 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Mon, 23 Oct 2023 18:55:55 -0300 Subject: [PATCH 06/48] revert --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cbb3e36..e4849e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:21-alpine as build-ui +FROM node:20.5.1-alpine as build-ui WORKDIR /ui ENV PATH /ui/node_modules/.bin:$PATH @@ -10,7 +10,7 @@ COPY ./web ./ RUN npm run build # build -FROM node:21-alpine as build +FROM node:alpine as build WORKDIR /build RUN npm i -g typescript @@ -22,7 +22,7 @@ COPY ./api ./ RUN npm run build # app -FROM node:21-alpine as app +FROM node:alpine as app WORKDIR /app COPY ./api/package.json ./api/package-lock.json ./ From ad04fde667b168b059961ee03a15e8c9b404e1d4 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 24 Oct 2023 11:33:28 -0300 Subject: [PATCH 07/48] test maxsock --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e4849e8..95b5734 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /ui ENV PATH /ui/node_modules/.bin:$PATH COPY ./web/package*.json ./ -RUN npm ci --silent +RUN npm ci --maxsocket --silent COPY ./web ./ RUN npm run build @@ -15,7 +15,7 @@ FROM node:alpine as build WORKDIR /build RUN npm i -g typescript COPY ./api/package*.json ./ -RUN npm ci +RUN npm ci --maxsocket --silent COPY ./api ./ From 079a664580be40f3c65beac014037f05fbde4fd1 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 24 Oct 2023 11:38:56 -0300 Subject: [PATCH 08/48] maxsockets --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 95b5734..73e4a56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /ui ENV PATH /ui/node_modules/.bin:$PATH COPY ./web/package*.json ./ -RUN npm ci --maxsocket --silent +RUN npm ci --maxsockets 1 --silent COPY ./web ./ RUN npm run build @@ -15,7 +15,7 @@ FROM node:alpine as build WORKDIR /build RUN npm i -g typescript COPY ./api/package*.json ./ -RUN npm ci --maxsocket --silent +RUN npm ci --maxsockets 1 --silent COPY ./api ./ From ce9190bb2260ef2e40a036a3ae056cc00492a463 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 24 Oct 2023 11:57:53 -0300 Subject: [PATCH 09/48] maxsockets increase --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 73e4a56..40137e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /ui ENV PATH /ui/node_modules/.bin:$PATH COPY ./web/package*.json ./ -RUN npm ci --maxsockets 1 --silent +RUN npm ci --maxsockets 10 --silent COPY ./web ./ RUN npm run build @@ -15,7 +15,7 @@ FROM node:alpine as build WORKDIR /build RUN npm i -g typescript COPY ./api/package*.json ./ -RUN npm ci --maxsockets 1 --silent +RUN npm ci --maxsockets 10 --silent COPY ./api ./ From 110af8e1ad186cbcf8554308d160d39e9beb7aed Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 24 Oct 2023 12:22:10 -0300 Subject: [PATCH 10/48] rever --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 40137e9..73e4a56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /ui ENV PATH /ui/node_modules/.bin:$PATH COPY ./web/package*.json ./ -RUN npm ci --maxsockets 10 --silent +RUN npm ci --maxsockets 1 --silent COPY ./web ./ RUN npm run build @@ -15,7 +15,7 @@ FROM node:alpine as build WORKDIR /build RUN npm i -g typescript COPY ./api/package*.json ./ -RUN npm ci --maxsockets 10 --silent +RUN npm ci --maxsockets 1 --silent COPY ./api ./ From 4866ec06813a2ae786e58d953a1473c1e34b5cc3 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 24 Oct 2023 13:58:06 -0300 Subject: [PATCH 11/48] use rc --- .github/workflows/docker.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 389b329..72e0c3c 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -46,6 +46,7 @@ jobs: - name: Setup Tracetest uses: kubeshop/tracetest-agent-action@main with: + version: v0.14.4-rc.1 apiKey: ${{ secrets.TRACETEST_API_KEY }} - name: Start pokeshop services From f492c1be4e538fea536adbf7932f673791f105fd Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 24 Oct 2023 15:47:06 -0300 Subject: [PATCH 12/48] use makefile to run --- .github/workflows/docker.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 72e0c3c..4703df2 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -50,11 +50,8 @@ jobs: apiKey: ${{ secrets.TRACETEST_API_KEY }} - name: Start pokeshop services - uses: isbang/compose-action@v1.5.1 - with: - compose-file: | - docker-compose.yml - docker-compose.stream.yml + run: | + DETACH=true BUILD=false make run/pokeshop - name: Run tracetests run: | tracetest \ From b524e3990a4b05cd86ee92e50b731f7f48619aad Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 24 Oct 2023 15:49:01 -0300 Subject: [PATCH 13/48] use makefile to run --- .github/workflows/docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 4703df2..a114cec 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -51,7 +51,7 @@ jobs: - name: Start pokeshop services run: | - DETACH=true BUILD=false make run/pokeshop + DETACHED=true BUILD=false make run/pokeshop - name: Run tracetests run: | tracetest \ From 52f5f25879a270f395b7482795c3c1ac7cb1dc1a Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 24 Oct 2023 16:16:27 -0300 Subject: [PATCH 14/48] use specific docker compose file --- .github/workflows/docker.yaml | 5 +- docker-compose.agent.yml | 130 ++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+), 2 deletions(-) create mode 100644 docker-compose.agent.yml diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index a114cec..9b45297 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -50,8 +50,9 @@ jobs: apiKey: ${{ secrets.TRACETEST_API_KEY }} - name: Start pokeshop services - run: | - DETACHED=true BUILD=false make run/pokeshop + uses: isbang/compose-action@v1.5.1 + with: + compose-file: docker-compose.agent.yml - name: Run tracetests run: | tracetest \ diff --git a/docker-compose.agent.yml b/docker-compose.agent.yml new file mode 100644 index 0000000..7cf5751 --- /dev/null +++ b/docker-compose.agent.yml @@ -0,0 +1,130 @@ +services: + db: + image: postgres:14 + ports: + - 5434:5432 + environment: + POSTGRES_USER: ashketchum + POSTGRES_PASSWORD: squirtle123 + POSTGRES_DB: pokeshop + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB'] + interval: 1s + timeout: 5s + retries: 60 + + cache: + image: redis:6 + ports: + - 6379:6379 + healthcheck: + test: ['CMD', 'redis-cli', 'ping'] + interval: 1s + timeout: 3s + retries: 60 + + queue: + image: rabbitmq:3.12 + restart: unless-stopped + ports: + - 5672:5672 + - 15672:15672 + healthcheck: + test: rabbitmq-diagnostics -q check_running + interval: 1s + timeout: 5s + retries: 60 + + api: + extra_hosts: + - "host.docker.internal:host-gateway" + environment: + REDIS_URL: cache + DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public + RABBITMQ_HOST: queue + POKE_API_BASE_URL: https://pokeapi.co/api/v2 + COLLECTOR_ENDPOINT: http://host.docker.internal:4317 + ZIPKIN_URL: http://localhost:9411 + healthcheck: + test: ['CMD', 'wget', '--spider', 'localhost:8081/pokemon/healthcheck'] + interval: 1s + timeout: 3s + retries: 60 + ports: + - 8081:8081 + - 8082:8082 + depends_on: + db: + condition: service_healthy + cache: + condition: service_healthy + queue: + condition: service_healthy + + worker: + extra_hosts: + - "host.docker.internal:host-gateway" + environment: + REDIS_URL: cache + DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public + RABBITMQ_HOST: queue + POKE_API_BASE_URL: https://pokeapi.co/api/v2 + COLLECTOR_ENDPOINT: http://host.docker.internal:4317 + ZIPKIN_URL: http://localhost:9411 + NPM_RUN_COMMAND: worker + depends_on: + db: + condition: service_healthy + cache: + condition: service_healthy + queue: + condition: service_healthy + + stream: + image: confluentinc/cp-kafka:latest-ubi8 + ports: + - 29092:29092 + environment: + - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://stream:9092,PLAINTEXT_HOST://127.0.0.1:29092 + - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093,PLAINTEXT_HOST://:29092 + - KAFKA_CONTROLLER_QUORUM_VOTERS=1@0.0.0.0:9093 + - KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER + - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + - KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0 + - KAFKA_PROCESS_ROLES=controller,broker + - KAFKA_NODE_ID=1 + - KAFKA_METADATA_LOG_SEGMENT_MS=15000 + - KAFKA_METADATA_MAX_RETENTION_MS=60000 + - KAFKA_METADATA_LOG_MAX_RECORD_BYTES_BETWEEN_SNAPSHOTS=2800 + - KAFKA_AUTO_CREATE_TOPICS_ENABLE=true + - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 + - KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 + - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m + - CLUSTER_ID=ckjPoprWQzOf0-FuNkGfFQ + healthcheck: + test: nc -z stream 9092 + start_period: 10s + interval: 5s + timeout: 10s + retries: 10 + + streaming-worker: + extra_hosts: + - "host.docker.internal:host-gateway" + environment: + DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public + POKE_API_BASE_URL: https://pokeapi.co/api/v2 + COLLECTOR_ENDPOINT: http://host.docker.internal:4317 + ZIPKIN_URL: http://localhost:9411 + NPM_RUN_COMMAND: stream-worker + KAFKA_BROKER: 'stream:9092' + KAFKA_TOPIC: 'pokemon' + KAFKA_CLIENT_ID: 'streaming-worker' + REDIS_URL: cache + depends_on: + db: + condition: service_healthy + stream: + condition: service_healthy + cache: + condition: service_healthy From 17ed2919aa9d85a87bf2e41313898e8b3f65f57a Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 24 Oct 2023 16:25:12 -0300 Subject: [PATCH 15/48] use makefile to run --- docker-compose.agent.yml | 58 +++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/docker-compose.agent.yml b/docker-compose.agent.yml index 7cf5751..a7a28bf 100644 --- a/docker-compose.agent.yml +++ b/docker-compose.agent.yml @@ -34,8 +34,36 @@ services: interval: 1s timeout: 5s retries: 60 + stream: + image: confluentinc/cp-kafka:latest-ubi8 + ports: + - 29092:29092 + environment: + - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://stream:9092,PLAINTEXT_HOST://127.0.0.1:29092 + - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093,PLAINTEXT_HOST://:29092 + - KAFKA_CONTROLLER_QUORUM_VOTERS=1@0.0.0.0:9093 + - KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER + - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + - KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0 + - KAFKA_PROCESS_ROLES=controller,broker + - KAFKA_NODE_ID=1 + - KAFKA_METADATA_LOG_SEGMENT_MS=15000 + - KAFKA_METADATA_MAX_RETENTION_MS=60000 + - KAFKA_METADATA_LOG_MAX_RECORD_BYTES_BETWEEN_SNAPSHOTS=2800 + - KAFKA_AUTO_CREATE_TOPICS_ENABLE=true + - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 + - KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 + - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m + - CLUSTER_ID=ckjPoprWQzOf0-FuNkGfFQ + healthcheck: + test: nc -z stream 9092 + start_period: 10s + interval: 5s + timeout: 10s + retries: 10 api: + image: kubeshop/demo-pokemon-api:latest extra_hosts: - "host.docker.internal:host-gateway" environment: @@ -62,6 +90,7 @@ services: condition: service_healthy worker: + image: kubeshop/demo-pokemon-api:latest extra_hosts: - "host.docker.internal:host-gateway" environment: @@ -80,35 +109,8 @@ services: queue: condition: service_healthy - stream: - image: confluentinc/cp-kafka:latest-ubi8 - ports: - - 29092:29092 - environment: - - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://stream:9092,PLAINTEXT_HOST://127.0.0.1:29092 - - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093,PLAINTEXT_HOST://:29092 - - KAFKA_CONTROLLER_QUORUM_VOTERS=1@0.0.0.0:9093 - - KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER - - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT - - KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0 - - KAFKA_PROCESS_ROLES=controller,broker - - KAFKA_NODE_ID=1 - - KAFKA_METADATA_LOG_SEGMENT_MS=15000 - - KAFKA_METADATA_MAX_RETENTION_MS=60000 - - KAFKA_METADATA_LOG_MAX_RECORD_BYTES_BETWEEN_SNAPSHOTS=2800 - - KAFKA_AUTO_CREATE_TOPICS_ENABLE=true - - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 - - KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 - - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m - - CLUSTER_ID=ckjPoprWQzOf0-FuNkGfFQ - healthcheck: - test: nc -z stream 9092 - start_period: 10s - interval: 5s - timeout: 10s - retries: 10 - streaming-worker: + image: kubeshop/demo-pokemon-api:latest extra_hosts: - "host.docker.internal:host-gateway" environment: From 23fab532c651b78a5a0d478a6a4b8421f6a44061 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 24 Oct 2023 16:43:48 -0300 Subject: [PATCH 16/48] test --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 73e4a56..67c430f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ EXPOSE 80 ENV NPM_RUN_COMMAND=api -COPY --from=build /build/node_modules ./ +COPY --from=build /build/node_modules ./node_modules COPY --from=build /build/.build/* ./ COPY --from=build /build/migrations/* ./migrations/ COPY --from=build-ui /ui/build ./ui From 369cfdb308cba63fcaf45c01bf8edfe20fdaf761 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 25 Oct 2023 14:41:43 -0300 Subject: [PATCH 17/48] fix tt cmd --- .github/workflows/docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 9b45297..20a2e8e 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -55,7 +55,7 @@ jobs: compose-file: docker-compose.agent.yml - name: Run tracetests run: | - tracetest \ + tracetest run \ --config ./tracetest/config/tracetest-cli.yaml \ --file ./tracetest/teests/testsuite.yaml From b3fda05e2954e6544e4ce8bab3dfe9a8a8a0a45f Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 25 Oct 2023 14:56:22 -0300 Subject: [PATCH 18/48] fix settings --- tracetest/config/tracetest-cloud.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tracetest/config/tracetest-cloud.yaml diff --git a/tracetest/config/tracetest-cloud.yaml b/tracetest/config/tracetest-cloud.yaml new file mode 100644 index 0000000..c57b720 --- /dev/null +++ b/tracetest/config/tracetest-cloud.yaml @@ -0,0 +1,3 @@ +scheme: http +endpoint: app.tracetest.io:11633 +analyticsEnabled: false From 330645844b0919b6d7009fae1bffc10d57fa8c77 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 25 Oct 2023 15:02:44 -0300 Subject: [PATCH 19/48] fix settings --- .github/workflows/docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 20a2e8e..20a8a67 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -56,7 +56,7 @@ jobs: - name: Run tracetests run: | tracetest run \ - --config ./tracetest/config/tracetest-cli.yaml \ + --config ./tracetest/config/tracetest-cloud.yaml \ --file ./tracetest/teests/testsuite.yaml From 53596129f97f53a490256024f3f5e5117e9fe0b2 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 25 Oct 2023 15:14:01 -0300 Subject: [PATCH 20/48] fix settings --- tracetest/config/tracetest-cloud.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracetest/config/tracetest-cloud.yaml b/tracetest/config/tracetest-cloud.yaml index c57b720..8afb11a 100644 --- a/tracetest/config/tracetest-cloud.yaml +++ b/tracetest/config/tracetest-cloud.yaml @@ -1,3 +1,3 @@ -scheme: http +scheme: https endpoint: app.tracetest.io:11633 analyticsEnabled: false From 97e6936352de59c3e99a1a56fe98ac6c9c4fca18 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 25 Oct 2023 15:36:53 -0300 Subject: [PATCH 21/48] fix settings --- tracetest/config/tracetest-cloud.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tracetest/config/tracetest-cloud.yaml b/tracetest/config/tracetest-cloud.yaml index 8afb11a..c7bb14f 100644 --- a/tracetest/config/tracetest-cloud.yaml +++ b/tracetest/config/tracetest-cloud.yaml @@ -1,3 +1,5 @@ scheme: https -endpoint: app.tracetest.io:11633 +endpoint: api.tracetest.io +serverPath: /api +uiEndpoint: https://app.tracetest.io analyticsEnabled: false From 7bb1e76f6d5c6a147e5e48b28db500ec41f2b6e2 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 25 Oct 2023 15:47:51 -0300 Subject: [PATCH 22/48] disable kafka --- docker-compose.agent.yml | 96 ++++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/docker-compose.agent.yml b/docker-compose.agent.yml index a7a28bf..8ce0348 100644 --- a/docker-compose.agent.yml +++ b/docker-compose.agent.yml @@ -34,33 +34,33 @@ services: interval: 1s timeout: 5s retries: 60 - stream: - image: confluentinc/cp-kafka:latest-ubi8 - ports: - - 29092:29092 - environment: - - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://stream:9092,PLAINTEXT_HOST://127.0.0.1:29092 - - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093,PLAINTEXT_HOST://:29092 - - KAFKA_CONTROLLER_QUORUM_VOTERS=1@0.0.0.0:9093 - - KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER - - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT - - KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0 - - KAFKA_PROCESS_ROLES=controller,broker - - KAFKA_NODE_ID=1 - - KAFKA_METADATA_LOG_SEGMENT_MS=15000 - - KAFKA_METADATA_MAX_RETENTION_MS=60000 - - KAFKA_METADATA_LOG_MAX_RECORD_BYTES_BETWEEN_SNAPSHOTS=2800 - - KAFKA_AUTO_CREATE_TOPICS_ENABLE=true - - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 - - KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 - - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m - - CLUSTER_ID=ckjPoprWQzOf0-FuNkGfFQ - healthcheck: - test: nc -z stream 9092 - start_period: 10s - interval: 5s - timeout: 10s - retries: 10 + # stream: + # image: confluentinc/cp-kafka:latest-ubi8 + # ports: + # - 29092:29092 + # environment: + # - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://stream:9092,PLAINTEXT_HOST://127.0.0.1:29092 + # - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093,PLAINTEXT_HOST://:29092 + # - KAFKA_CONTROLLER_QUORUM_VOTERS=1@0.0.0.0:9093 + # - KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER + # - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + # - KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0 + # - KAFKA_PROCESS_ROLES=controller,broker + # - KAFKA_NODE_ID=1 + # - KAFKA_METADATA_LOG_SEGMENT_MS=15000 + # - KAFKA_METADATA_MAX_RETENTION_MS=60000 + # - KAFKA_METADATA_LOG_MAX_RECORD_BYTES_BETWEEN_SNAPSHOTS=2800 + # - KAFKA_AUTO_CREATE_TOPICS_ENABLE=true + # - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 + # - KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 + # - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m + # - CLUSTER_ID=ckjPoprWQzOf0-FuNkGfFQ + # healthcheck: + # test: nc -z stream 9092 + # start_period: 10s + # interval: 5s + # timeout: 10s + # retries: 10 api: image: kubeshop/demo-pokemon-api:latest @@ -109,24 +109,24 @@ services: queue: condition: service_healthy - streaming-worker: - image: kubeshop/demo-pokemon-api:latest - extra_hosts: - - "host.docker.internal:host-gateway" - environment: - DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public - POKE_API_BASE_URL: https://pokeapi.co/api/v2 - COLLECTOR_ENDPOINT: http://host.docker.internal:4317 - ZIPKIN_URL: http://localhost:9411 - NPM_RUN_COMMAND: stream-worker - KAFKA_BROKER: 'stream:9092' - KAFKA_TOPIC: 'pokemon' - KAFKA_CLIENT_ID: 'streaming-worker' - REDIS_URL: cache - depends_on: - db: - condition: service_healthy - stream: - condition: service_healthy - cache: - condition: service_healthy + # streaming-worker: + # image: kubeshop/demo-pokemon-api:latest + # extra_hosts: + # - "host.docker.internal:host-gateway" + # environment: + # DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public + # POKE_API_BASE_URL: https://pokeapi.co/api/v2 + # COLLECTOR_ENDPOINT: http://host.docker.internal:4317 + # ZIPKIN_URL: http://localhost:9411 + # NPM_RUN_COMMAND: stream-worker + # KAFKA_BROKER: 'stream:9092' + # KAFKA_TOPIC: 'pokemon' + # KAFKA_CLIENT_ID: 'streaming-worker' + # REDIS_URL: cache + # depends_on: + # db: + # condition: service_healthy + # stream: + # condition: service_healthy + # cache: + # condition: service_healthy From 8b5730a4308ee1002d8007727f2d7e74667a1186 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 25 Oct 2023 15:55:22 -0300 Subject: [PATCH 23/48] unexport ports --- docker-compose.agent.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docker-compose.agent.yml b/docker-compose.agent.yml index 8ce0348..768b5f1 100644 --- a/docker-compose.agent.yml +++ b/docker-compose.agent.yml @@ -1,8 +1,6 @@ services: db: image: postgres:14 - ports: - - 5434:5432 environment: POSTGRES_USER: ashketchum POSTGRES_PASSWORD: squirtle123 @@ -15,8 +13,6 @@ services: cache: image: redis:6 - ports: - - 6379:6379 healthcheck: test: ['CMD', 'redis-cli', 'ping'] interval: 1s @@ -26,9 +22,6 @@ services: queue: image: rabbitmq:3.12 restart: unless-stopped - ports: - - 5672:5672 - - 15672:15672 healthcheck: test: rabbitmq-diagnostics -q check_running interval: 1s @@ -36,8 +29,6 @@ services: retries: 60 # stream: # image: confluentinc/cp-kafka:latest-ubi8 - # ports: - # - 29092:29092 # environment: # - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://stream:9092,PLAINTEXT_HOST://127.0.0.1:29092 # - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093,PLAINTEXT_HOST://:29092 From 0510492b431fb94ef43d3790b7739cc6ac733922 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 25 Oct 2023 16:13:28 -0300 Subject: [PATCH 24/48] add cli token --- .github/workflows/docker.yaml | 1 + tracetest/config/tracetest-cloud.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 20a8a67..9f1d28a 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -55,6 +55,7 @@ jobs: compose-file: docker-compose.agent.yml - name: Run tracetests run: | + export TRACETEST_TOKEN=${{ secrets.TRACETEST_TOKEN }} tracetest run \ --config ./tracetest/config/tracetest-cloud.yaml \ --file ./tracetest/teests/testsuite.yaml diff --git a/tracetest/config/tracetest-cloud.yaml b/tracetest/config/tracetest-cloud.yaml index c7bb14f..5cdfaa9 100644 --- a/tracetest/config/tracetest-cloud.yaml +++ b/tracetest/config/tracetest-cloud.yaml @@ -3,3 +3,5 @@ endpoint: api.tracetest.io serverPath: /api uiEndpoint: https://app.tracetest.io analyticsEnabled: false +organizationID: ttorg_d93f8634acf22530 +environmentID: ttenv_82d7c803788157a6 From 187e349f93185c83ada6f58f2dd274c69809cca2 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 31 Oct 2023 15:39:09 -0300 Subject: [PATCH 25/48] test --- .github/workflows/docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 9f1d28a..08d2ab3 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -46,7 +46,7 @@ jobs: - name: Setup Tracetest uses: kubeshop/tracetest-agent-action@main with: - version: v0.14.4-rc.1 + version: v0.14.4 apiKey: ${{ secrets.TRACETEST_API_KEY }} - name: Start pokeshop services From 8d1dbfd89e66cc94de2117952025f297e58b1cef Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 31 Oct 2023 17:04:03 -0300 Subject: [PATCH 26/48] test --- tracetest/config/tracetest-cloud.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tracetest/config/tracetest-cloud.yaml b/tracetest/config/tracetest-cloud.yaml index 5cdfaa9..b8659ea 100644 --- a/tracetest/config/tracetest-cloud.yaml +++ b/tracetest/config/tracetest-cloud.yaml @@ -1,7 +1,8 @@ scheme: https endpoint: api.tracetest.io serverPath: /api -uiEndpoint: https://app.tracetest.io -analyticsEnabled: false organizationID: ttorg_d93f8634acf22530 environmentID: ttenv_82d7c803788157a6 +jwt: eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.eyJlbnZpcm9ubWVudF9pZCI6IiIsImV4cCI6MTcyNzI4MjY1NywiaWF0IjoxNjk1NzQ2NjU3LCJqdGkiOiJ0dHRva2VuX2Q5ZGI3MWQ3MDg5YmM2MzkiLCJvcmdhbml6YXRpb25faWQiOiIiLCJ1c2VyX2lkIjoiZTdlZWRlZTYtNzZmOC00OTc1LWI3MmQtOWI2MTFkZGI4N2ZhIn0.KW-arj9XTVD8OeKBvTb9Bv3AhhrVIhgQZTJdRhfYf9GwlsduUaUGrs6C3HEzO2TTpovd827trTr8I9B5LoO6wzfYrQpICXWvSuH7GkQ4wEdmgux6nOC8j2uKYKW5zRgzG8AJVXvjg9uImGe5pk8aWek_N4gRL9H1-rsRPcUSXh3Vqo3x5MdEffNfhTnCkg8ZgvN_YgLg8ZKDLkBAg6G1tR219K8x0-HFPGIcUbI-2uvEs3Vl_QydwCSH5or5U9tsk4MlvJNDMaqmBHdxKAQhkF5NpzkpBppOHcJfKcG3ybH_IXzi7LCg55YjHfBPt9tDGVpZb5GDNnQ0jkDNtcSk4A +agentEndpoint: api.tracetest.io:8091 +uIEndpoint: https://app.tracetest.io/ From 3eeadb209c647870b03bc5a703ceaace96fc8587 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 31 Oct 2023 17:08:25 -0300 Subject: [PATCH 27/48] fix typo --- .github/workflows/docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 08d2ab3..d4d4016 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -58,6 +58,6 @@ jobs: export TRACETEST_TOKEN=${{ secrets.TRACETEST_TOKEN }} tracetest run \ --config ./tracetest/config/tracetest-cloud.yaml \ - --file ./tracetest/teests/testsuite.yaml + --file ./tracetest/tests/testsuite.yaml From fff08c253fa29f12834ba3d0c26d849c8d10f4f0 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 31 Oct 2023 17:34:49 -0300 Subject: [PATCH 28/48] add verbose --- .github/workflows/docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index d4d4016..994e9ee 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -56,7 +56,7 @@ jobs: - name: Run tracetests run: | export TRACETEST_TOKEN=${{ secrets.TRACETEST_TOKEN }} - tracetest run \ + tracetest run -vv \ --config ./tracetest/config/tracetest-cloud.yaml \ --file ./tracetest/tests/testsuite.yaml From f83c8dfa409b42d8b0068da71a3c3124469d6114 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Fri, 3 Nov 2023 09:47:12 -0300 Subject: [PATCH 29/48] --wip-- [skip ci] --- .github/workflows/docker.yaml | 5 +- docker-compose.agent.yml | 96 ++++++++++++++++--------------- tracetest/docker-compose.yml | 8 ++- tracetest/tests/add.yaml | 2 +- tracetest/tests/importqueue.yaml | 2 +- tracetest/tests/importstream.yaml | 4 +- tracetest/tests/list.yaml | 2 +- tracetest/tests/testsuite.yaml | 4 +- tracetest/tests/vars.agent.yaml | 9 +++ tracetest/tests/vars.docker.yaml | 9 +++ 10 files changed, 83 insertions(+), 58 deletions(-) create mode 100644 tracetest/tests/vars.agent.yaml create mode 100644 tracetest/tests/vars.docker.yaml diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 994e9ee..28380c8 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -56,8 +56,9 @@ jobs: - name: Run tracetests run: | export TRACETEST_TOKEN=${{ secrets.TRACETEST_TOKEN }} - tracetest run -vv \ + tracetest run \ --config ./tracetest/config/tracetest-cloud.yaml \ - --file ./tracetest/tests/testsuite.yaml + --file ./tracetest/tests/testsuite.yaml \ + --vars ./tracetest/tests/vars.agent.yaml diff --git a/docker-compose.agent.yml b/docker-compose.agent.yml index 768b5f1..47d5391 100644 --- a/docker-compose.agent.yml +++ b/docker-compose.agent.yml @@ -27,31 +27,35 @@ services: interval: 1s timeout: 5s retries: 60 - # stream: - # image: confluentinc/cp-kafka:latest-ubi8 - # environment: - # - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://stream:9092,PLAINTEXT_HOST://127.0.0.1:29092 - # - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093,PLAINTEXT_HOST://:29092 - # - KAFKA_CONTROLLER_QUORUM_VOTERS=1@0.0.0.0:9093 - # - KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER - # - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT - # - KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0 - # - KAFKA_PROCESS_ROLES=controller,broker - # - KAFKA_NODE_ID=1 - # - KAFKA_METADATA_LOG_SEGMENT_MS=15000 - # - KAFKA_METADATA_MAX_RETENTION_MS=60000 - # - KAFKA_METADATA_LOG_MAX_RECORD_BYTES_BETWEEN_SNAPSHOTS=2800 - # - KAFKA_AUTO_CREATE_TOPICS_ENABLE=true - # - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 - # - KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 - # - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m - # - CLUSTER_ID=ckjPoprWQzOf0-FuNkGfFQ - # healthcheck: - # test: nc -z stream 9092 - # start_period: 10s - # interval: 5s - # timeout: 10s - # retries: 10 + + stream: + image: confluentinc/cp-kafka:latest-ubi8 + ports: + - 29092:29092 + - 9092:9092 + environment: + - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://stream:9092,PLAINTEXT_HOST://127.0.0.1:29092 + - KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093,PLAINTEXT_HOST://:29092 + - KAFKA_CONTROLLER_QUORUM_VOTERS=1@0.0.0.0:9093 + - KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER + - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + - KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0 + - KAFKA_PROCESS_ROLES=controller,broker + - KAFKA_NODE_ID=1 + - KAFKA_METADATA_LOG_SEGMENT_MS=15000 + - KAFKA_METADATA_MAX_RETENTION_MS=60000 + - KAFKA_METADATA_LOG_MAX_RECORD_BYTES_BETWEEN_SNAPSHOTS=2800 + - KAFKA_AUTO_CREATE_TOPICS_ENABLE=true + - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 + - KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 + - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m + - CLUSTER_ID=ckjPoprWQzOf0-FuNkGfFQ + healthcheck: + test: nc -z stream 9092 + start_period: 10s + interval: 5s + timeout: 10s + retries: 10 api: image: kubeshop/demo-pokemon-api:latest @@ -100,24 +104,24 @@ services: queue: condition: service_healthy - # streaming-worker: - # image: kubeshop/demo-pokemon-api:latest - # extra_hosts: - # - "host.docker.internal:host-gateway" - # environment: - # DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public - # POKE_API_BASE_URL: https://pokeapi.co/api/v2 - # COLLECTOR_ENDPOINT: http://host.docker.internal:4317 - # ZIPKIN_URL: http://localhost:9411 - # NPM_RUN_COMMAND: stream-worker - # KAFKA_BROKER: 'stream:9092' - # KAFKA_TOPIC: 'pokemon' - # KAFKA_CLIENT_ID: 'streaming-worker' - # REDIS_URL: cache - # depends_on: - # db: - # condition: service_healthy - # stream: - # condition: service_healthy - # cache: - # condition: service_healthy + streaming-worker: + image: kubeshop/demo-pokemon-api:latest + extra_hosts: + - "host.docker.internal:host-gateway" + environment: + DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public + POKE_API_BASE_URL: https://pokeapi.co/api/v2 + COLLECTOR_ENDPOINT: http://host.docker.internal:4317 + ZIPKIN_URL: http://localhost:9411 + NPM_RUN_COMMAND: stream-worker + KAFKA_BROKER: 'stream:9092' + KAFKA_TOPIC: 'pokemon' + KAFKA_CLIENT_ID: 'streaming-worker' + REDIS_URL: cache + depends_on: + db: + condition: service_healthy + stream: + condition: service_healthy + cache: + condition: service_healthy diff --git a/tracetest/docker-compose.yml b/tracetest/docker-compose.yml index 3a7be0b..7ab33f5 100644 --- a/tracetest/docker-compose.yml +++ b/tracetest/docker-compose.yml @@ -10,19 +10,21 @@ services: - type: bind source: ./tracetest/config/tracetest-cli.yaml target: /app/tracetest-cli.yaml - entrypoint: + entrypoint: - tracetest - command: + command: - run - testsuite - --config - /app/tracetest-cli.yaml - --file - /app/tracebased-tests/testsuite.yaml + - --vars + - /app/tracebased-tests/vars.docker.yaml depends_on: tracetest-server: condition: service_healthy - + tracetest-server: image: kubeshop/tracetest:${TAG:-latest} volumes: diff --git a/tracetest/tests/add.yaml b/tracetest/tests/add.yaml index 6ae7ec1..f4285ee 100644 --- a/tracetest/tests/add.yaml +++ b/tracetest/tests/add.yaml @@ -7,7 +7,7 @@ spec: type: http httpRequest: method: POST - url: http://api:8081/pokemon + url: http://${var:API_HOST}/pokemon body: | { "name": "meowth", diff --git a/tracetest/tests/importqueue.yaml b/tracetest/tests/importqueue.yaml index 6174b81..f3e7dbc 100644 --- a/tracetest/tests/importqueue.yaml +++ b/tracetest/tests/importqueue.yaml @@ -7,7 +7,7 @@ spec: type: http httpRequest: method: POST - url: http://api:8081/pokemon/import + url: http://${var:API_HOST}/pokemon/import body: | { "id": 143 diff --git a/tracetest/tests/importstream.yaml b/tracetest/tests/importstream.yaml index 866dd02..08ff46e 100644 --- a/tracetest/tests/importstream.yaml +++ b/tracetest/tests/importstream.yaml @@ -7,7 +7,7 @@ spec: type: kafka kafka: brokerUrls: - - stream:9092 + - ${env:KAFKA_HOST} topic: pokemon headers: [] messageKey: snorlax-key @@ -20,4 +20,4 @@ spec: - selector: span[tracetest.span.type="general" name="import pokemon"] name: Import Pokemon use case was triggered assertions: - - attr:name = "import pokemon" \ No newline at end of file + - attr:name = "import pokemon" diff --git a/tracetest/tests/list.yaml b/tracetest/tests/list.yaml index c0fc9fe..7397907 100644 --- a/tracetest/tests/list.yaml +++ b/tracetest/tests/list.yaml @@ -7,7 +7,7 @@ spec: type: http httpRequest: method: GET - url: http://api:8081/pokemon?take=20&skip=0 + url: http://${var:API_HOST}/pokemon?take=20&skip=0 headers: - key: Content-Type value: application/json diff --git a/tracetest/tests/testsuite.yaml b/tracetest/tests/testsuite.yaml index d7d660b..8105d4e 100644 --- a/tracetest/tests/testsuite.yaml +++ b/tracetest/tests/testsuite.yaml @@ -1,4 +1,4 @@ -type: Transaction +type: TestSuite spec: id: ILYjqDQ4g name: Running all tests @@ -7,4 +7,4 @@ spec: - ./add.yaml - ./importqueue.yaml - ./importstream.yaml - - ./list.yaml \ No newline at end of file + - ./list.yaml diff --git a/tracetest/tests/vars.agent.yaml b/tracetest/tests/vars.agent.yaml new file mode 100644 index 0000000..d2f2bf7 --- /dev/null +++ b/tracetest/tests/vars.agent.yaml @@ -0,0 +1,9 @@ +type: VariableSet +spec: + id: agent + name: Agent Values + values: + - key: API_HOST + value: localhost:8081 + - key: KAFKA_HOST + value: localhost:9092 diff --git a/tracetest/tests/vars.docker.yaml b/tracetest/tests/vars.docker.yaml new file mode 100644 index 0000000..149505b --- /dev/null +++ b/tracetest/tests/vars.docker.yaml @@ -0,0 +1,9 @@ +type: VariableSet +spec: + id: docker + name: Docker Values + values: + - key: API_HOST + value: api:8081 + - key: KAFKA_HOST + value: stream:9092 From 04ab7934fcec7472c0091c0b4d85f27c5e180832 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 7 Nov 2023 10:22:10 -0300 Subject: [PATCH 30/48] fix kafka port --- tracetest/tests/vars.agent.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracetest/tests/vars.agent.yaml b/tracetest/tests/vars.agent.yaml index d2f2bf7..740a45f 100644 --- a/tracetest/tests/vars.agent.yaml +++ b/tracetest/tests/vars.agent.yaml @@ -6,4 +6,4 @@ spec: - key: API_HOST value: localhost:8081 - key: KAFKA_HOST - value: localhost:9092 + value: localhost:29092 From fa5d0abdda3f6f48890dea2f6aa5a4b86d11f33e Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 7 Nov 2023 10:35:01 -0300 Subject: [PATCH 31/48] run on stage --- .github/workflows/docker.yaml | 3 ++- tracetest/config/tracetest-cloud.yaml | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 28380c8..cdd003b 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -46,8 +46,9 @@ jobs: - name: Setup Tracetest uses: kubeshop/tracetest-agent-action@main with: - version: v0.14.4 + version: v0.14.6-rc.2 apiKey: ${{ secrets.TRACETEST_API_KEY }} + params: -e https://app-stage.tracetest.io - name: Start pokeshop services uses: isbang/compose-action@v1.5.1 diff --git a/tracetest/config/tracetest-cloud.yaml b/tracetest/config/tracetest-cloud.yaml index b8659ea..6073a04 100644 --- a/tracetest/config/tracetest-cloud.yaml +++ b/tracetest/config/tracetest-cloud.yaml @@ -1,8 +1,8 @@ scheme: https -endpoint: api.tracetest.io +endpoint: api-stage.tracetest.io serverPath: /api -organizationID: ttorg_d93f8634acf22530 -environmentID: ttenv_82d7c803788157a6 -jwt: eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.eyJlbnZpcm9ubWVudF9pZCI6IiIsImV4cCI6MTcyNzI4MjY1NywiaWF0IjoxNjk1NzQ2NjU3LCJqdGkiOiJ0dHRva2VuX2Q5ZGI3MWQ3MDg5YmM2MzkiLCJvcmdhbml6YXRpb25faWQiOiIiLCJ1c2VyX2lkIjoiZTdlZWRlZTYtNzZmOC00OTc1LWI3MmQtOWI2MTFkZGI4N2ZhIn0.KW-arj9XTVD8OeKBvTb9Bv3AhhrVIhgQZTJdRhfYf9GwlsduUaUGrs6C3HEzO2TTpovd827trTr8I9B5LoO6wzfYrQpICXWvSuH7GkQ4wEdmgux6nOC8j2uKYKW5zRgzG8AJVXvjg9uImGe5pk8aWek_N4gRL9H1-rsRPcUSXh3Vqo3x5MdEffNfhTnCkg8ZgvN_YgLg8ZKDLkBAg6G1tR219K8x0-HFPGIcUbI-2uvEs3Vl_QydwCSH5or5U9tsk4MlvJNDMaqmBHdxKAQhkF5NpzkpBppOHcJfKcG3ybH_IXzi7LCg55YjHfBPt9tDGVpZb5GDNnQ0jkDNtcSk4A -agentEndpoint: api.tracetest.io:8091 -uIEndpoint: https://app.tracetest.io/ +organizationID: ttorg_cc188ef9fea96fd0 +environmentID: ttenv_68bf9f8d81a18f42 +jwt: eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.eyJlbnZpcm9ubWVudF9pZCI6IiIsImV4cCI6MTcyNzI3NzMzOSwiaWF0IjoxNjk1NzQxMzM5LCJqdGkiOiJ0dHRva2VuX2ZkMDRkMmNkODJiY2JhNGUiLCJvcmdhbml6YXRpb25faWQiOiIiLCJ1c2VyX2lkIjoiMzQxOTk3NTUtYWExZi00ZmI1LTk1ZmItNTBjODZhNTE1MGM0In0.T5NOyd7toz6M4Zze-zuLHSknSrr3KcqRTu7iD_wrRTs1Ay16_bkkhz_eGDpqSjrf6XFg4-Knu6TRtz96ZJ7TZESCDEZu8oDXhl-l4JuY4VyI5n_PZt2gFooiXTMdPX36Z-P5QMq4arveGfIDb2BP0Wy_6k7mex7qqQhqsv8rZ0UO38_rd4hUSUDXNx2QC1pms9dPyMv1szahFbysjtdzCCvvCIEvDvUBNI70kxVdtTZZ6itB_rA74mSInPZW_KZiVS_6z7Xe7ibr7hALGLeMziqIYk4eJikEechaJwcg9fU1JoP0v-aYpVpaXHf8pH82HiREpkphcs92_2Mjo3kZ7g +agentEndpoint: api-stage.tracetest.io:443 +uIEndpoint: https://app-stage.tracetest.io/ From 8239fe0a0a07d7a6619f1ebdacafd0951d9e40fe Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 7 Nov 2023 10:51:10 -0300 Subject: [PATCH 32/48] check for poke api readiness --- .github/workflows/docker.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index cdd003b..64544b2 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -54,6 +54,9 @@ jobs: uses: isbang/compose-action@v1.5.1 with: compose-file: docker-compose.agent.yml + - name: Wait for pokeshop services + run: | + timeout 60 bash -c 'until echo > /dev/tcp/localhost/8081; do sleep 1; done; echo "pokeshop http api ready"' - name: Run tracetests run: | export TRACETEST_TOKEN=${{ secrets.TRACETEST_TOKEN }} From 6987414ca317c89a17e398bce74f7a10a2553a61 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 7 Nov 2023 17:30:33 -0300 Subject: [PATCH 33/48] force update --- .github/workflows/docker.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 64544b2..3690cf4 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -65,4 +65,3 @@ jobs: --file ./tracetest/tests/testsuite.yaml \ --vars ./tracetest/tests/vars.agent.yaml - From e10a68b1519ba289f85dfb9514085f78292dec6f Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 7 Nov 2023 17:46:39 -0300 Subject: [PATCH 34/48] debug docker --- .github/workflows/docker.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 3690cf4..759c013 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -51,9 +51,9 @@ jobs: params: -e https://app-stage.tracetest.io - name: Start pokeshop services - uses: isbang/compose-action@v1.5.1 - with: - compose-file: docker-compose.agent.yml + run: | + docker compos -f docker-compose.agent.yaml up -d \ + || (docker compos -f docker-compose.agent.yaml logs; exit 1) - name: Wait for pokeshop services run: | timeout 60 bash -c 'until echo > /dev/tcp/localhost/8081; do sleep 1; done; echo "pokeshop http api ready"' From 0844d4ac3562907bcafc45b33994975c4f56adf8 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 7 Nov 2023 17:47:59 -0300 Subject: [PATCH 35/48] fix typo --- .github/workflows/docker.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 759c013..cd02ea6 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -52,8 +52,8 @@ jobs: - name: Start pokeshop services run: | - docker compos -f docker-compose.agent.yaml up -d \ - || (docker compos -f docker-compose.agent.yaml logs; exit 1) + docker compose -f docker-compose.agent.yaml up -d \ + || (docker compose -f docker-compose.agent.yaml logs; exit 1) - name: Wait for pokeshop services run: | timeout 60 bash -c 'until echo > /dev/tcp/localhost/8081; do sleep 1; done; echo "pokeshop http api ready"' From fa0ca6ed1289a85def97e4b74541248e1a474ca5 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Tue, 7 Nov 2023 17:49:11 -0300 Subject: [PATCH 36/48] fix typo --- .github/workflows/docker.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index cd02ea6..49eec82 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -52,8 +52,8 @@ jobs: - name: Start pokeshop services run: | - docker compose -f docker-compose.agent.yaml up -d \ - || (docker compose -f docker-compose.agent.yaml logs; exit 1) + docker compose -f docker-compose.agent.yml up -d \ + || (docker compose -f docker-compose.agent.yml logs; exit 1) - name: Wait for pokeshop services run: | timeout 60 bash -c 'until echo > /dev/tcp/localhost/8081; do sleep 1; done; echo "pokeshop http api ready"' From 2e08170499a8311badf6bc8c1bb2e661285f8b09 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 8 Nov 2023 15:45:33 -0300 Subject: [PATCH 37/48] dump log on test fail --- .github/workflows/docker.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 49eec82..539332f 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -61,7 +61,8 @@ jobs: run: | export TRACETEST_TOKEN=${{ secrets.TRACETEST_TOKEN }} tracetest run \ - --config ./tracetest/config/tracetest-cloud.yaml \ - --file ./tracetest/tests/testsuite.yaml \ - --vars ./tracetest/tests/vars.agent.yaml + --config ./tracetest/config/tracetest-cloud.yaml \ + --file ./tracetest/tests/testsuite.yaml \ + --vars ./tracetest/tests/vars.agent.yaml \ + || (docker compose -f docker-compose.agent.yml logs; exit 1) From 7a33bc9685f0896be812707ca21402eeb181b966 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 8 Nov 2023 15:53:21 -0300 Subject: [PATCH 38/48] add delay before tests --- .github/workflows/docker.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 539332f..8e940b7 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -56,7 +56,8 @@ jobs: || (docker compose -f docker-compose.agent.yml logs; exit 1) - name: Wait for pokeshop services run: | - timeout 60 bash -c 'until echo > /dev/tcp/localhost/8081; do sleep 1; done; echo "pokeshop http api ready"' + sleep 15 # it might take some time for docker compose to start up + timeout 60 bash -c 'until nc -z -w 1 localhost '8081' > /dev/null 2>&1; do sleep 1; done; echo "pokeshop http api ready"' - name: Run tracetests run: | export TRACETEST_TOKEN=${{ secrets.TRACETEST_TOKEN }} From 07f0d64fc3018346c6a34972b9ae8a07212d5b56 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 8 Nov 2023 16:04:39 -0300 Subject: [PATCH 39/48] try restarting services to ensure everything is working --- .github/workflows/docker.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 8e940b7..1e1528c 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -57,6 +57,10 @@ jobs: - name: Wait for pokeshop services run: | sleep 15 # it might take some time for docker compose to start up + docker compose -f docker-compose.agent.yml restart queue + sleep 15 + docker compose -f docker-compose.agent.yml restart worker + sleep 15 timeout 60 bash -c 'until nc -z -w 1 localhost '8081' > /dev/null 2>&1; do sleep 1; done; echo "pokeshop http api ready"' - name: Run tracetests run: | From ad5b238b3672ea73aae2ab0374af22fefbf20a32 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 8 Nov 2023 17:19:51 -0300 Subject: [PATCH 40/48] replace rabbitmq --- docker-compose.agent.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/docker-compose.agent.yml b/docker-compose.agent.yml index 47d5391..a0f44bb 100644 --- a/docker-compose.agent.yml +++ b/docker-compose.agent.yml @@ -20,13 +20,10 @@ services: retries: 60 queue: - image: rabbitmq:3.12 + image: cloudamqp/lavinmq:1.2.5 restart: unless-stopped - healthcheck: - test: rabbitmq-diagnostics -q check_running - interval: 1s - timeout: 5s - retries: 60 + ports: + - 15672:15672 stream: image: confluentinc/cp-kafka:latest-ubi8 @@ -64,7 +61,7 @@ services: environment: REDIS_URL: cache DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public - RABBITMQ_HOST: queue + RABBITMQ_HOST: guest:guest@queue POKE_API_BASE_URL: https://pokeapi.co/api/v2 COLLECTOR_ENDPOINT: http://host.docker.internal:4317 ZIPKIN_URL: http://localhost:9411 @@ -91,7 +88,7 @@ services: environment: REDIS_URL: cache DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public - RABBITMQ_HOST: queue + RABBITMQ_HOST: guest:guest@queue POKE_API_BASE_URL: https://pokeapi.co/api/v2 COLLECTOR_ENDPOINT: http://host.docker.internal:4317 ZIPKIN_URL: http://localhost:9411 From 3c0e0c2e78aa4c461b0361ff32e26a0322bb287f Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 8 Nov 2023 17:21:46 -0300 Subject: [PATCH 41/48] remove restarts --- .github/workflows/docker.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 1e1528c..8e940b7 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -57,10 +57,6 @@ jobs: - name: Wait for pokeshop services run: | sleep 15 # it might take some time for docker compose to start up - docker compose -f docker-compose.agent.yml restart queue - sleep 15 - docker compose -f docker-compose.agent.yml restart worker - sleep 15 timeout 60 bash -c 'until nc -z -w 1 localhost '8081' > /dev/null 2>&1; do sleep 1; done; echo "pokeshop http api ready"' - name: Run tracetests run: | From 637bac1f1b54db8c3550e4c22fab8dc1829e4d0a Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 8 Nov 2023 19:02:25 -0300 Subject: [PATCH 42/48] update all dokcer compose --- docker-compose.agent.yml | 2 -- docker-compose.yml | 15 +++++---------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/docker-compose.agent.yml b/docker-compose.agent.yml index a0f44bb..e908ea3 100644 --- a/docker-compose.agent.yml +++ b/docker-compose.agent.yml @@ -22,8 +22,6 @@ services: queue: image: cloudamqp/lavinmq:1.2.5 restart: unless-stopped - ports: - - 15672:15672 stream: image: confluentinc/cp-kafka:latest-ubi8 diff --git a/docker-compose.yml b/docker-compose.yml index f1fb93c..46eabe5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,16 +27,11 @@ services: retries: 60 queue: - image: rabbitmq:3.12 + image: cloudamqp/lavinmq:1.2.5 restart: unless-stopped ports: - 5672:5672 - 15672:15672 - healthcheck: - test: rabbitmq-diagnostics -q check_running - interval: 1s - timeout: 5s - retries: 60 jaeger: image: jaegertracing/all-in-one:latest @@ -78,7 +73,7 @@ services: environment: REDIS_URL: cache DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public - RABBITMQ_HOST: queue + RABBITMQ_HOST: guest:guest@queue POKE_API_BASE_URL: https://pokeapi.co/api/v2 COLLECTOR_ENDPOINT: http://otel-collector:4317 ZIPKIN_URL: http://localhost:9411 @@ -100,13 +95,13 @@ services: condition: service_healthy otel-collector: condition: service_started - + rpc: build: . environment: REDIS_URL: cache DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public - RABBITMQ_HOST: queue + RABBITMQ_HOST: guest:guest@queue POKE_API_BASE_URL: https://pokeapi.co/api/v2 COLLECTOR_ENDPOINT: http://otel-collector:4317 ZIPKIN_URL: http://localhost:9411 @@ -135,7 +130,7 @@ services: environment: REDIS_URL: cache DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public - RABBITMQ_HOST: queue + RABBITMQ_HOST: guest:guest@queue POKE_API_BASE_URL: https://pokeapi.co/api/v2 COLLECTOR_ENDPOINT: http://otel-collector:4317 ZIPKIN_URL: http://localhost:9411 From c77421d74db166bcad4bd2bd416aaba8814fd395 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 8 Nov 2023 19:05:47 -0300 Subject: [PATCH 43/48] add token --- .github/workflows/docker.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 8e940b7..2c8f34e 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -48,6 +48,7 @@ jobs: with: version: v0.14.6-rc.2 apiKey: ${{ secrets.TRACETEST_API_KEY }} + token: ${{ secrets.TRACETEST_TOKEN}} params: -e https://app-stage.tracetest.io - name: Start pokeshop services From 0050a5c015b91ae7218bc66dc0390ca9be2ff64f Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 8 Nov 2023 19:07:15 -0300 Subject: [PATCH 44/48] update tt version --- .github/workflows/docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 2c8f34e..31af1d4 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -46,7 +46,7 @@ jobs: - name: Setup Tracetest uses: kubeshop/tracetest-agent-action@main with: - version: v0.14.6-rc.2 + version: v0.14.6 apiKey: ${{ secrets.TRACETEST_API_KEY }} token: ${{ secrets.TRACETEST_TOKEN}} params: -e https://app-stage.tracetest.io From b1a9aae924a527e88d130025a113856200751ef9 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 8 Nov 2023 19:13:51 -0300 Subject: [PATCH 45/48] use prod --- .github/workflows/docker.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 31af1d4..3c47029 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -46,10 +46,8 @@ jobs: - name: Setup Tracetest uses: kubeshop/tracetest-agent-action@main with: - version: v0.14.6 apiKey: ${{ secrets.TRACETEST_API_KEY }} token: ${{ secrets.TRACETEST_TOKEN}} - params: -e https://app-stage.tracetest.io - name: Start pokeshop services run: | From 3d08f185edb8465bfd7dfdb22fd41b2e2ee9fa98 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 8 Nov 2023 19:16:38 -0300 Subject: [PATCH 46/48] remove line --- .github/workflows/docker.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 3c47029..6168ae9 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -59,7 +59,6 @@ jobs: timeout 60 bash -c 'until nc -z -w 1 localhost '8081' > /dev/null 2>&1; do sleep 1; done; echo "pokeshop http api ready"' - name: Run tracetests run: | - export TRACETEST_TOKEN=${{ secrets.TRACETEST_TOKEN }} tracetest run \ --config ./tracetest/config/tracetest-cloud.yaml \ --file ./tracetest/tests/testsuite.yaml \ From d65214ec12e8f0f7e74fae6535d387f7d2e44ec9 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 8 Nov 2023 19:17:29 -0300 Subject: [PATCH 47/48] remove cloudconfig --- .github/workflows/docker.yaml | 1 - tracetest/config/tracetest-cloud.yaml | 8 -------- 2 files changed, 9 deletions(-) delete mode 100644 tracetest/config/tracetest-cloud.yaml diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 6168ae9..d7e8f5c 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -60,7 +60,6 @@ jobs: - name: Run tracetests run: | tracetest run \ - --config ./tracetest/config/tracetest-cloud.yaml \ --file ./tracetest/tests/testsuite.yaml \ --vars ./tracetest/tests/vars.agent.yaml \ || (docker compose -f docker-compose.agent.yml logs; exit 1) diff --git a/tracetest/config/tracetest-cloud.yaml b/tracetest/config/tracetest-cloud.yaml deleted file mode 100644 index 6073a04..0000000 --- a/tracetest/config/tracetest-cloud.yaml +++ /dev/null @@ -1,8 +0,0 @@ -scheme: https -endpoint: api-stage.tracetest.io -serverPath: /api -organizationID: ttorg_cc188ef9fea96fd0 -environmentID: ttenv_68bf9f8d81a18f42 -jwt: eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.eyJlbnZpcm9ubWVudF9pZCI6IiIsImV4cCI6MTcyNzI3NzMzOSwiaWF0IjoxNjk1NzQxMzM5LCJqdGkiOiJ0dHRva2VuX2ZkMDRkMmNkODJiY2JhNGUiLCJvcmdhbml6YXRpb25faWQiOiIiLCJ1c2VyX2lkIjoiMzQxOTk3NTUtYWExZi00ZmI1LTk1ZmItNTBjODZhNTE1MGM0In0.T5NOyd7toz6M4Zze-zuLHSknSrr3KcqRTu7iD_wrRTs1Ay16_bkkhz_eGDpqSjrf6XFg4-Knu6TRtz96ZJ7TZESCDEZu8oDXhl-l4JuY4VyI5n_PZt2gFooiXTMdPX36Z-P5QMq4arveGfIDb2BP0Wy_6k7mex7qqQhqsv8rZ0UO38_rd4hUSUDXNx2QC1pms9dPyMv1szahFbysjtdzCCvvCIEvDvUBNI70kxVdtTZZ6itB_rA74mSInPZW_KZiVS_6z7Xe7ibr7hALGLeMziqIYk4eJikEechaJwcg9fU1JoP0v-aYpVpaXHf8pH82HiREpkphcs92_2Mjo3kZ7g -agentEndpoint: api-stage.tracetest.io:443 -uIEndpoint: https://app-stage.tracetest.io/ From 5672c58786ba6274e4ff19a117ad9545f9714b23 Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 8 Nov 2023 19:42:02 -0300 Subject: [PATCH 48/48] pin action to v1 --- .github/workflows/docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index d7e8f5c..66d9401 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -44,7 +44,7 @@ jobs: uses: actions/checkout@v3 - name: Setup Tracetest - uses: kubeshop/tracetest-agent-action@main + uses: kubeshop/tracetest-agent-action@v1 with: apiKey: ${{ secrets.TRACETEST_API_KEY }} token: ${{ secrets.TRACETEST_TOKEN}}