Skip to content

Commit

Permalink
ci: Remove Couchbase from CI Pipeline.
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
  • Loading branch information
pvital committed Nov 19, 2024
1 parent b8b7158 commit 9226f3a
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 106 deletions.
36 changes: 0 additions & 36 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 @@ -273,22 +255,6 @@ 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
Expand Down Expand Up @@ -345,7 +311,6 @@ workflows:
- python312
- python313
- py39cassandra
- py39couchbase
- py39gevent_starlette
- py312aws
- final_job:
Expand All @@ -357,6 +322,5 @@ workflows:
- python312
- python313
- py39cassandra
- py39couchbase
- py39gevent_starlette
- py312aws
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
14 changes: 0 additions & 14 deletions .tekton/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,6 @@ spec:
workspaces:
- name: task-pvc
workspace: python-tracer-ci-pipeline-pvc
- name: unittest-couchbase
runAfter:
- clone
matrix:
params:
- name: imageDigest
value:
# 3.9.20-bookworm
- "sha256:dbb0be5b67aa84b9e3e4f325c7844ab439f40a5cca717c5b24e671cfb41dbb46"
taskRef:
name: python-tracer-unittest-couchbase-task
workspaces:
- name: task-pvc
workspace: python-tracer-ci-pipeline-pvc
- name: unittest-gevent-starlette
runAfter:
- clone
Expand Down
4 changes: 0 additions & 4 deletions .tekton/python-tracer-prepuller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ spec:
# rabbitmq:3.13.0
image: rabbitmq@sha256:27819d7be883b8aea04b9a244460181ef97427a98f8323b39402d65e6eb2ce6f
command: ["sh", "-c", "'true'"]
- name: prepuller-couchbase
# couchbase/server-sandbox:5.5.1
image: couchbase/server-sandbox@sha256:d04302ea7782a0f53c3f371971138b339097d5e41f4154def5bdecc5bbb2e1da
command: ["sh", "-c", "'true'"]
- name: prepuller-redis
# redis:7.2.4-bookworm
image: redis@sha256:fe98b2d39d462d06a7360e2860dd6ceff930745e3731eccb3c1406dd0dd7f744
Expand Down
19 changes: 2 additions & 17 deletions .tekton/run_unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ cassandra)
export REQUIREMENTS='requirements-cassandra.txt'
export TESTS=('tests/clients/test_cassandra-driver.py')
export CASSANDRA_TEST='true' ;;
couchbase)
export REQUIREMENTS='requirements-couchbase.txt'
export TESTS=('tests/clients/test_couchbase.py')
export COUCHBASE_TEST='true' ;;
gevent_starlette)
export REQUIREMENTS='requirements-gevent-starlette.txt'
# TODO: uncomment once gevent instrumentation is done
Expand All @@ -38,29 +34,18 @@ aws)
export TESTS=('tests_aws') ;;
*)
echo "ERROR \$TEST_CONFIGURATION='${TEST_CONFIGURATION}' is unsupported " \
"not in (default|cassandra|couchbase|gevent_starlette)" >&2
"not in (default|cassandra|gevent_starlette)" >&2
exit 3 ;;
esac

echo -n "Configuration is '${TEST_CONFIGURATION}' on ${PYTHON_VERSION} "
echo "with dependencies in '${REQUIREMENTS}'"
ls -lah .
if [[ -n "${COUCHBASE_TEST}" ]]; then
echo "Install Couchbase Dependencies"
# Even if we use bookworm for running this, we need to add the bionic repo
# See: https://forums.couchbase.com/
# t/installing-libcouchbase-dev-on-ubuntu-20-focal-fossa/25955/3
wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | apt-key add -
echo "deb http://packages.couchbase.com/ubuntu bionic bionic/main" \
> /etc/apt/sources.list.d/couchbase.list
apt update
apt install libcouchbase-dev -y
fi

python -m venv /tmp/venv
# shellcheck disable=SC1091
source /tmp/venv/bin/activate
pip install --upgrade pip "$([[ -n ${COUCHBASE_TEST} ]] && echo wheel || echo pip)"
pip install --upgrade pip
pip install -e .
pip install -r "tests/${REQUIREMENTS}"

Expand Down
34 changes: 0 additions & 34 deletions .tekton/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,40 +59,6 @@ spec:
---
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: python-tracer-unittest-couchbase-task
spec:
sidecars:
- name: couchbase
# couchbase/server-sandbox:5.5.1
image: couchbase/server-sandbox@sha256:d04302ea7782a0f53c3f371971138b339097d5e41f4154def5bdecc5bbb2e1da
readinessProbe:
httpGet:
path: /ui/index.html
port: 8091
# This Couchbase image recommends 60sec waiting for initial configuration
# Starting the tests too soon may result in
# "Error during initial configuration - aborting container"
# apparently because "vbucket map not available yet"
initialDelaySeconds: 60
params:
- name: imageDigest
type: string
workspaces:
- name: task-pvc
mountPath: /workspace
steps:
- name: unittest
image: python@$(params.imageDigest)
env:
- name: TEST_CONFIGURATION
value: couchbase
workingDir: /workspace/python-sensor/
command:
- /workspace/python-sensor/.tekton/run_unittests.sh
---
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: python-tracer-unittest-gevent-starlette-task
spec:
Expand Down

0 comments on commit 9226f3a

Please sign in to comment.