Skip to content
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

update: added google-cloud-storage v2.18.2 support #594

Merged
merged 3 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ commands:

run-tests-with-coverage-report:
parameters:
googlecloud:
default: ""
type: string
cassandra:
default: ""
type: string
Expand All @@ -57,6 +60,7 @@ commands:
CASSANDRA_TEST: "<<parameters.cassandra>>"
COUCHBASE_TEST: "<<parameters.couchbase>>"
GEVENT_STARLETTE_TEST: "<<parameters.gevent>>"
GOOGLE_CLOUD_TEST: "<<parameters.googlecloud>>"
command: |
. venv/bin/activate
coverage run --source=instana -m pytest -v --junitxml=test-results <<parameters.tests>>
Expand Down Expand Up @@ -210,6 +214,21 @@ jobs:
- store-pytest-results
- store-coverage-report

py311googlecloud:
docker:
- image: cimg/python:3.11.4
- image: vanmoof/pubsub-emulator
working_directory: ~/repo
steps:
- checkout
- pip-install-deps:
requirements: "tests/requirements-googlecloud.txt"
- run-tests-with-coverage-report:
googlecloud: "true"
tests: "tests/clients/test_google-cloud-*.py"
- store-pytest-results
- store-coverage-report

python312:
docker:
- image: cimg/python:3.12.0
Expand All @@ -235,6 +254,21 @@ jobs:
- store-pytest-results
- store-coverage-report

py312googlecloud:
docker:
- image: cimg/python:3.12.0
- image: vanmoof/pubsub-emulator
working_directory: ~/repo
steps:
- checkout
- pip-install-deps:
requirements: "tests/requirements-googlecloud.txt"
- run-tests-with-coverage-report:
googlecloud: "true"
tests: "tests/clients/test_google-cloud-*.py"
- store-pytest-results
- store-coverage-report

python313:
docker:
- image: python:3.13.0rc1-bookworm
Expand Down Expand Up @@ -332,6 +366,8 @@ workflows:
- py39cassandra
- py39couchbase
- py39gevent_starlette
- py311googlecloud
- py312googlecloud
- final_job:
requires:
- python38
Expand All @@ -343,3 +379,5 @@ workflows:
- py39cassandra
- py39couchbase
- py39gevent_starlette
- py311googlecloud
- py312googlecloud
1 change: 1 addition & 0 deletions .tekton/github-pr-pipeline.yaml.part
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ spec:
- unittest-cassandra
- unittest-couchbase
- unittest-gevent-starlette
- unittest-googlecloud
taskRef:
kind: Task
name: github-set-status
Expand Down
16 changes: 16 additions & 0 deletions .tekton/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,19 @@ spec:
workspaces:
- name: task-pvc
workspace: python-tracer-ci-pipeline-pvc
- name: unittest-googlecloud
runAfter:
- clone
matrix:
params:
- name: imageDigest
value:
# 3.11.9-bookworm
- "sha256:0c2928128a96e544a1ee248e50ee8ecbe840bf48ef5a49065812e3d06b6e1bcc"
# 3.12.4-bookworm
- "sha256:83f5f8714b6881d3e0e91023d9fe9e43aa6ad5a04e9f9a94ee180b18b021c72a"
taskRef:
name: python-tracer-unittest-googlecloud-task
workspaces:
- name: task-pvc
workspace: python-tracer-ci-pipeline-pvc
6 changes: 5 additions & 1 deletion .tekton/run_unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ gevent_starlette)
export REQUIREMENTS='requirements-gevent-starlette.txt'
export TESTS=('tests/frameworks/test_gevent.py' 'tests/frameworks/test_starlette.py')
export GEVENT_STARLETTE_TEST='true' ;;
googlecloud)
export REQUIREMENTS='requirements-googlecloud.txt'
export TESTS=('tests/clients/test_google-cloud-storage.py' 'tests/clients/test_google-cloud-pubsub.py')
export GOOGLE_CLOUD_TEST='true' ;;
*)
echo "ERROR \$TEST_CONFIGURATION='${TEST_CONFIGURATION}' is unsupported " \
"not in (default|cassandra|couchbase|gevent_starlette)" >&2
"not in (default|cassandra|couchbase|gevent_starlette|googlecloud)" >&2
exit 3 ;;
esac

Expand Down
30 changes: 29 additions & 1 deletion .tekton/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,40 @@ spec:
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: python-tracer-unittest-default-task
name: python-tracer-unittest-googlecloud-task
spec:
sidecars:
- name: google-cloud-pubsub
# vanmoof/pubsub-emulator:latest
image: vanmoof/pubsub-emulator@sha256:ff71206d65589b58a8b6928c35349a58dbfd7f20eb2dc7822e0f32e5c40791c8
env:
- name: PUBSUB_EMULATOR_HOST
value: 0.0.0.0:8085
ports:
- containerPort: 8085
hostPort: 8085
params:
- name: imageDigest
type: string
workspaces:
- name: task-pvc
mountPath: /workspace
steps:
- name: unittest
image: python@$(params.imageDigest)
env:
- name: TEST_CONFIGURATION
value: googlecloud
workingDir: /workspace/python-sensor/
command:
- /workspace/python-sensor/.tekton/run_unittests.sh
---
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: python-tracer-unittest-default-task
spec:
sidecars:
- name: mariadb
# mariadb:11.3.2
image: mariadb@sha256:851f05fe1e4cb290442c1b12b7108436a33fd8f6a733d4989950322d06d45c65
Expand Down
Loading
Loading