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

fix CI #190

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
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
69 changes: 46 additions & 23 deletions .github/workflows/build-lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
jobs:
build-lint-and-unit-test:
name: Build, lint and run unit tests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -48,8 +48,8 @@ jobs:

scylla-integration-tests:
name: Scylla ITs
runs-on: ubuntu-latest
needs: [build-lint-and-unit-test]
runs-on: ubuntu-22.04
# needs: [build-lint-and-unit-test]
timeout-minutes: 90

strategy:
Expand Down Expand Up @@ -117,32 +117,55 @@ jobs:
path: ${{ env.INTEGRATION_TEST_BIN }}
key: ${{ env.INTEGRATION_TEST_BIN_CACHE_KEY }}

- name: Install valgrind
run: make install-valgrind-if-missing
# - name: Install valgrind
# run: make install-valgrind-if-missing

- name: Install binary dependencies
run: make install-bin-dependencies
# - name: Install binary dependencies
# run: make install-bin-dependencies

- name: Run integration tests on Scylla ${{ steps.scylla-version.outputs.value }}
id: run-integration-tests
run: SCYLLA_VERSION="release:${{ steps.scylla-version.outputs.value }}" make run-test-integration-scylla
# - name: Run integration tests on Scylla ${{ steps.scylla-version.outputs.value }}
# id: run-integration-tests
# run: SCYLLA_VERSION="release:${{ steps.scylla-version.outputs.value }}" make run-test-integration-scylla

