Skip to content

Commit

Permalink
Merge pull request #1485 from Altinity/0.23.7
Browse files Browse the repository at this point in the history
0.23.7
  • Loading branch information
sunsingerus authored Aug 12, 2024
2 parents 2b6d18d + 2dd9eca commit d5f265f
Show file tree
Hide file tree
Showing 26 changed files with 4,978 additions and 180 deletions.
94 changes: 69 additions & 25 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
name: run_tests
on: workflow_dispatch
on:
pull_request:
branches:
- '*'
workflow_dispatch:
inputs:
test_mode:
description: 'Test mode'
type: choice
options:
- Run all
- Fail fast
test_mask:
description: 'Wildcard mask to run only some tests. Empty means all.'
type: string
required: false
jobs:
run_tests:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache python
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-python
with:
path: ~/venv/qa
Expand All @@ -32,36 +47,58 @@ jobs:
with:
driver: docker
container-runtime: containerd
kubernetes-version: v1.25.3
kubernetes-version: v1.30.0
cpus: max
memory: max

- name: Build clickhouse-operator locally without push to registry
run: |
minikube status
export CHO_RELEASE=$(cat release)
echo "current release=$CHO_RELEASE"
docker build -f dockerfile/operator/Dockerfile -t altinity/clickhouse-operator:${CHO_RELEASE} --pull .
docker build -f dockerfile/metrics-exporter/Dockerfile -t altinity/metrics-exporter:${CHO_RELEASE} --pull .
docker image save altinity/clickhouse-operator:${CHO_RELEASE} -o operator.tar
docker image save altinity/metrics-exporter:${CHO_RELEASE} -o metrics-exporter.tar
minikube image load operator.tar
minikube image load metrics-exporter.tar
- name: Run Tests
id: run-tests
continue-on-error: true
run: |
source ~/venv/qa/bin/activate
set -x
set +e # disable the "exit on failure"
# bash -xe ./deploy/prometheus/create-prometheus.sh
# bash -xe ./deploy/minio/install-minio-operator.sh
# bash -xe ./deploy/minio/install-minio-tenant.sh
sudo ln -snvf ~/venv/qa/bin/tfs /bin/tfs
# bash -xe /deploy/grafana/grafana-with-grafana-operator/install-grafana-operator.sh
# bash -xe /deploy/grafana/grafana-with-grafana-operator/install-grafana-with-operator.sh
# docker compose -f ./tests/docker-compose/docker-compose.yml pull runner
# ~/venv/qa/bin/python3 ./tests/regression.py --only "/regression/e2e.test_operator/*" --trim-results on --debug --log ./tests/raw.log
if [[ "${{ github.event.inputs.test_mask }}" != '' ]]
then
ONLY="${{ github.event.inputs.test_mask }}"
else
ONLY="*"
fi
# bash ./tests/e2e/run_tests_parallel.sh
sudo ln -snvf ~/venv/qa/bin/tfs /bin/tfs
ONLY='*'
# ONLY='*test_036*'
~/venv/qa/bin/python3 ./tests/regression.py --only "/regression/e2e.test_operator/${ONLY}" --trim-results on --debug --native --log ./tests/raw.log
~/venv/qa/bin/tfs --debug --no-colors transform compact ./tests/raw.log ./tests/compact.log
~/venv/qa/bin/tfs --debug --no-colors transform nice ./tests/raw.log ./tests/nice.log.txt
~/venv/qa/bin/tfs --debug --no-colors transform short ./tests/raw.log ./tests/short.log.txt
~/venv/qa/bin/tfs --debug --no-colors report results -a "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/" ./tests/raw.log - --confidential --copyright "Altinity LTD" --logo ./tests/altinity.png | ~/venv/qa/bin/tfs --debug --no-colors document convert > ./tests/report.html
- uses: actions/upload-artifact@v3
if [[ "${{ github.event.inputs.test_mode }}" == 'Run all' ]]
then
test_mode="--test-to-end"
fi
~/venv/qa/bin/python3 ./tests/regression.py --only=/regression/e2e.test_operator/${ONLY} $test_mode --trim-results on -o short --native --log ./tests/raw.log
test_result=$?
~/venv/qa/bin/tfs --no-colors transform compact ./tests/raw.log ./tests/compact.log
~/venv/qa/bin/tfs --no-colors transform nice ./tests/raw.log ./tests/nice.log.txt
~/venv/qa/bin/tfs --no-colors transform short ./tests/raw.log ./tests/short.log.txt
~/venv/qa/bin/tfs --no-colors report results -a "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/" ./tests/raw.log - --confidential --copyright "Altinity Inc." --logo ./tests/altinity.png | ~/venv/qa/bin/tfs --debug --no-colors document convert > ./tests/report.html
echo "test_result=$test_result" >> $GITHUB_OUTPUT
exit "$test_result"
- uses: actions/upload-artifact@v4
with:
name: testflows-logs
path: |
Expand All @@ -70,10 +107,17 @@ jobs:
if-no-files-found: error
retention-days: 7

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: testflows-report
path: |
tests/report.html
if-no-files-found: error
retention-days: 7
retention-days: 90

