Skip to content

Commit

Permalink
Merge branch 'main' into fix_pubsub
Browse files Browse the repository at this point in the history
  • Loading branch information
pvital authored Nov 22, 2024
2 parents 6357e83 + 8721c8d commit ba82ded
Show file tree
Hide file tree
Showing 20 changed files with 613 additions and 780 deletions.
148 changes: 65 additions & 83 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,11 @@ commands:
pip install -r requirements.txt
pip install -r <<parameters.requirements>>
install-couchbase-deps:
steps:
- run:
name: Install Couchbase Dependencies
# Even if we use focal, we need to add the bionic repo
# See: https://forums.couchbase.com/
# t/installing-libcouchbase-dev-on-ubuntu-20-focal-fossa/25955/3
command: |
sudo apt update
sudo wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
echo "deb http://packages.couchbase.com/ubuntu bionic bionic/main" | sudo tee /etc/apt/sources.list.d/couchbase.list
sudo apt update
sudo apt install libcouchbase-dev -y
run-tests-with-coverage-report:
parameters:
cassandra:
default: ""
type: string
couchbase:
default: ""
type: string
gevent:
default: ""
type: string
Expand All @@ -54,7 +37,6 @@ commands:
name: Run Tests With Coverage Report
environment:
CASSANDRA_TEST: "<<parameters.cassandra>>"
COUCHBASE_TEST: "<<parameters.couchbase>>"
GEVENT_STARLETTE_TEST: "<<parameters.gevent>>"
command: |
. venv/bin/activate
Expand Down Expand Up @@ -114,20 +96,23 @@ commands:
jobs:
python38:
docker:
- image: cimg/python:3.8
- image: cimg/postgres:14.12
- image: public.ecr.aws/docker/library/python:3.8
- image: public.ecr.aws/docker/library/postgres:16.2-bookworm
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
POSTGRES_DB: instana_test_db
- image: cimg/mariadb:10.11.2
- image: public.ecr.aws/docker/library/mariadb:11.3.2
environment:
MYSQL_ROOT_PASSWORD: passw0rd
MYSQL_DATABASE: instana_test_db
- image: cimg/redis:5.0.14
- image: rabbitmq:3.9.13
- image: mongo:4.2.3
- image: vanmoof/pubsub-emulator
- image: public.ecr.aws/docker/library/redis:7.2.4-bookworm
- image: public.ecr.aws/docker/library/rabbitmq:3.13.0
- image: public.ecr.aws/docker/library/mongo:7.0.6
- image: quay.io/thekevjames/gcloud-pubsub-emulator:latest
environment:
PUBSUB_EMULATOR_HOST: 0.0.0.0:8681
PUBSUB_PROJECT1: test-project,test-topic
working_directory: ~/repo
steps:
- checkout
Expand All @@ -138,20 +123,23 @@ jobs:

python39:
docker:
- image: cimg/python:3.9
- image: cimg/postgres:14.12
- image: public.ecr.aws/docker/library/python:3.9
- image: public.ecr.aws/docker/library/postgres:16.2-bookworm
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
POSTGRES_DB: instana_test_db
- image: cimg/mariadb:10.11.2
- image: public.ecr.aws/docker/library/mariadb:11.3.2
environment:
MYSQL_ROOT_PASSWORD: passw0rd
MYSQL_DATABASE: instana_test_db
- image: cimg/redis:5.0.14
- image: rabbitmq:3.9.13
- image: mongo:4.2.3
- image: vanmoof/pubsub-emulator
- image: public.ecr.aws/docker/library/redis:7.2.4-bookworm
- image: public.ecr.aws/docker/library/rabbitmq:3.13.0
- image: public.ecr.aws/docker/library/mongo:7.0.6
- image: quay.io/thekevjames/gcloud-pubsub-emulator:latest
environment:
PUBSUB_EMULATOR_HOST: 0.0.0.0:8681
PUBSUB_PROJECT1: test-project,test-topic
working_directory: ~/repo
steps:
- checkout
Expand All @@ -162,20 +150,23 @@ jobs:

python310:
docker:
- image: cimg/python:3.10
- image: cimg/postgres:14.12
- image: public.ecr.aws/docker/library/python:3.10
- image: public.ecr.aws/docker/library/postgres:16.2-bookworm
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
POSTGRES_DB: instana_test_db
- image: cimg/mariadb:10.11.2
- image: public.ecr.aws/docker/library/mariadb:11.3.2
environment:
MYSQL_ROOT_PASSWORD: passw0rd
MYSQL_DATABASE: instana_test_db
- image: cimg/redis:5.0.14
- image: rabbitmq:3.9.13
- image: mongo:4.2.3
- image: vanmoof/pubsub-emulator
- image: public.ecr.aws/docker/library/redis:7.2.4-bookworm
- image: public.ecr.aws/docker/library/rabbitmq:3.13.0
- image: public.ecr.aws/docker/library/mongo:7.0.6
- image: quay.io/thekevjames/gcloud-pubsub-emulator:latest
environment:
PUBSUB_EMULATOR_HOST: 0.0.0.0:8681
PUBSUB_PROJECT1: test-project,test-topic
working_directory: ~/repo
steps:
- checkout
Expand All @@ -187,20 +178,23 @@ jobs:

