Skip to content

Commit

Permalink
Merge pull request scylladb#432 from CodeLieutenant/fix--integrations…
Browse files Browse the repository at this point in the history
…-tests

fix(gh-actions): Upload gemini results to github
  • Loading branch information
dkropachev authored Oct 23, 2024
2 parents 8c7330e + a262a44 commit ffb469f
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 91 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,21 @@ jobs:
needs: [build]
runs-on: ubuntu-latest
strategy:
max-parallel: 1
max-parallel: 4
matrix:
gemini-features: ["basic", "normal", "all"]
gemini-concurrency: [16]
oracle-scylla-version: ["6.1.1"]
test-scylla-version: ["6.1.1"]
duration: ["5m"]
dataset-size: [large, small]
oracle-scylla-version: ["6.1"]
test-scylla-version: ["6.1"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Start ScyllaDB
id: scylla
shell: bash
run: |
chmod +x ./bin/gemini
make scylla-setup \
Expand All @@ -51,16 +54,19 @@ jobs:
make integration-test \
CONCURRENCY=${{ matrix.gemini-concurrency }} \
CQL_FEATURES=${{ matrix.gemini-features }} \
DURATION=5m
DURATION=${{ matrix.duration }} \
DATASET_SIZE=${{ matrix.dataset-size }} \
- name: Shutdown ScyllaDB
shell: bash
run: |
make scylla-shutdown \
SCYLLA_TEST_VERSION=${{ matrix.test-scylla-version }} \
SCYLLA_ORACLE_VERSION=${{ matrix.oracle-scylla-version }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: results-${{ matrix.gemini-features }}-${{ matrix.gemini-concurrency }}
name: results-${{ matrix.gemini-features }}-${{ matrix.gemini-concurrency }}-${{ matrix.duration }}-${{ matrix.dataset-size }}-${{ matrix.test-scylla-version }}-${{ matrix.oracle-scylla-version }}-${{ github.run_number }}
path: ./results
if-no-files-found: error
retention-days: 30
68 changes: 42 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,57 +39,73 @@ fix: $(GOBIN)/golangci-lint

.PHONY: build
build:
CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/gemini ./cmd/gemini
@CGO_ENABLED=0 go build -o bin/gemini ./cmd/gemini

debug-build:
CGO_ENABLED=0 go build -gcflags "all=-N -l" -o bin/gemini ./cmd/gemini
@CGO_ENABLED=0 go build -ldflags="-asan" -gcflags "all=-N -l" -o bin/gemini ./cmd/gemini

.PHONY: build-docker
build-docker:
docker build --target production -t scylladb/gemini:$(DOCKER_VERSION) --compress .
@docker build --target production -t scylladb/gemini:$(DOCKER_VERSION) --compress .

.PHONY: scylla-setup
scylla-setup:
@docker compose -f scripts/docker-compose-$(DOCKER_COMPOSE_TESTING).yml up -d
@docker compose -f docker/docker-compose-$(DOCKER_COMPOSE_TESTING).yml up -d

until docker logs gemini-oracle 2>&1 | grep "Starting listening for CQL clients" > /dev/null; do sleep 0.2; done
until docker logs gemini-test 2>&1 | grep "Starting listening for CQL clients" > /dev/null; do sleep 0.2; done

.PHONY: scylla-shutdown
scylla-shutdown:
docker compose -f scripts/docker-compose-$(DOCKER_COMPOSE_TESTING).yml down --volumes
docker compose -f docker/docker-compose-$(DOCKER_COMPOSE_TESTING).yml down --volumes

.PHONY: test
test:
go test -covermode=atomic -race -coverprofile=coverage.txt -timeout 5m -json -v ./... 2>&1 | gotestfmt -showteststatus
@go test -covermode=atomic -race -coverprofile=coverage.txt -timeout 5m -json -v ./... 2>&1 | gotestfmt -showteststatus

CQL_FEATURES := normal
CONCURRENCY := 1
DURATION := 10m
WARMUP := 1m
CQL_FEATURES ?= normal
CONCURRENCY ?= 16
DURATION ?= 1m
WARMUP ?= 1m
DATASET_SIZE ?= large
SEED ?= $(shell date +%s | tee ./results/gemini_seed)

.PHONY: integration-test
integration-test:
mkdir -p ./results
touch ./results/gemini_seed
./bin/gemini \
integration-test: debug-build
@mkdir -p $(PWD)/results
@touch $(PWD)/results/gemini_seed
@./bin/gemini \
--dataset-size=$(DATASET_SIZE) \
--seed=$(SEED) \
--schema-seed=$(SEED) \
--cql-features $(CQL_FEATURES) \
--duration $(DURATION) \
--warmup $(WARMUP) \
--drop-schema true \
--fail-fast \
--dataset-size=small \
--seed=$(shell date +%s | tee ./results/gemini_seed) \
--level info \
--non-interactive \
--materialized-views false \
--consistency LOCAL_QUORUM \
--outfile $(PWD)/results/gemini.log \
--test-statement-log-file $(PWD)/results/gemini_test_statements.log \
--oracle-statement-log-file $(PWD)/results/gemini_oracle_statements.log \
--test-host-selection-policy token-aware \
--oracle-host-selection-policy token-aware \
--test-cluster=$(shell docker inspect --format='{{ .NetworkSettings.Networks.gemini.IPAddress }}' gemini-test) \
--oracle-cluster=$(shell docker inspect --format='{{ .NetworkSettings.Networks.gemini.IPAddress }}' gemini-oracle) \
--outfile ./results/gemini_result.log \
--duration $(DURATION) \
--warmup $(WARMUP) \
-m mixed \
--outfile $(PWD)/results/gemini_result.log \
--mode mixed \
--non-interactive \
--cql-features $(CQL_FEATURES) \
--request-timeout 180s \
--connect-timeout 120s \
--async-objects-stabilization-attempts 5 \
--async-objects-stabilization-backoff 500ms \
--consistency LOCAL_QUORUM \
--use-server-timestamps false \
--async-objects-stabilization-attempts 10 \
--async-objects-stabilization-backoff 100ms \
--replication-strategy "{'class': 'NetworkTopologyStrategy', 'replication_factor': '1'}" \
--oracle-replication-strategy "{'class': 'NetworkTopologyStrategy', 'replication_factor': '1'}" \
--max-mutation-retries 10 \
--max-mutation-retries-backoff 500ms \
-c $(CONCURRENCY)
--max-mutation-retries 5 \
--max-mutation-retries-backoff 1000ms \
--concurrency $(CONCURRENCY) \
--tracing-outfile $(PWD)/results/gemini_tracing.log
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions scripts/compile-and-install-gemini.sh

This file was deleted.

25 changes: 0 additions & 25 deletions scripts/run-gemini-test.sh

This file was deleted.

26 changes: 0 additions & 26 deletions scripts/test.sh

This file was deleted.

0 comments on commit ffb469f

Please sign in to comment.