Skip to content

Commit

Permalink
fix(gh-actions): Upload gemini results to github
Browse files Browse the repository at this point in the history
1. When we run integrations tests, there was a bug when uploading
gemini results to github actifacts. Issue was in `Makefile`, path to
the `./results` is relative to the `./bin` directory from where `gemini`
is run. This directory does not exist in `./bin`.
Easy fix is just to use `$(PWD)`.

2. Modified the command for `integrations-tests` to match whats running
   inside SCT (mainly added `--schema-seed` to be the same as the `--seed`).

3. We migrated to `Makefile` fully, there is no need to have `./scripts`
   They are broken, and all commands have been migrated.

Signed-off-by: Dusan Malusev <[email protected]>
  • Loading branch information
CodeLieutenant committed Oct 23, 2024
1 parent 783bd13 commit f010672
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 135 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ jobs:
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 @@ -35,57 +35,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
9 changes: 0 additions & 9 deletions scripts/compile-and-install-gemini.sh

This file was deleted.

22 changes: 0 additions & 22 deletions scripts/docker-compose-cassandra.yml

This file was deleted.

23 changes: 0 additions & 23 deletions scripts/docker-compose-scylla.yml

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 f010672

Please sign in to comment.