python311:
docker:
- image: cimg/python:3.11
- image: cimg/postgres:14.12
- image: public.ecr.aws/docker/library/python:3.11
- image: public.ecr.aws/docker/library/postgres:16.2-bookworm
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
POSTGRES_DB: instana_test_db
- image: cimg/mariadb:10.11.2
- image: public.ecr.aws/docker/library/mariadb:11.3.2
environment:
MYSQL_ROOT_PASSWORD: passw0rd
MYSQL_DATABASE: instana_test_db
- image: cimg/redis:5.0.14
- image: rabbitmq:3.9.13
- image: mongo:4.2.3
- image: vanmoof/pubsub-emulator
- image: public.ecr.aws/docker/library/redis:7.2.4-bookworm
- image: public.ecr.aws/docker/library/rabbitmq:3.13.0
- image: public.ecr.aws/docker/library/mongo:7.0.6
- image: quay.io/thekevjames/gcloud-pubsub-emulator:latest
environment:
PUBSUB_EMULATOR_HOST: 0.0.0.0:8681
PUBSUB_PROJECT1: test-project,test-topic
working_directory: ~/repo
steps:
- checkout
Expand All @@ -212,20 +206,23 @@ jobs:

python312:
docker:
- image: cimg/python:3.12
- image: cimg/postgres:14.12
- image: public.ecr.aws/docker/library/python:3.12
- image: public.ecr.aws/docker/library/postgres:16.2-bookworm
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
POSTGRES_DB: instana_test_db
- image: cimg/mariadb:10.11.2
- image: public.ecr.aws/docker/library/mariadb:11.3.2
environment:
MYSQL_ROOT_PASSWORD: passw0rd
MYSQL_DATABASE: instana_test_db
- image: cimg/redis:5.0.14
- image: rabbitmq:3.9.13
- image: mongo:4.2.3
- image: vanmoof/pubsub-emulator
- image: public.ecr.aws/docker/library/redis:7.2.4-bookworm
- image: public.ecr.aws/docker/library/rabbitmq:3.13.0
- image: public.ecr.aws/docker/library/mongo:7.0.6
- image: quay.io/thekevjames/gcloud-pubsub-emulator:latest
environment:
PUBSUB_EMULATOR_HOST: 0.0.0.0:8681
PUBSUB_PROJECT1: test-project,test-topic
working_directory: ~/repo
steps:
- checkout
Expand All @@ -237,7 +234,7 @@ jobs:

py312aws:
docker:
- image: cimg/python:3.12
- image: public.ecr.aws/docker/library/python:3.12
working_directory: ~/repo
steps:
- checkout
Expand All @@ -250,20 +247,23 @@ jobs:

python313:
docker:
- image: cimg/python:3.13
- image: cimg/postgres:14.12
- image: public.ecr.aws/docker/library/python:3.13
- image: public.ecr.aws/docker/library/postgres:16.2-bookworm
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
POSTGRES_DB: instana_test_db
- image: cimg/mariadb:10.11.2
- image: public.ecr.aws/docker/library/mariadb:11.3.2
environment:
MYSQL_ROOT_PASSWORD: passw0rd
MYSQL_DATABASE: instana_test_db
- image: cimg/redis:5.0.14
- image: rabbitmq:3.9.13
- image: mongo:4.2.3
- image: vanmoof/pubsub-emulator
- image: public.ecr.aws/docker/library/redis:7.2.4-bookworm
- image: public.ecr.aws/docker/library/rabbitmq:3.13.0
- image: public.ecr.aws/docker/library/mongo:7.0.6
- image: quay.io/thekevjames/gcloud-pubsub-emulator:latest
environment:
PUBSUB_EMULATOR_HOST: 0.0.0.0:8681
PUBSUB_PROJECT1: test-project,test-topic
working_directory: ~/repo
steps:
- checkout
Expand All @@ -273,26 +273,10 @@ jobs:
- store-pytest-results
- store-coverage-report

py39couchbase:
docker:
- image: cimg/python:3.9
- image: couchbase/server-sandbox:5.5.0
working_directory: ~/repo
steps:
- checkout
- install-couchbase-deps
- pip-install-deps:
requirements: "tests/requirements-couchbase.txt"
- run-tests-with-coverage-report:
couchbase: "true"
tests: "tests/clients/test_couchbase.py"
- store-pytest-results
- store-coverage-report

py39cassandra:
docker:
- image: cimg/python:3.9
- image: cassandra:3.11
- image: public.ecr.aws/docker/library/python:3.9
- image: public.ecr.aws/docker/library/cassandra:3.11.16-jammy
environment:
MAX_HEAP_SIZE: 2048m
HEAP_NEWSIZE: 512m
Expand All @@ -309,7 +293,7 @@ jobs:

