Skip to content

Commit

Permalink
Add Python 3.12 support (#849)
Browse files Browse the repository at this point in the history
* Add Python 3.12 support

* Add tmate after failure

* Revert to using 16 vnodes

* Bump upload-artifact action

* Fix ITs - dynamically parse mgmt api version

* Symlink mgmtapi server jar too
  • Loading branch information
rzvoncek authored Feb 17, 2025
1 parent 178f981 commit 1bab9ef
Show file tree
Hide file tree
Showing 6 changed files with 325 additions and 283 deletions.
39 changes: 25 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ jobs:
build:
strategy:
matrix:
python-version: [3.9, "3.10", "3.11"]
python-version: [3.9, "3.10", "3.11", "3.12"]
include:
- python-version: 3.9
tox-py: py39
- python-version: "3.10"
tox-py: py310
- python-version: "3.11"
tox-py: py311
- python-version: "3.12"
tox-py: py312
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -99,7 +101,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9, "3.10", "3.11"]
python-version: [3.9, "3.10", "3.11", "3.12"]
it-backend: [local, s3, gcs, minio, azure, azure-hierarchical]
# IBM not included by default due to lite plan quota being easily exceeded
#it-backend: [local, s3, gcs, minio, ibm, azure]
Expand Down Expand Up @@ -185,7 +187,7 @@ jobs:
run: |
poetry install
sudo apt-get remove azure-cli || true
pip install ccm
poetry run pip install git+https://github.com/riptano/ccm.git
- name: Check if integration tests can run
env:
Expand Down Expand Up @@ -221,26 +223,30 @@ jobs:
# Write GCS service account credentials to a file
mkdir ~/.aws
# This fake cluster needs to be created first so that the integration tests pass in GH actions. Don't ask me why...
ccm create test_cluster -v binary:${{ matrix.cassandra-version }} -n 1 --vnodes
ccm node1 updateconf 'storage_port: 7011'
ccm node1 updateconf 'concurrent_reads: 4'
ccm node1 updateconf 'concurrent_writes: 4'
ccm node1 updateconf 'concurrent_counter_writes: 4'
ccm node1 updateconf 'num_tokens: 4'
poetry run ccm create test_cluster -v binary:${{ matrix.cassandra-version }} -n 1 --vnodes
poetry run ccm node1 updateconf 'storage_port: 7011'
poetry run ccm node1 updateconf 'concurrent_reads: 4'
poetry run ccm node1 updateconf 'concurrent_writes: 4'
poetry run ccm node1 updateconf 'concurrent_counter_writes: 4'
poetry run ccm node1 updateconf 'storage_port: 7000'
# poetry run ccm node1 updateconf 'num_tokens: 4'
sed -i 's/#MAX_HEAP_SIZE="4G"/MAX_HEAP_SIZE="256m"/' ~/.ccm/test_cluster/node1/conf/cassandra-env.sh
sed -i 's/#HEAP_NEWSIZE="800M"/HEAP_NEWSIZE="200M"/' ~/.ccm/test_cluster/node1/conf/cassandra-env.sh
# remove the ThreadPriorityPolicy option for cases where we run with java 11
sed -i 's/-XX:ThreadPriorityPolicy=42//' ~/.ccm/test_cluster/node1/conf/jvm.options || true
sed -i 's/-XX:ThreadPriorityPolicy=42//' ~/.ccm/test_cluster/node1/conf/jvm8-server.options || true
ccm start -v
ccm showlastlog|tail -100
ccm stop
# switch to G1 GC when using java 11
sed -i 's/-XX:+UseConcMarkSweepGC/#-XX:+UseConcMarkSweepGC/' ~/.ccm/test_cluster/node1/conf/jvm11-server.options || true
sed -i 's/#-XX:+UseG1GC/-XX:+UseG1GC/' ~/.ccm/test_cluster/node1/conf/jvm11-server.options || true
poetry run ccm start -v
poetry run ccm showlastlog|tail -100
poetry run ccm stop
# if we are dealing with C* 4.0+, we need to fix the java-driver dependency.
# it has a bug that breaks sstableloader tests with client encryption enabled
# if cassandra version starts with 4.0 or 4.1
if [[ "${{ matrix.cassandra-version }}" =~ ^4\.[01]\. ]];
then
ccm create driver-fix-cluster -v ${{ matrix.cassandra-version }} -n 1
poetry run ccm create driver-fix-cluster -v ${{ matrix.cassandra-version }} -n 1
# enclosed in () so we return to current pwd once we are done fixing the driver
(
cd ~/.ccm/repository/${{ matrix.cassandra-version }}/lib
Expand Down Expand Up @@ -292,6 +298,11 @@ jobs:
mv tests/integration/.coverage .
poetry run coverage xml
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15

- uses: codecov/codecov-action@v1
name: Report code coverage

Expand Down Expand Up @@ -397,7 +408,7 @@ jobs:
echo "uploaddir_name=$uploaddir_name" >> $GITHUB_ENV
- name: Archive k8s logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: k8s-logs-${{ env.uploaddir_name }}
path: ./k8ssandra-operator/build/test
Expand Down
2 changes: 1 addition & 1 deletion medusa/service/grpc/medusa_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1bab9ef

Please sign in to comment.