- name: Test Failed
if: ${{ steps.vars.outputs.test_result != '0' }}
uses: actions/github-script@v3
with:
script: |
core.setFailed('Test suite has failures! Check test run status and logs.')
4 changes: 2 additions & 2 deletions deploy/helm/clickhouse-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ description: |-
kubectl apply -f https://github.com/Altinity/clickhouse-operator/raw/master/deploy/helm/clickhouse-operator/crds/CustomResourceDefinition-clickhouseoperatorconfigurations.clickhouse.altinity.com.yaml
```
type: application
version: 0.23.6
appVersion: 0.23.6
version: 0.23.7
appVersion: 0.23.7
home: https://github.com/Altinity/clickhouse-operator
icon: https://logosandtypes.com/wp-content/uploads/2020/12/altinity.svg
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/clickhouse-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# altinity-clickhouse-operator

![Version: 0.23.6](https://img.shields.io/badge/Version-0.23.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.23.6](https://img.shields.io/badge/AppVersion-0.23.6-informational?style=flat-square)
![Version: 0.23.7](https://img.shields.io/badge/Version-0.23.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.23.7](https://img.shields.io/badge/AppVersion-0.23.7-informational?style=flat-square)

Helm chart to deploy [altinity-clickhouse-operator](https://github.com/Altinity/clickhouse-operator).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# SINGULAR=clickhouseinstallation
# PLURAL=clickhouseinstallations
# SHORT=chi
# OPERATOR_VERSION=0.23.6
# OPERATOR_VERSION=0.23.7
#
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: clickhouseinstallations.clickhouse.altinity.com
labels:
clickhouse.altinity.com/chop: 0.23.6
clickhouse.altinity.com/chop: 0.23.7
spec:
group: clickhouse.altinity.com
scope: Namespaced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# SINGULAR=clickhouseinstallationtemplate
# PLURAL=clickhouseinstallationtemplates
# SHORT=chit
# OPERATOR_VERSION=0.23.6
# OPERATOR_VERSION=0.23.7
#
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: clickhouseinstallationtemplates.clickhouse.altinity.com
labels:
clickhouse.altinity.com/chop: 0.23.6
clickhouse.altinity.com/chop: 0.23.7
spec:
group: clickhouse.altinity.com
scope: Namespaced
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Template Parameters:
#
# OPERATOR_VERSION=0.23.6
# OPERATOR_VERSION=0.23.7
#
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: clickhousekeeperinstallations.clickhouse-keeper.altinity.com
labels:
clickhouse-keeper.altinity.com/chop: 0.23.6
clickhouse-keeper.altinity.com/chop: 0.23.7
spec:
group: clickhouse-keeper.altinity.com
scope: Namespaced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kind: CustomResourceDefinition
metadata:
name: clickhouseoperatorconfigurations.clickhouse.altinity.com
labels:
clickhouse.altinity.com/chop: 0.23.6
clickhouse.altinity.com/chop: 0.23.7
spec:
group: clickhouse.altinity.com
scope: Namespaced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#
# NAMESPACE=kube-system
# COMMENT=
# OPERATOR_IMAGE=altinity/clickhouse-operator:0.23.6
# OPERATOR_IMAGE=altinity/clickhouse-operator:0.23.7
# OPERATOR_IMAGE_PULL_POLICY=Always
# METRICS_EXPORTER_IMAGE=altinity/metrics-exporter:0.23.6
# METRICS_EXPORTER_IMAGE=altinity/metrics-exporter:0.23.7
# METRICS_EXPORTER_IMAGE_PULL_POLICY=Always
#
# Setup Deployment for clickhouse-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Template parameters available:
# NAMESPACE=kube-system
# COMMENT=
# OPERATOR_VERSION=0.23.6
# OPERATOR_VERSION=0.23.7
# CH_USERNAME_SECRET_PLAIN=clickhouse_operator
# CH_PASSWORD_SECRET_PLAIN=clickhouse_operator_password
#
Expand Down
Loading

0 comments on commit d5f265f

Please sign in to comment.