final_job:
docker:
- image: cimg/python:3.8.20
- image: public.ecr.aws/docker/library/python:3.9
working_directory: ~/repo
steps:
- checkout
Expand All @@ -320,7 +304,7 @@ jobs:

py39gevent_starlette:
docker:
- image: cimg/python:3.9.20
- image: public.ecr.aws/docker/library/python:3.9.20
working_directory: ~/repo
steps:
- checkout
Expand All @@ -345,7 +329,6 @@ workflows:
- python312
- python313
- py39cassandra
- py39couchbase
- py39gevent_starlette
- py312aws
- final_job:
Expand All @@ -357,6 +340,5 @@ workflows:
- python312
- python313
- py39cassandra
- py39couchbase
- py39gevent_starlette
- py312aws
4 changes: 2 additions & 2 deletions .tekton/.currency/currency-scheduled-eventlistener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ spec:
spec:
containers:
- name: http-request-to-el-svc
# curlimages/curl:8.6.0
image: curlimages/curl@sha256:f2237028bed58de91f62aea74260bb2a299cf12fbcabc23cfaf125fef276c884
# quay.io/curl/curl:8.11.0
image: quay.io/curl/curl@sha256:b90c4281fe1a4c6cc2b6a665c531d448bba078d75ffa98187e7d7e530fca5209
imagePullPolicy: IfNotPresent
args: ["curl", "-X", "POST", "--data", "{}", "el-python-currency-cron-listener.default.svc.cluster.local:8080"]
restartPolicy: OnFailure
Expand Down
17 changes: 11 additions & 6 deletions .tekton/.currency/currency-tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ spec:
mountPath: /workspace
steps:
- name: clone-repo
# alpine/git:2.43.0
image: alpine/git@sha256:6ff4de047dcc8f0c7d75d2efff63fbc189e87d2f458305f2cc8f165ff83309cf
# public.ecr.aws/docker/library/alpine:3.20.3
image: public.ecr.aws/docker/library/alpine@sha256:029a752048e32e843bd6defe3841186fb8d19a28dae8ec287f433bb9d6d1ad85
script: |
#!/bin/sh
echo "Installing git"
apk fix && apk --no-cache --update add git gpg less openssh patch
echo "Cloning repo"
cd /workspace && git clone --filter=blob:none --sparse --depth 1 https://github.com/instana/python-sensor -b $(params.revision)
cd python-sensor
Expand All @@ -31,8 +33,8 @@ spec:
mountPath: /workspace
steps:
- name: generate-currency-report
# 3.10.15-bookworm
image: python@sha256:b346d9d55e40cd6079db55370581b3bd24067acf5f1acc386107ec0843102ec9
# public.ecr.aws/docker/library/python:3.10.15-bookworm
image: public.ecr.aws/docker/library/python@sha256:2eb72484c25c39aba019b0ab5679c2436833a0b705e955ed8e13c06ee900dd63
script: |
#!/usr/bin/env bash
cd /workspace/python-sensor/.tekton/.currency
Expand Down Expand Up @@ -61,8 +63,8 @@ spec:
mountPath: /workspace
steps:
- name: upload-currency-report
# alpine/git:2.43.0
image: alpine/git@sha256:6ff4de047dcc8f0c7d75d2efff63fbc189e87d2f458305f2cc8f165ff83309cf
# public.ecr.aws/docker/library/alpine:3.20.3
image: public.ecr.aws/docker/library/alpine@sha256:029a752048e32e843bd6defe3841186fb8d19a28dae8ec287f433bb9d6d1ad85
env:
- name: GH_ENTERPRISE_TOKEN
valueFrom:
Expand All @@ -71,7 +73,10 @@ spec:
key: "GH_ENTERPRISE_TOKEN"
script: |
#!/bin/sh
echo "Installing git"
apk fix && apk --no-cache --update add git gpg less openssh patch
echo "Cloning repo"
cd /workspace
git clone https://oauth2:$GH_ENTERPRISE_TOKEN@github.ibm.com/instana/tracer-reports.git
Expand Down
1 change: 0 additions & 1 deletion .tekton/github-pr-pipeline.yaml.part
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ spec:
- github-set-check-status-to-pending
- unittest-default
- unittest-cassandra
- unittest-couchbase
- unittest-gevent-starlette
taskRef:
kind: Task
Expand Down
4 changes: 2 additions & 2 deletions .tekton/github-set-status-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ spec:
secretName: githubtoken
steps:
- name: set-status
# curlimages/curl:8.6.0
image: curlimages/curl@sha256:f2237028bed58de91f62aea74260bb2a299cf12fbcabc23cfaf125fef276c884
# quay.io/curl/curl:8.11.0
image: quay.io/curl/curl@sha256:b90c4281fe1a4c6cc2b6a665c531d448bba078d75ffa98187e7d7e530fca5209
env:
- name: SHA
value: $(params.SHA)
Expand Down
Loading

0 comments on commit ba82ded

Please sign in to comment.