- name: Upload test logs
uses: actions/upload-artifact@v4
if: steps.run-integration-tests.outcome == 'failure'
with:
name: test-logs-scylla-${{ matrix.scylla-version }}
path: ./log/*
- name: Run cluster using ccm (commands copied directly from IT run)
run: |
ccm create --scylla -n 1:0 -i 127.0.0. --version=release:${{ steps.scylla-version.outputs.value }} -b cpp-driver_${{ steps.scylla-version.outputs.value }}_1-0
ccm updateconf --rt=10000 read_request_timeout_in_ms:10000 write_request_timeout_in_ms:10000 request_timeout_in_ms:10000 phi_convict_threshold:16 hinted_handoff_enabled:false enable_materialized_views:true dynamic_snitch_update_interval_in_ms:1000 native_transport_max_threads:1 concurrent_reads:2 concurrent_writes:2 concurrent_compactors:1 compaction_throughput_mb_per_sec:0 key_cache_size_in_mb:0 key_cache_save_period:0 memtable_flush_writers:1 max_hints_delivery_threads:1 cas_contention_timeout_in_ms:10000 file_cache_size_in_mb:0
ccm start --wait-other-notice --wait-for-binary-proto --jvm_arg=--skip-wait-for-gossip-to-settle=0

- name: Upload CCM logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: ccm-log-scylla-${{ matrix.scylla-version }}
path: ${{ env.CCM_LOGS_PATTERN }}
- name: print used ports
if: always()
run: |
sudo apt-get install net-tools
netstat -tulpn

- name: Some ccm prints
if: always()
run: |
ccm list
ccm status
ccm node1 show

- name: Scylla logs
if: always()
run: ccm node1 showlog

# - name: Upload test logs
# uses: actions/upload-artifact@v4
# if: steps.run-integration-tests.outcome == 'failure'
# with:
# name: test-logs-scylla-${{ matrix.scylla-version }}
# path: ./log/*

# - name: Upload CCM logs
# uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: ccm-log-scylla-${{ matrix.scylla-version }}
# path: ${{ env.CCM_LOGS_PATTERN }}

cassandra-integration-tests:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [build-lint-and-unit-test]

strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
build-rpm-pkgs:
name: Build rpm packages
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container:
image: fedora:latest
# Required by `mock`:
Expand Down
34 changes: 6 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,7 @@ EMPTY :=
SPACE := ${EMPTY} ${EMPTY}

ifndef SCYLLA_TEST_FILTER
SCYLLA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\
:BasicsTests.*\
:ConfigTests.*\
:ConsistencyTwoNodeClusterTests.*\
:ConsistencyThreeNodeClusterTests.*\
:SerialConsistencyTests.*\
:PreparedTests.*\
:CassandraTypes/CassandraTypesTests/*.Integration_Cassandra_*\
:BatchSingleNodeClusterTests*:BatchCounterSingleNodeClusterTests*:BatchCounterThreeNodeClusterTests*\
:ErrorTests.*\
:SslNoClusterTests*:SslNoSslOnClusterTests*\
:SchemaMetadataTest.*KeyspaceMetadata:SchemaMetadataTest.*MetadataIterator:SchemaMetadataTest.*View*\
:TracingTests.*\
:ByNameTests.*\
:CompressionTests.*\
:LoggingTests.*\
:PreparedMetadataTests.*\
:UseKeyspaceCaseSensitiveTests.*\
:-PreparedTests.Integration_Cassandra_PreparedIDUnchangedDuringReprepare\
:ExecutionProfileTest.InvalidName\
:*NoCompactEnabledConnection\
:PreparedMetadataTests.Integration_Cassandra_AlterDoesntUpdateColumnCount\
:UseKeyspaceCaseSensitiveTests.Integration_Cassandra_ConnectWithKeyspace)
SCYLLA_TEST_FILTER := $(subst ${SPACE},${EMPTY},BasicsTests.Integration_Cassandra_Timestamps)
endif

ifndef CASSANDRA_TEST_FILTER
Expand Down Expand Up @@ -55,7 +33,7 @@ CASSANDRA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\
endif

ifndef CCM_COMMIT_ID
export CCM_COMMIT_ID := 81076bce792a0fb3f2050e4c209a93e4a62ab55f
export CCM_COMMIT_ID := master
endif

ifndef SCYLLA_VERSION
Expand Down Expand Up @@ -116,10 +94,10 @@ install-java8-if-missing:
}

install-build-dependencies: update-apt-cache-if-needed
@sudo apt-get install -y libssl1.1 libuv1-dev libkrb5-dev libc6-dbg
@sudo apt-get install -y libssl3 libuv1-dev libkrb5-dev libc6-dbg

install-bin-dependencies: update-apt-cache-if-needed
@sudo apt-get install -y libssl1.1 libuv1-dev libkrb5-dev libc6-dbg
@sudo apt-get install -y libssl3 libuv1-dev libkrb5-dev libc6-dbg

build-integration-test-bin:
@{\
Expand Down Expand Up @@ -196,14 +174,14 @@ download-ccm-cassandra-image: install-ccm-if-missing
@ccm create ccm_1 -i 127.0.1. -n 3:0 -v "${CASSANDRA_VERSION}" --config-dir=/tmp/download-cassandra.ccm
@rm -rf /tmp/download-cassandra.ccm

run-test-integration-scylla: prepare-integration-test download-ccm-scylla-image
run-test-integration-scylla: prepare-integration-test download-ccm-scylla-image install-java8-if-missing
ifdef DONT_REBUILD_INTEGRATION_BIN
run-test-integration-scylla: build-integration-test-bin-if-missing
else
run-test-integration-scylla: build-integration-test-bin
endif
@echo "Running integration tests on scylla ${SCYLLA_VERSION}"
valgrind --error-exitcode=123 --leak-check=full --errors-for-leak-kinds=definite build/cassandra-integration-tests --scylla --version=${SCYLLA_VERSION} --category=CASSANDRA --verbose=ccm --gtest_filter="${SCYLLA_TEST_FILTER}"
valgrind --error-exitcode=123 --leak-check=full --errors-for-leak-kinds=definite build/cassandra-integration-tests --scylla --version=${SCYLLA_VERSION} --category=CASSANDRA --verbose=ccm --keep-clusters --gtest_filter="${SCYLLA_TEST_FILTER}"
@echo "Running timeout sensitive tests on scylla ${SCYLLA_VERSION}"
build/cassandra-integration-tests --scylla --version=${SCYLLA_VERSION} --category=CASSANDRA --verbose=ccm --gtest_filter="AsyncTests.Integration_Cassandra_Simple"

Expand Down