diff --git a/.github/workflows/backport_branches.yml b/.github/workflows/backport_branches.yml
index a9e472ab09c..3b1bcc6bf78 100644
--- a/.github/workflows/backport_branches.yml
+++ b/.github/workflows/backport_branches.yml
@@ -9,7 +9,24 @@ on: # yamllint disable-line rule:truthy
branches:
- 'backport/**'
jobs:
- DockerHubPush:
+ DockerHubPushAarch64:
+ runs-on: [self-hosted, func-tester-aarch64]
+ steps:
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Images check
+ run: |
+ cd $GITHUB_WORKSPACE/tests/ci
+ python3 docker_images_check.py --suffix aarch64
+ - name: Upload images files to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: changed_images_aarch64
+ path: ${{ runner.temp }}/docker_images_check/changed_images_aarch64.json
+ DockerHubPushAmd64:
runs-on: [self-hosted, style-checker]
steps:
- name: Clear repository
@@ -20,12 +37,40 @@ jobs:
- name: Images check
run: |
cd $GITHUB_WORKSPACE/tests/ci
- python3 docker_images_check.py
+ python3 docker_images_check.py --suffix amd64
+ - name: Upload images files to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: changed_images_amd64
+ path: ${{ runner.temp }}/docker_images_check/changed_images_amd64.json
+ DockerHubPush:
+ needs: [DockerHubPushAmd64, DockerHubPushAarch64]
+ runs-on: [self-hosted, style-checker]
+ steps:
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Download changed aarch64 images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images_aarch64
+ path: ${{ runner.temp }}
+ - name: Download changed amd64 images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images_amd64
+ path: ${{ runner.temp }}
+ - name: Images check
+ run: |
+ cd $GITHUB_WORKSPACE/tests/ci
+ python3 docker_manifests_merge.py --suffix amd64 --suffix aarch64
- name: Upload images files to artifacts
uses: actions/upload-artifact@v2
with:
name: changed_images
- path: ${{ runner.temp }}/docker_images_check/changed_images.json
+ path: ${{ runner.temp }}/changed_images.json
CompatibilityCheck:
needs: [BuilderDebRelease]
runs-on: [self-hosted, style-checker]
@@ -106,6 +151,47 @@ jobs:
docker kill $(docker ps -q) ||:
docker rm -f $(docker ps -a -q) ||:
sudo rm -fr $TEMP_PATH $CACHES_PATH
+ BuilderDebAarch64:
+ needs: [DockerHubPush]
+ runs-on: [self-hosted, builder]
+ steps:
+ - name: Set envs
+ run: |
+ cat >> "$GITHUB_ENV" << 'EOF'
+ TEMP_PATH=${{runner.temp}}/build_check
+ IMAGES_PATH=${{runner.temp}}/images_path
+ REPO_COPY=${{runner.temp}}/build_check/ClickHouse
+ CACHES_PATH=${{runner.temp}}/../ccaches
+ CHECK_NAME=ClickHouse build check (actions)
+ BUILD_NAME=package_aarch64
+ EOF
+ - name: Download changed images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images
+ path: ${{ runner.temp }}/images_path
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ with:
+ submodules: 'true'
+ fetch-depth: 0 # otherwise we will have no info about contributors
+ - name: Build
+ run: |
+ sudo rm -fr $TEMP_PATH
+ mkdir -p $TEMP_PATH
+ cp -r $GITHUB_WORKSPACE $TEMP_PATH
+ cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
+ - name: Upload build URLs to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.BUILD_NAME }}
+ path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
+ - name: Cleanup
+ if: always()
+ run: |
+ docker kill $(docker ps -q) ||:
+ docker rm -f $(docker ps -a -q) ||:
+ sudo rm -fr $TEMP_PATH $CACHES_PATH
BuilderDebAsan:
needs: [DockerHubPush]
runs-on: [self-hosted, builder]
@@ -247,6 +333,7 @@ jobs:
BuilderReport:
needs:
- BuilderDebRelease
+ - BuilderDebAarch64
- BuilderDebAsan
- BuilderDebTsan
- BuilderDebDebug
diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml
index 857cbf2c495..cb06d853219 100644
--- a/.github/workflows/cancel.yml
+++ b/.github/workflows/cancel.yml
@@ -6,7 +6,7 @@ env:
on: # yamllint disable-line rule:truthy
workflow_run:
- workflows: ["CIGithubActions", "ReleaseCI", "DocsCheck", "BackportPR"]
+ workflows: ["PullRequestCI", "ReleaseCI", "DocsCheck", "BackportPR"]
types:
- requested
jobs:
diff --git a/.github/workflows/docs_check.yml b/.github/workflows/docs_check.yml
index 23c0840d379..9d400329aec 100644
--- a/.github/workflows/docs_check.yml
+++ b/.github/workflows/docs_check.yml
@@ -28,24 +28,70 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/tests/ci
python3 run_check.py
- DockerHubPush:
+ DockerHubPushAarch64:
needs: CheckLabels
- runs-on: [self-hosted, style-checker]
+ runs-on: [self-hosted, func-tester-aarch64]
steps:
- name: Clear repository
run: |
- sudo rm -rf $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
- name: Check out repository code
uses: actions/checkout@v2
- name: Images check
run: |
cd $GITHUB_WORKSPACE/tests/ci
- python3 docker_images_check.py
+ python3 docker_images_check.py --suffix aarch64
+ - name: Upload images files to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: changed_images_aarch64
+ path: ${{ runner.temp }}/docker_images_check/changed_images_aarch64.json
+ DockerHubPushAmd64:
+ needs: CheckLabels
+ runs-on: [self-hosted, style-checker]
+ steps:
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Images check
+ run: |
+ cd $GITHUB_WORKSPACE/tests/ci
+ python3 docker_images_check.py --suffix amd64
+ - name: Upload images files to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: changed_images_amd64
+ path: ${{ runner.temp }}/docker_images_check/changed_images_amd64.json
+ DockerHubPush:
+ needs: [DockerHubPushAmd64, DockerHubPushAarch64]
+ runs-on: [self-hosted, style-checker]
+ steps:
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Download changed aarch64 images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images_aarch64
+ path: ${{ runner.temp }}
+ - name: Download changed amd64 images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images_amd64
+ path: ${{ runner.temp }}
+ - name: Images check
+ run: |
+ cd $GITHUB_WORKSPACE/tests/ci
+ python3 docker_manifests_merge.py --suffix amd64 --suffix aarch64
- name: Upload images files to artifacts
uses: actions/upload-artifact@v2
with:
name: changed_images
- path: ${{ runner.temp }}/docker_images_check/changed_images.json
+ path: ${{ runner.temp }}/changed_images.json
DocsCheck:
needs: DockerHubPush
runs-on: [self-hosted, func-tester]
diff --git a/.github/workflows/jepsen.yml b/.github/workflows/jepsen.yml
index 1b01b4d5074..5c67b045fa7 100644
--- a/.github/workflows/jepsen.yml
+++ b/.github/workflows/jepsen.yml
@@ -8,7 +8,7 @@ on: # yamllint disable-line rule:truthy
schedule:
- cron: '0 */6 * * *'
workflow_run:
- workflows: ["CIGithubActions"]
+ workflows: ["PullRequestCI"]
types:
- completed
workflow_dispatch:
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index c2ed39224aa..e7eb4f7d69e 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -9,7 +9,24 @@ on: # yamllint disable-line rule:truthy
branches:
- 'master'
jobs:
- DockerHubPush:
+ DockerHubPushAarch64:
+ runs-on: [self-hosted, func-tester-aarch64]
+ steps:
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Images check
+ run: |
+ cd $GITHUB_WORKSPACE/tests/ci
+ python3 docker_images_check.py --suffix aarch64
+ - name: Upload images files to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: changed_images_aarch64
+ path: ${{ runner.temp }}/docker_images_check/changed_images_aarch64.json
+ DockerHubPushAmd64:
runs-on: [self-hosted, style-checker]
steps:
- name: Clear repository
@@ -20,12 +37,40 @@ jobs:
- name: Images check
run: |
cd $GITHUB_WORKSPACE/tests/ci
- python3 docker_images_check.py
+ python3 docker_images_check.py --suffix amd64
+ - name: Upload images files to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: changed_images_amd64
+ path: ${{ runner.temp }}/docker_images_check/changed_images_amd64.json
+ DockerHubPush:
+ needs: [DockerHubPushAmd64, DockerHubPushAarch64]
+ runs-on: [self-hosted, style-checker]
+ steps:
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Download changed aarch64 images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images_aarch64
+ path: ${{ runner.temp }}
+ - name: Download changed amd64 images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images_amd64
+ path: ${{ runner.temp }}
+ - name: Images check
+ run: |
+ cd $GITHUB_WORKSPACE/tests/ci
+ python3 docker_manifests_merge.py --suffix amd64 --suffix aarch64
- name: Upload images files to artifacts
uses: actions/upload-artifact@v2
with:
name: changed_images
- path: ${{ runner.temp }}/docker_images_check/changed_images.json
+ path: ${{ runner.temp }}/changed_images.json
StyleCheck:
needs: DockerHubPush
runs-on: [self-hosted, style-checker]
@@ -168,6 +213,47 @@ jobs:
docker kill $(docker ps -q) ||:
docker rm -f $(docker ps -a -q) ||:
sudo rm -fr $TEMP_PATH
+ BuilderDebAarch64:
+ needs: [DockerHubPush]
+ runs-on: [self-hosted, builder]
+ steps:
+ - name: Set envs
+ run: |
+ cat >> "$GITHUB_ENV" << 'EOF'
+ TEMP_PATH=${{runner.temp}}/build_check
+ IMAGES_PATH=${{runner.temp}}/images_path
+ REPO_COPY=${{runner.temp}}/build_check/ClickHouse
+ CACHES_PATH=${{runner.temp}}/../ccaches
+ CHECK_NAME=ClickHouse build check (actions)
+ BUILD_NAME=package_aarch64
+ EOF
+ - name: Download changed images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images
+ path: ${{ runner.temp }}/images_path
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ with:
+ submodules: 'true'
+ fetch-depth: 0 # otherwise we will have no info about contributors
+ - name: Build
+ run: |
+ sudo rm -fr $TEMP_PATH
+ mkdir -p $TEMP_PATH
+ cp -r $GITHUB_WORKSPACE $TEMP_PATH
+ cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
+ - name: Upload build URLs to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.BUILD_NAME }}
+ path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
+ - name: Cleanup
+ if: always()
+ run: |
+ docker kill $(docker ps -q) ||:
+ docker rm -f $(docker ps -a -q) ||:
+ sudo rm -fr $TEMP_PATH $CACHES_PATH
BuilderPerformance:
needs: DockerHubPush
runs-on: [self-hosted, builder]
@@ -815,6 +901,7 @@ jobs:
BuilderReport:
needs:
- BuilderDebRelease
+ - BuilderDebAarch64
- BuilderBinRelease
- BuilderDebAsan
- BuilderDebTsan
@@ -963,6 +1050,41 @@ jobs:
docker kill $(docker ps -q) ||:
docker rm -f $(docker ps -a -q) ||:
sudo rm -fr $TEMP_PATH
+ FunctionalStatelessTestAarch64:
+ needs: [BuilderDebAarch64]
+ runs-on: [self-hosted, func-tester-aarch64]
+ steps:
+ - name: Set envs
+ run: |
+ cat >> "$GITHUB_ENV" << 'EOF'
+ TEMP_PATH=${{runner.temp}}/stateless_release
+ REPORTS_PATH=${{runner.temp}}/reports_dir
+ CHECK_NAME=Stateless tests (aarch64, actions)
+ REPO_COPY=${{runner.temp}}/stateless_release/ClickHouse
+ KILL_TIMEOUT=10800
+ EOF
+ - name: Download json reports
+ uses: actions/download-artifact@v2
+ with:
+ path: ${{ env.REPORTS_PATH }}
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Functional test
+ run: |
+ sudo rm -fr $TEMP_PATH
+ mkdir -p $TEMP_PATH
+ cp -r $GITHUB_WORKSPACE $TEMP_PATH
+ cd $REPO_COPY/tests/ci
+ python3 functional_test_check.py "$CHECK_NAME" $KILL_TIMEOUT
+ - name: Cleanup
+ if: always()
+ run: |
+ docker kill $(docker ps -q) ||:
+ docker rm -f $(docker ps -a -q) ||:
+ sudo rm -fr $TEMP_PATH
FunctionalStatelessTestAsan0:
needs: [BuilderDebAsan]
runs-on: [self-hosted, func-tester]
@@ -1478,6 +1600,41 @@ jobs:
docker kill $(docker ps -q) ||:
docker rm -f $(docker ps -a -q) ||:
sudo rm -fr $TEMP_PATH
+ FunctionalStatefulTestAarch64:
+ needs: [BuilderDebAarch64]
+ runs-on: [self-hosted, func-tester-aarch64]
+ steps:
+ - name: Set envs
+ run: |
+ cat >> "$GITHUB_ENV" << 'EOF'
+ TEMP_PATH=${{runner.temp}}/stateful_release
+ REPORTS_PATH=${{runner.temp}}/reports_dir
+ CHECK_NAME=Stateful tests (aarch64, actions)
+ REPO_COPY=${{runner.temp}}/stateful_release/ClickHouse
+ KILL_TIMEOUT=3600
+ EOF
+ - name: Download json reports
+ uses: actions/download-artifact@v2
+ with:
+ path: ${{ env.REPORTS_PATH }}
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Functional test
+ run: |
+ sudo rm -fr $TEMP_PATH
+ mkdir -p $TEMP_PATH
+ cp -r $GITHUB_WORKSPACE $TEMP_PATH
+ cd $REPO_COPY/tests/ci
+ python3 functional_test_check.py "$CHECK_NAME" $KILL_TIMEOUT
+ - name: Cleanup
+ if: always()
+ run: |
+ docker kill $(docker ps -q) ||:
+ docker rm -f $(docker ps -a -q) ||:
+ sudo rm -fr $TEMP_PATH
FunctionalStatefulTestAsan:
needs: [BuilderDebAsan]
runs-on: [self-hosted, func-tester]
@@ -2659,6 +2816,7 @@ jobs:
- FunctionalStatelessTestDebug2
- FunctionalStatelessTestRelease
- FunctionalStatelessTestReleaseDatabaseOrdinary
+ - FunctionalStatelessTestAarch64
- FunctionalStatelessTestAsan0
- FunctionalStatelessTestAsan1
- FunctionalStatelessTestTsan0
@@ -2671,6 +2829,7 @@ jobs:
- FunctionalStatefulTestDebug
- FunctionalStatefulTestRelease
- FunctionalStatefulTestReleaseDatabaseOrdinary
+ - FunctionalStatefulTestAarch64
- FunctionalStatefulTestAsan
- FunctionalStatefulTestTsan
- FunctionalStatefulTestMsan
diff --git a/.github/workflows/main.yml b/.github/workflows/pull_request.yml
similarity index 96%
rename from .github/workflows/main.yml
rename to .github/workflows/pull_request.yml
index c42513ff9a8..ffcd9c50281 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/pull_request.yml
@@ -1,4 +1,4 @@
-name: CIGithubActions
+name: PullRequestCI
env:
# Force the stdout and stderr streams to be unbuffered
@@ -31,7 +31,25 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/tests/ci
python3 run_check.py
- DockerHubPush:
+ DockerHubPushAarch64:
+ needs: CheckLabels
+ runs-on: [self-hosted, func-tester-aarch64]
+ steps:
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Images check
+ run: |
+ cd $GITHUB_WORKSPACE/tests/ci
+ python3 docker_images_check.py --suffix aarch64
+ - name: Upload images files to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: changed_images_aarch64
+ path: ${{ runner.temp }}/docker_images_check/changed_images_aarch64.json
+ DockerHubPushAmd64:
needs: CheckLabels
runs-on: [self-hosted, style-checker]
steps:
@@ -43,12 +61,40 @@ jobs:
- name: Images check
run: |
cd $GITHUB_WORKSPACE/tests/ci
- python3 docker_images_check.py
+ python3 docker_images_check.py --suffix amd64
+ - name: Upload images files to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: changed_images_amd64
+ path: ${{ runner.temp }}/docker_images_check/changed_images_amd64.json
+ DockerHubPush:
+ needs: [DockerHubPushAmd64, DockerHubPushAarch64]
+ runs-on: [self-hosted, style-checker]
+ steps:
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Download changed aarch64 images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images_aarch64
+ path: ${{ runner.temp }}
+ - name: Download changed amd64 images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images_amd64
+ path: ${{ runner.temp }}
+ - name: Images check
+ run: |
+ cd $GITHUB_WORKSPACE/tests/ci
+ python3 docker_manifests_merge.py --suffix amd64 --suffix aarch64
- name: Upload images files to artifacts
uses: actions/upload-artifact@v2
with:
name: changed_images
- path: ${{ runner.temp }}/docker_images_check/changed_images.json
+ path: ${{ runner.temp }}/changed_images.json
StyleCheck:
needs: DockerHubPush
runs-on: [self-hosted, style-checker]
@@ -928,8 +974,8 @@ jobs:
BuilderReport:
needs:
- BuilderDebRelease
- - BuilderBinRelease
- BuilderDebAarch64
+ - BuilderBinRelease
- BuilderDebAsan
- BuilderDebTsan
- BuilderDebUBsan
@@ -1153,6 +1199,41 @@ jobs:
docker kill $(docker ps -q) ||:
docker rm -f $(docker ps -a -q) ||:
sudo rm -fr $TEMP_PATH
+ FunctionalStatelessTestAarch64:
+ needs: [BuilderDebAarch64]
+ runs-on: [self-hosted, func-tester-aarch64]
+ steps:
+ - name: Set envs
+ run: |
+ cat >> "$GITHUB_ENV" << 'EOF'
+ TEMP_PATH=${{runner.temp}}/stateless_release
+ REPORTS_PATH=${{runner.temp}}/reports_dir
+ CHECK_NAME=Stateless tests (aarch64, actions)
+ REPO_COPY=${{runner.temp}}/stateless_release/ClickHouse
+ KILL_TIMEOUT=10800
+ EOF
+ - name: Download json reports
+ uses: actions/download-artifact@v2
+ with:
+ path: ${{ env.REPORTS_PATH }}
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Functional test
+ run: |
+ sudo rm -fr $TEMP_PATH
+ mkdir -p $TEMP_PATH
+ cp -r $GITHUB_WORKSPACE $TEMP_PATH
+ cd $REPO_COPY/tests/ci
+ python3 functional_test_check.py "$CHECK_NAME" $KILL_TIMEOUT
+ - name: Cleanup
+ if: always()
+ run: |
+ docker kill $(docker ps -q) ||:
+ docker rm -f $(docker ps -a -q) ||:
+ sudo rm -fr $TEMP_PATH
FunctionalStatelessTestAsan0:
needs: [BuilderDebAsan]
runs-on: [self-hosted, func-tester]
@@ -1668,6 +1749,41 @@ jobs:
docker kill $(docker ps -q) ||:
docker rm -f $(docker ps -a -q) ||:
sudo rm -fr $TEMP_PATH
+ FunctionalStatefulTestAarch64:
+ needs: [BuilderDebAarch64]
+ runs-on: [self-hosted, func-tester-aarch64]
+ steps:
+ - name: Set envs
+ run: |
+ cat >> "$GITHUB_ENV" << 'EOF'
+ TEMP_PATH=${{runner.temp}}/stateful_release
+ REPORTS_PATH=${{runner.temp}}/reports_dir
+ CHECK_NAME=Stateful tests (aarch64, actions)
+ REPO_COPY=${{runner.temp}}/stateful_release/ClickHouse
+ KILL_TIMEOUT=3600
+ EOF
+ - name: Download json reports
+ uses: actions/download-artifact@v2
+ with:
+ path: ${{ env.REPORTS_PATH }}
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Functional test
+ run: |
+ sudo rm -fr $TEMP_PATH
+ mkdir -p $TEMP_PATH
+ cp -r $GITHUB_WORKSPACE $TEMP_PATH
+ cd $REPO_COPY/tests/ci
+ python3 functional_test_check.py "$CHECK_NAME" $KILL_TIMEOUT
+ - name: Cleanup
+ if: always()
+ run: |
+ docker kill $(docker ps -q) ||:
+ docker rm -f $(docker ps -a -q) ||:
+ sudo rm -fr $TEMP_PATH
FunctionalStatefulTestAsan:
needs: [BuilderDebAsan]
runs-on: [self-hosted, func-tester]
@@ -2888,6 +3004,7 @@ jobs:
- FunctionalStatelessTestReleaseDatabaseReplicated0
- FunctionalStatelessTestReleaseDatabaseReplicated1
- FunctionalStatelessTestReleaseWideParts
+ - FunctionalStatelessTestAarch64
- FunctionalStatelessTestAsan0
- FunctionalStatelessTestAsan1
- FunctionalStatelessTestTsan0
@@ -2899,6 +3016,7 @@ jobs:
- FunctionalStatelessTestUBsan
- FunctionalStatefulTestDebug
- FunctionalStatefulTestRelease
+ - FunctionalStatefulTestAarch64
- FunctionalStatefulTestAsan
- FunctionalStatefulTestTsan
- FunctionalStatefulTestMsan
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1212bddb4a5..cb081c6ff41 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -19,7 +19,24 @@ on: # yamllint disable-line rule:truthy
- '.github/**'
workflow_dispatch:
jobs:
- DockerHubPush:
+ DockerHubPushAarch64:
+ runs-on: [self-hosted, func-tester-aarch64]
+ steps:
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Images check
+ run: |
+ cd $GITHUB_WORKSPACE/tests/ci
+ python3 docker_images_check.py --suffix aarch64
+ - name: Upload images files to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: changed_images_aarch64
+ path: ${{ runner.temp }}/docker_images_check/changed_images_aarch64.json
+ DockerHubPushAmd64:
runs-on: [self-hosted, style-checker]
steps:
- name: Clear repository
@@ -30,12 +47,40 @@ jobs:
- name: Images check
run: |
cd $GITHUB_WORKSPACE/tests/ci
- python3 docker_images_check.py
+ python3 docker_images_check.py --suffix amd64
+ - name: Upload images files to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: changed_images_amd64
+ path: ${{ runner.temp }}/docker_images_check/changed_images_amd64.json
+ DockerHubPush:
+ needs: [DockerHubPushAmd64, DockerHubPushAarch64]
+ runs-on: [self-hosted, style-checker]
+ steps:
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Download changed aarch64 images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images_aarch64
+ path: ${{ runner.temp }}
+ - name: Download changed amd64 images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images_amd64
+ path: ${{ runner.temp }}
+ - name: Images check
+ run: |
+ cd $GITHUB_WORKSPACE/tests/ci
+ python3 docker_manifests_merge.py --suffix amd64 --suffix aarch64
- name: Upload images files to artifacts
uses: actions/upload-artifact@v2
with:
name: changed_images
- path: ${{ runner.temp }}/docker_images_check/changed_images.json
+ path: ${{ runner.temp }}/changed_images.json
DocsRelease:
needs: DockerHubPush
runs-on: [self-hosted, func-tester]
diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml
index 68a3554741d..12117db2dc7 100644
--- a/.github/workflows/release_branches.yml
+++ b/.github/workflows/release_branches.yml
@@ -12,7 +12,24 @@ on: # yamllint disable-line rule:truthy
- '23.[1-9][1-9]'
- '24.[1-9][1-9]'
jobs:
- DockerHubPush:
+ DockerHubPushAarch64:
+ runs-on: [self-hosted, func-tester-aarch64]
+ steps:
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Images check
+ run: |
+ cd $GITHUB_WORKSPACE/tests/ci
+ python3 docker_images_check.py --suffix aarch64
+ - name: Upload images files to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: changed_images_aarch64
+ path: ${{ runner.temp }}/docker_images_check/changed_images_aarch64.json
+ DockerHubPushAmd64:
runs-on: [self-hosted, style-checker]
steps:
- name: Clear repository
@@ -23,12 +40,40 @@ jobs:
- name: Images check
run: |
cd $GITHUB_WORKSPACE/tests/ci
- python3 docker_images_check.py
+ python3 docker_images_check.py --suffix amd64
+ - name: Upload images files to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: changed_images_amd64
+ path: ${{ runner.temp }}/docker_images_check/changed_images_amd64.json
+ DockerHubPush:
+ needs: [DockerHubPushAmd64, DockerHubPushAarch64]
+ runs-on: [self-hosted, style-checker]
+ steps:
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Download changed aarch64 images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images_aarch64
+ path: ${{ runner.temp }}
+ - name: Download changed amd64 images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images_amd64
+ path: ${{ runner.temp }}
+ - name: Images check
+ run: |
+ cd $GITHUB_WORKSPACE/tests/ci
+ python3 docker_manifests_merge.py --suffix amd64 --suffix aarch64
- name: Upload images files to artifacts
uses: actions/upload-artifact@v2
with:
name: changed_images
- path: ${{ runner.temp }}/docker_images_check/changed_images.json
+ path: ${{ runner.temp }}/changed_images.json
CompatibilityCheck:
needs: [BuilderDebRelease]
runs-on: [self-hosted, style-checker]
@@ -109,6 +154,47 @@ jobs:
docker kill $(docker ps -q) ||:
docker rm -f $(docker ps -a -q) ||:
sudo rm -fr $TEMP_PATH $CACHES_PATH
+ BuilderDebAarch64:
+ needs: [DockerHubPush]
+ runs-on: [self-hosted, builder]
+ steps:
+ - name: Set envs
+ run: |
+ cat >> "$GITHUB_ENV" << 'EOF'
+ TEMP_PATH=${{runner.temp}}/build_check
+ IMAGES_PATH=${{runner.temp}}/images_path
+ REPO_COPY=${{runner.temp}}/build_check/ClickHouse
+ CACHES_PATH=${{runner.temp}}/../ccaches
+ CHECK_NAME=ClickHouse build check (actions)
+ BUILD_NAME=package_aarch64
+ EOF
+ - name: Download changed images
+ uses: actions/download-artifact@v2
+ with:
+ name: changed_images
+ path: ${{ runner.temp }}/images_path
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ with:
+ submodules: 'true'
+ fetch-depth: 0 # otherwise we will have no info about contributors
+ - name: Build
+ run: |
+ sudo rm -fr $TEMP_PATH
+ mkdir -p $TEMP_PATH
+ cp -r $GITHUB_WORKSPACE $TEMP_PATH
+ cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
+ - name: Upload build URLs to artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.BUILD_NAME }}
+ path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
+ - name: Cleanup
+ if: always()
+ run: |
+ docker kill $(docker ps -q) ||:
+ docker rm -f $(docker ps -a -q) ||:
+ sudo rm -fr $TEMP_PATH $CACHES_PATH
BuilderDebAsan:
needs: [DockerHubPush]
runs-on: [self-hosted, builder]
@@ -340,6 +426,7 @@ jobs:
BuilderReport:
needs:
- BuilderDebRelease
+ - BuilderDebAarch64
- BuilderDebAsan
- BuilderDebTsan
- BuilderDebUBsan
@@ -413,6 +500,41 @@ jobs:
docker kill $(docker ps -q) ||:
docker rm -f $(docker ps -a -q) ||:
sudo rm -fr $TEMP_PATH
+ FunctionalStatelessTestAarch64:
+ needs: [BuilderDebAarch64]
+ runs-on: [self-hosted, func-tester-aarch64]
+ steps:
+ - name: Set envs
+ run: |
+ cat >> "$GITHUB_ENV" << 'EOF'
+ TEMP_PATH=${{runner.temp}}/stateless_release
+ REPORTS_PATH=${{runner.temp}}/reports_dir
+ CHECK_NAME=Stateless tests (aarch64, actions)
+ REPO_COPY=${{runner.temp}}/stateless_release/ClickHouse
+ KILL_TIMEOUT=10800
+ EOF
+ - name: Download json reports
+ uses: actions/download-artifact@v2
+ with:
+ path: ${{ env.REPORTS_PATH }}
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Functional test
+ run: |
+ sudo rm -fr $TEMP_PATH
+ mkdir -p $TEMP_PATH
+ cp -r $GITHUB_WORKSPACE $TEMP_PATH
+ cd $REPO_COPY/tests/ci
+ python3 functional_test_check.py "$CHECK_NAME" $KILL_TIMEOUT
+ - name: Cleanup
+ if: always()
+ run: |
+ docker kill $(docker ps -q) ||:
+ docker rm -f $(docker ps -a -q) ||:
+ sudo rm -fr $TEMP_PATH
FunctionalStatelessTestAsan0:
needs: [BuilderDebAsan]
runs-on: [self-hosted, func-tester]
@@ -893,6 +1015,41 @@ jobs:
docker kill $(docker ps -q) ||:
docker rm -f $(docker ps -a -q) ||:
sudo rm -fr $TEMP_PATH
+ FunctionalStatefulTestAarch64:
+ needs: [BuilderDebAarch64]
+ runs-on: [self-hosted, func-tester-aarch64]
+ steps:
+ - name: Set envs
+ run: |
+ cat >> "$GITHUB_ENV" << 'EOF'
+ TEMP_PATH=${{runner.temp}}/stateful_release
+ REPORTS_PATH=${{runner.temp}}/reports_dir
+ CHECK_NAME=Stateful tests (aarch64, actions)
+ REPO_COPY=${{runner.temp}}/stateful_release/ClickHouse
+ KILL_TIMEOUT=3600
+ EOF
+ - name: Download json reports
+ uses: actions/download-artifact@v2
+ with:
+ path: ${{ env.REPORTS_PATH }}
+ - name: Clear repository
+ run: |
+ sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - name: Functional test
+ run: |
+ sudo rm -fr $TEMP_PATH
+ mkdir -p $TEMP_PATH
+ cp -r $GITHUB_WORKSPACE $TEMP_PATH
+ cd $REPO_COPY/tests/ci
+ python3 functional_test_check.py "$CHECK_NAME" $KILL_TIMEOUT
+ - name: Cleanup
+ if: always()
+ run: |
+ docker kill $(docker ps -q) ||:
+ docker rm -f $(docker ps -a -q) ||:
+ sudo rm -fr $TEMP_PATH
FunctionalStatefulTestAsan:
needs: [BuilderDebAsan]
runs-on: [self-hosted, func-tester]
@@ -1580,6 +1737,7 @@ jobs:
- FunctionalStatelessTestDebug1
- FunctionalStatelessTestDebug2
- FunctionalStatelessTestRelease
+ - FunctionalStatelessTestAarch64
- FunctionalStatelessTestAsan0
- FunctionalStatelessTestAsan1
- FunctionalStatelessTestTsan0
@@ -1591,6 +1749,7 @@ jobs:
- FunctionalStatelessTestUBsan
- FunctionalStatefulTestDebug
- FunctionalStatefulTestRelease
+ - FunctionalStatefulTestAarch64
- FunctionalStatefulTestAsan
- FunctionalStatefulTestTsan
- FunctionalStatefulTestMsan
diff --git a/base/base/StringRef.h b/base/base/StringRef.h
index d0184dbc24c..eefc87121fc 100644
--- a/base/base/StringRef.h
+++ b/base/base/StringRef.h
@@ -48,7 +48,9 @@ struct StringRef
std::string toString() const { return std::string(data, size); }
explicit operator std::string() const { return toString(); }
- constexpr explicit operator std::string_view() const { return {data, size}; }
+ std::string_view toView() const { return std::string_view(data, size); }
+
+ constexpr explicit operator std::string_view() const { return std::string_view(data, size); }
};
/// Here constexpr doesn't implicate inline, see https://www.viva64.com/en/w/v1043/
diff --git a/docker/docs/builder/Dockerfile b/docker/docs/builder/Dockerfile
index 50e3fadf9ac..53c492c2677 100644
--- a/docker/docs/builder/Dockerfile
+++ b/docker/docs/builder/Dockerfile
@@ -1,3 +1,4 @@
+# rebuild in #33610
# docker build -t clickhouse/docs-build .
FROM ubuntu:20.04
diff --git a/docker/docs/check/Dockerfile b/docker/docs/check/Dockerfile
index 55647df5c3e..174be123eed 100644
--- a/docker/docs/check/Dockerfile
+++ b/docker/docs/check/Dockerfile
@@ -1,5 +1,7 @@
+# rebuild in #33610
# docker build -t clickhouse/docs-check .
-FROM clickhouse/docs-builder
+ARG FROM_TAG=latest
+FROM clickhouse/docs-builder:$FROM_TAG
COPY run.sh /
diff --git a/docker/docs/release/Dockerfile b/docker/docs/release/Dockerfile
index 63765180a4c..3c661c1d3fd 100644
--- a/docker/docs/release/Dockerfile
+++ b/docker/docs/release/Dockerfile
@@ -1,5 +1,7 @@
+# rebuild in #33610
# docker build -t clickhouse/docs-release .
-FROM clickhouse/docs-builder
+ARG FROM_TAG=latest
+FROM clickhouse/docs-builder:$FROM_TAG
COPY run.sh /
diff --git a/docker/packager/binary/Dockerfile b/docker/packager/binary/Dockerfile
index 8f886ea357d..e3e2e689b17 100644
--- a/docker/packager/binary/Dockerfile
+++ b/docker/packager/binary/Dockerfile
@@ -1,4 +1,5 @@
-# docker build -t clickhouse/binary-builder .
+# rebuild in #33610
+# docker build -t clickhouse/binary-builder .
FROM ubuntu:20.04
# ARG for quick switch to a given ubuntu mirror
diff --git a/docker/packager/deb/Dockerfile b/docker/packager/deb/Dockerfile
index 89c34846efa..76a5f1d91c0 100644
--- a/docker/packager/deb/Dockerfile
+++ b/docker/packager/deb/Dockerfile
@@ -1,3 +1,4 @@
+# rebuild in #33610
# docker build -t clickhouse/deb-builder .
FROM ubuntu:20.04
@@ -28,12 +29,14 @@ RUN apt-get update \
software-properties-common \
--yes --no-install-recommends
+# Architecture of the image when BuildKit/buildx is used
+ARG TARGETARCH
+
# Special dpkg-deb (https://github.com/ClickHouse-Extras/dpkg) version which is able
# to compress files using pigz (https://zlib.net/pigz/) instead of gzip.
# Significantly increase deb packaging speed and compatible with old systems
-RUN curl -O https://clickhouse-datasets.s3.yandex.net/utils/1/dpkg-deb \
- && chmod +x dpkg-deb \
- && cp dpkg-deb /usr/bin
+RUN arch=${TARGETARCH:-amd64} \
+ && curl -Lo /usr/bin/dpkg-deb https://github.com/ClickHouse-Extras/dpkg/releases/download/1.21.1-clickhouse/dpkg-deb-${arch}
RUN apt-get update \
&& apt-get install \
diff --git a/docker/test/base/Dockerfile b/docker/test/base/Dockerfile
index a661f8875a2..6beab2e5bb7 100644
--- a/docker/test/base/Dockerfile
+++ b/docker/test/base/Dockerfile
@@ -1,5 +1,7 @@
+# rebuild in #33610
# docker build -t clickhouse/test-base .
-FROM clickhouse/test-util
+ARG FROM_TAG=latest
+FROM clickhouse/test-util:$FROM_TAG
# ARG for quick switch to a given ubuntu mirror
ARG apt_archive="http://archive.ubuntu.com"
@@ -28,12 +30,14 @@ RUN apt-get update \
software-properties-common \
--yes --no-install-recommends
+# Architecture of the image when BuildKit/buildx is used
+ARG TARGETARCH
+
# Special dpkg-deb (https://github.com/ClickHouse-Extras/dpkg) version which is able
# to compress files using pigz (https://zlib.net/pigz/) instead of gzip.
# Significantly increase deb packaging speed and compatible with old systems
-RUN curl -O https://clickhouse-datasets.s3.yandex.net/utils/1/dpkg-deb \
- && chmod +x dpkg-deb \
- && cp dpkg-deb /usr/bin
+RUN arch=${TARGETARCH:-amd64} \
+ && curl -Lo /usr/bin/dpkg-deb https://github.com/ClickHouse-Extras/dpkg/releases/download/1.21.1-clickhouse/dpkg-deb-${arch}
RUN apt-get update \
&& apt-get install \
diff --git a/docker/test/codebrowser/Dockerfile b/docker/test/codebrowser/Dockerfile
index d1059b3dacc..97f3f54ad98 100644
--- a/docker/test/codebrowser/Dockerfile
+++ b/docker/test/codebrowser/Dockerfile
@@ -1,12 +1,14 @@
+# rebuild in #33610
# docker build --network=host -t clickhouse/codebrowser .
# docker run --volume=path_to_repo:/repo_folder --volume=path_to_result:/test_output clickhouse/codebrowser
-FROM clickhouse/binary-builder
+ARG FROM_TAG=latest
+FROM clickhouse/binary-builder:$FROM_TAG
# ARG for quick switch to a given ubuntu mirror
ARG apt_archive="http://archive.ubuntu.com"
RUN sed -i "s|http://archive.ubuntu.com|$apt_archive|g" /etc/apt/sources.list
-RUN apt-get update && apt-get --yes --allow-unauthenticated install clang-13 libllvm13 libclang-13-dev
+RUN apt-get update && apt-get --yes --allow-unauthenticated install clang-13 libllvm13 libclang-13-dev libmlir-13-dev
# repo versions doesn't work correctly with C++17
# also we push reports to s3, so we add index.html to subfolder urls
diff --git a/docker/test/fasttest/Dockerfile b/docker/test/fasttest/Dockerfile
index 6fa5b0aa9db..46b74d89e13 100644
--- a/docker/test/fasttest/Dockerfile
+++ b/docker/test/fasttest/Dockerfile
@@ -1,5 +1,7 @@
+# rebuild in #33610
# docker build -t clickhouse/fasttest .
-FROM clickhouse/test-util
+ARG FROM_TAG=latest
+FROM clickhouse/test-util:$FROM_TAG
# ARG for quick switch to a given ubuntu mirror
ARG apt_archive="http://archive.ubuntu.com"
@@ -28,12 +30,14 @@ RUN apt-get update \
software-properties-common \
--yes --no-install-recommends
+# Architecture of the image when BuildKit/buildx is used
+ARG TARGETARCH
+
# Special dpkg-deb (https://github.com/ClickHouse-Extras/dpkg) version which is able
# to compress files using pigz (https://zlib.net/pigz/) instead of gzip.
# Significantly increase deb packaging speed and compatible with old systems
-RUN curl -O https://clickhouse-datasets.s3.yandex.net/utils/1/dpkg-deb \
- && chmod +x dpkg-deb \
- && cp dpkg-deb /usr/bin
+RUN arch=${TARGETARCH:-amd64} \
+ && curl -Lo /usr/bin/dpkg-deb https://github.com/ClickHouse-Extras/dpkg/releases/download/1.21.1-clickhouse/dpkg-deb-${arch}
RUN apt-get update \
&& apt-get install \
diff --git a/docker/test/fuzzer/Dockerfile b/docker/test/fuzzer/Dockerfile
index c602cba50aa..eb4b09c173f 100644
--- a/docker/test/fuzzer/Dockerfile
+++ b/docker/test/fuzzer/Dockerfile
@@ -1,5 +1,7 @@
+# rebuild in #33610
# docker build -t clickhouse/fuzzer .
-FROM clickhouse/test-base
+ARG FROM_TAG=latest
+FROM clickhouse/test-base:$FROM_TAG
# ARG for quick switch to a given ubuntu mirror
ARG apt_archive="http://archive.ubuntu.com"
diff --git a/docker/test/integration/base/Dockerfile b/docker/test/integration/base/Dockerfile
index 89c2b19236e..91b26735fe5 100644
--- a/docker/test/integration/base/Dockerfile
+++ b/docker/test/integration/base/Dockerfile
@@ -1,44 +1,57 @@
+# rebuild in #33610
# docker build -t clickhouse/integration-test .
-FROM clickhouse/test-base
+ARG FROM_TAG=latest
+FROM clickhouse/test-base:$FROM_TAG
SHELL ["/bin/bash", "-c"]
RUN apt-get update \
&& env DEBIAN_FRONTEND=noninteractive apt-get -y install \
- tzdata \
- python3 \
- libicu-dev \
bsdutils \
+ curl \
+ default-jre \
+ g++ \
gdb \
- unixodbc \
- odbcinst \
+ iproute2 \
+ krb5-user \
+ libicu-dev \
libsqlite3-dev \
libsqliteodbc \
- odbc-postgresql \
- sqlite3 \
- curl \
- tar \
- lz4 \
- krb5-user \
- iproute2 \
lsof \
- g++ \
- default-jre
+ lz4 \
+ odbc-postgresql \
+ odbcinst \
+ python3 \
+ rpm2cpio \
+ sqlite3 \
+ tar \
+ tzdata \
+ unixodbc \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*
-RUN rm -rf \
- /var/lib/apt/lists/* \
- /var/cache/debconf \
- /tmp/* \
-RUN apt-get clean
+# Architecture of the image when BuildKit/buildx is used
+ARG TARGETARCH
-# Install MySQL ODBC driver
-RUN curl 'https://downloads.mysql.com/archives/get/p/10/file/mysql-connector-odbc-8.0.21-linux-glibc2.12-x86-64bit.tar.gz' --location --output 'mysql-connector.tar.gz' && tar -xzf mysql-connector.tar.gz && cd mysql-connector-odbc-8.0.21-linux-glibc2.12-x86-64bit/lib && mv * /usr/local/lib && ln -s /usr/local/lib/libmyodbc8a.so /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
+# Install MySQL ODBC driver from RHEL rpm
+RUN arch=${TARGETARCH:-amd64} \
+ && case $arch in \
+ amd64) rarch=x86_64 ;; \
+ arm64) rarch=aarch64 ;; \
+ esac \
+ && cd /tmp \
+ && curl -o mysql-odbc.rpm "https://cdn.mysql.com/Downloads/Connector-ODBC/8.0/mysql-connector-odbc-8.0.27-1.el8.${rarch}.rpm" \
+ && rpm2archive mysql-odbc.rpm \
+ && tar xf mysql-odbc.rpm.tgz -C / ./usr/lib64/ \
+ && LINK_DIR=$(dpkg -L libodbc1 | grep '^/usr/lib/.*-linux-gnu/odbc$') \
+ && ln -s /usr/lib64/libmyodbc8a.so "$LINK_DIR" \
+ && ln -s /usr/lib64/libmyodbc8a.so "$LINK_DIR"/libmyodbc.so
# Unfortunately this is required for a single test for conversion data from zookeeper to clickhouse-keeper.
# ZooKeeper is not started by default, but consumes some space in containers.
# 777 perms used to allow anybody to start/stop ZooKeeper
ENV ZOOKEEPER_VERSION='3.6.3'
-RUN curl -O "https://mirrors.estointernet.in/apache/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/apache-zookeeper-${ZOOKEEPER_VERSION}-bin.tar.gz"
+RUN curl -O "https://dlcdn.apache.org/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/apache-zookeeper-${ZOOKEEPER_VERSION}-bin.tar.gz"
RUN tar -zxvf apache-zookeeper-${ZOOKEEPER_VERSION}-bin.tar.gz && mv apache-zookeeper-${ZOOKEEPER_VERSION}-bin /opt/zookeeper && chmod -R 777 /opt/zookeeper && rm apache-zookeeper-${ZOOKEEPER_VERSION}-bin.tar.gz
RUN echo $'tickTime=2500 \n\
tickTime=2500 \n\
diff --git a/docker/test/keeper-jepsen/Dockerfile b/docker/test/keeper-jepsen/Dockerfile
index 5bb7f9433c2..a794e076ec0 100644
--- a/docker/test/keeper-jepsen/Dockerfile
+++ b/docker/test/keeper-jepsen/Dockerfile
@@ -1,5 +1,7 @@
+# rebuild in #33610
# docker build -t clickhouse/keeper-jepsen-test .
-FROM clickhouse/test-base
+ARG FROM_TAG=latest
+FROM clickhouse/test-base:$FROM_TAG
ENV DEBIAN_FRONTEND=noninteractive
ENV CLOJURE_VERSION=1.10.3.814
diff --git a/docker/test/pvs/Dockerfile b/docker/test/pvs/Dockerfile
index c236b3a51d1..f484feecfd0 100644
--- a/docker/test/pvs/Dockerfile
+++ b/docker/test/pvs/Dockerfile
@@ -1,8 +1,14 @@
+# rebuild in #33610
# docker build -t clickhouse/pvs-test .
-FROM clickhouse/binary-builder
+ARG FROM_TAG=latest
+FROM clickhouse/binary-builder:$FROM_TAG
-RUN apt-get update --yes \
+# PVS studio doesn't support aarch64/arm64, so there is a check for it everywhere
+# We'll produce an empty image for arm64
+ARG TARGETARCH
+
+RUN test x$TARGETARCH = xarm64 || ( apt-get update --yes \
&& apt-get install \
bash \
wget \
@@ -15,7 +21,7 @@ RUN apt-get update --yes \
libprotoc-dev \
libgrpc++-dev \
libc-ares-dev \
- --yes --no-install-recommends
+ --yes --no-install-recommends )
#RUN wget -nv -O - http://files.viva64.com/etc/pubkey.txt | sudo apt-key add -
#RUN sudo wget -nv -O /etc/apt/sources.list.d/viva64.list http://files.viva64.com/etc/viva64.list
@@ -27,7 +33,7 @@ RUN apt-get update --yes \
ENV PKG_VERSION="pvs-studio-latest"
-RUN set -x \
+RUN test x$TARGETARCH = xarm64 || ( set -x \
&& export PUBKEY_HASHSUM="ad369a2e9d8b8c30f5a9f2eb131121739b79c78e03fef0f016ea51871a5f78cd4e6257b270dca0ac3be3d1f19d885516" \
&& wget -nv https://files.viva64.com/etc/pubkey.txt -O /tmp/pubkey.txt \
&& echo "${PUBKEY_HASHSUM} /tmp/pubkey.txt" | sha384sum -c \
@@ -35,7 +41,7 @@ RUN set -x \
&& wget -nv "https://files.viva64.com/${PKG_VERSION}.deb" \
&& { debsig-verify ${PKG_VERSION}.deb \
|| echo "WARNING: Some file was just downloaded from the internet without any validation and we are installing it into the system"; } \
- && dpkg -i "${PKG_VERSION}.deb"
+ && dpkg -i "${PKG_VERSION}.deb" )
ENV CCACHE_DIR=/test_output/ccache
diff --git a/docker/test/split_build_smoke_test/Dockerfile b/docker/test/split_build_smoke_test/Dockerfile
index 3cc2f26a507..5f84eb42216 100644
--- a/docker/test/split_build_smoke_test/Dockerfile
+++ b/docker/test/split_build_smoke_test/Dockerfile
@@ -1,5 +1,7 @@
+# rebuild in #33610
# docker build -t clickhouse/split-build-smoke-test .
-FROM clickhouse/binary-builder
+ARG FROM_TAG=latest
+FROM clickhouse/binary-builder:$FROM_TAG
COPY run.sh /run.sh
COPY process_split_build_smoke_test_result.py /
diff --git a/docker/test/stateful/Dockerfile b/docker/test/stateful/Dockerfile
index b6e9fad600c..7c16e69a99b 100644
--- a/docker/test/stateful/Dockerfile
+++ b/docker/test/stateful/Dockerfile
@@ -1,5 +1,7 @@
+# rebuild in #33610
# docker build -t clickhouse/stateful-test .
-FROM clickhouse/stateless-test
+ARG FROM_TAG=latest
+FROM clickhouse/stateless-test:$FROM_TAG
RUN apt-get update -y \
&& env DEBIAN_FRONTEND=noninteractive \
diff --git a/docker/test/stateless/Dockerfile b/docker/test/stateless/Dockerfile
index 05d26924b15..9b7fde7d542 100644
--- a/docker/test/stateless/Dockerfile
+++ b/docker/test/stateless/Dockerfile
@@ -1,11 +1,10 @@
+# rebuild in #33610
# docker build -t clickhouse/stateless-test .
-FROM clickhouse/test-base
+ARG FROM_TAG=latest
+FROM clickhouse/test-base:$FROM_TAG
ARG odbc_driver_url="https://github.com/ClickHouse/clickhouse-odbc/releases/download/v1.1.4.20200302/clickhouse-odbc-1.1.4-Linux.tar.gz"
-RUN echo "deb [trusted=yes] http://repo.mysql.com/apt/ubuntu/ bionic mysql-5.7" >> /etc/apt/sources.list \
- && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8C718D3B5072E1F5
-
RUN apt-get update -y \
&& env DEBIAN_FRONTEND=noninteractive \
apt-get install --yes --no-install-recommends \
@@ -30,7 +29,7 @@ RUN apt-get update -y \
tree \
unixodbc \
wget \
- mysql-client=5.7* \
+ mysql-client=8.0* \
postgresql-client \
sqlite3
@@ -49,10 +48,13 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV NUM_TRIES=1
ENV MAX_RUN_TIME=0
+ARG TARGETARCH
+
# Download Minio-related binaries
-RUN wget 'https://dl.min.io/server/minio/release/linux-amd64/minio' \
+RUN arch=${TARGETARCH:-amd64} \
+ && wget "https://dl.min.io/server/minio/release/linux-${arch}/minio" \
&& chmod +x ./minio \
- && wget 'https://dl.min.io/client/mc/release/linux-amd64/mc' \
+ && wget "https://dl.min.io/client/mc/release/linux-${arch}/mc" \
&& chmod +x ./mc
ENV MINIO_ROOT_USER="clickhouse"
diff --git a/docker/test/stateless_pytest/Dockerfile b/docker/test/stateless_pytest/Dockerfile
index c1e47523f6d..f692f8f39f0 100644
--- a/docker/test/stateless_pytest/Dockerfile
+++ b/docker/test/stateless_pytest/Dockerfile
@@ -1,5 +1,7 @@
+# rebuild in #33610
# docker build -t clickhouse/stateless-pytest .
-FROM clickhouse/test-base
+ARG FROM_TAG=latest
+FROM clickhouse/test-base:$FROM_TAG
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
diff --git a/docker/test/stress/Dockerfile b/docker/test/stress/Dockerfile
index e28d25c9485..4e0b6741061 100644
--- a/docker/test/stress/Dockerfile
+++ b/docker/test/stress/Dockerfile
@@ -1,5 +1,7 @@
+# rebuild in #33610
# docker build -t clickhouse/stress-test .
-FROM clickhouse/stateful-test
+ARG FROM_TAG=latest
+FROM clickhouse/stateful-test:$FROM_TAG
RUN apt-get update -y \
&& env DEBIAN_FRONTEND=noninteractive \
diff --git a/docker/test/stress/run.sh b/docker/test/stress/run.sh
index 2efb62689ff..4387d16ea7c 100755
--- a/docker/test/stress/run.sh
+++ b/docker/test/stress/run.sh
@@ -146,6 +146,7 @@ handle SIGUSR2 nostop noprint pass
handle SIG$RTMIN nostop noprint pass
info signals
continue
+gcore
backtrace full
info locals
info registers
@@ -263,3 +264,10 @@ done
# Write check result into check_status.tsv
clickhouse-local --structure "test String, res String" -q "SELECT 'failure', test FROM table WHERE res != 'OK' order by (lower(test) like '%hung%') LIMIT 1" < /test_output/test_results.tsv > /test_output/check_status.tsv
[ -s /test_output/check_status.tsv ] || echo -e "success\tNo errors found" > /test_output/check_status.tsv
+
+# Core dumps (see gcore)
+# Default filename is 'core.PROCESS_ID'
+for core in core.*; do
+ pigz $core
+ mv $core.gz /output/
+done
diff --git a/docker/test/unit/Dockerfile b/docker/test/unit/Dockerfile
index 20d67773363..b75bfb6661c 100644
--- a/docker/test/unit/Dockerfile
+++ b/docker/test/unit/Dockerfile
@@ -1,5 +1,7 @@
+# rebuild in #33610
# docker build -t clickhouse/unit-test .
-FROM clickhouse/stateless-test
+ARG FROM_TAG=latest
+FROM clickhouse/stateless-test:$FROM_TAG
RUN apt-get install gdb
diff --git a/docker/test/util/Dockerfile b/docker/test/util/Dockerfile
index d9894451528..d9827260acb 100644
--- a/docker/test/util/Dockerfile
+++ b/docker/test/util/Dockerfile
@@ -1,3 +1,4 @@
+# rebuild in #33610
# docker build -t clickhouse/test-util .
FROM ubuntu:20.04
diff --git a/docs/en/development/architecture.md b/docs/en/development/architecture.md
index 44e68d645b7..b696c441374 100644
--- a/docs/en/development/architecture.md
+++ b/docs/en/development/architecture.md
@@ -175,7 +175,7 @@ When we are going to read something from a part in `MergeTree`, we look at `prim
When you `INSERT` a bunch of data into `MergeTree`, that bunch is sorted by primary key order and forms a new part. There are background threads that periodically select some parts and merge them into a single sorted part to keep the number of parts relatively low. That’s why it is called `MergeTree`. Of course, merging leads to “write amplification”. All parts are immutable: they are only created and deleted, but not modified. When SELECT is executed, it holds a snapshot of the table (a set of parts). After merging, we also keep old parts for some time to make a recovery after failure easier, so if we see that some merged part is probably broken, we can replace it with its source parts.
-`MergeTree` is not an LSM tree because it does not contain “memtable” and “log”: inserted data is written directly to the filesystem. This makes it suitable only to INSERT data in batches, not by individual row and not very frequently – about once per second is ok, but a thousand times a second is not. We did it this way for simplicity’s sake, and because we are already inserting data in batches in our applications.
+`MergeTree` is not an LSM tree because it does not contain MEMTABLE and LOG: inserted data is written directly to the filesystem. This behavior makes MergeTree much more suitable to insert data in batches. Therefore frequently inserting small amounts of rows is not ideal for MergeTree. For example, a couple of rows per second is OK, but doing it a thousand times a second is not optimal for MergeTree. However, there is an async insert mode for small inserts to overcome this limitation. We did it this way for simplicity’s sake, and because we are already inserting data in batches in our applications
There are MergeTree engines that are doing additional work during background merges. Examples are `CollapsingMergeTree` and `AggregatingMergeTree`. This could be treated as special support for updates. Keep in mind that these are not real updates because users usually have no control over the time when background merges are executed, and data in a `MergeTree` table is almost always stored in more than one part, not in completely merged form.
diff --git a/docs/en/development/developer-instruction.md b/docs/en/development/developer-instruction.md
index 52fa307333c..ccf6da355b9 100644
--- a/docs/en/development/developer-instruction.md
+++ b/docs/en/development/developer-instruction.md
@@ -158,6 +158,8 @@ While inside the `build` directory, configure your build by running CMake. Befor
export CC=clang CXX=clang++
cmake ..
+If you installed clang using the automatic installation script above, also specify the version of clang installed in the first command, e.g. `export CC=clang-13 CXX=clang++-13`. The clang version will be in the script output.
+
The `CC` variable specifies the compiler for C (short for C Compiler), and `CXX` variable instructs which C++ compiler is to be used for building.
For a faster build, you can resort to the `debug` build type - a build with no optimizations. For that supply the following parameter `-D CMAKE_BUILD_TYPE=Debug`:
diff --git a/docs/en/engines/table-engines/integrations/mongodb.md b/docs/en/engines/table-engines/integrations/mongodb.md
index 52876674475..475416ffb94 100644
--- a/docs/en/engines/table-engines/integrations/mongodb.md
+++ b/docs/en/engines/table-engines/integrations/mongodb.md
@@ -66,4 +66,14 @@ SELECT COUNT() FROM mongo_table;
└─────────┘
```
+You can also adjust connection timeout:
+
+``` sql
+CREATE TABLE mongo_table
+(
+ key UInt64,
+ data String
+) ENGINE = MongoDB('mongo2:27017', 'test', 'simple_table', 'testuser', 'clickhouse', 'connectTimeoutMS=100000');
+```
+
[Original article](https://clickhouse.com/docs/en/engines/table-engines/integrations/mongodb/)
diff --git a/docs/en/sql-reference/functions/geo/h3.md b/docs/en/sql-reference/functions/geo/h3.md
index 048834806d1..2efe980a4cf 100644
--- a/docs/en/sql-reference/functions/geo/h3.md
+++ b/docs/en/sql-reference/functions/geo/h3.md
@@ -380,6 +380,42 @@ Result:
└──────┘
```
+## h3HexAreaKm2 {#h3hexareakm2}
+
+Returns average hexagon area in square kilometers at the given resolution.
+
+**Syntax**
+
+``` sql
+h3HexAreaKm2(resolution)
+```
+
+**Parameter**
+
+- `resolution` — Index resolution. Range: `[0, 15]`. Type: [UInt8](../../../sql-reference/data-types/int-uint.md).
+
+**Returned value**
+
+- Area in square kilometers.
+
+Type: [Float64](../../../sql-reference/data-types/float.md).
+
+**Example**
+
+Query:
+
+``` sql
+SELECT h3HexAreaKm2(13) AS area;
+```
+
+Result:
+
+``` text
+┌──────area─┐
+│ 0.0000439 │
+└───────────┘
+```
+
## h3IndexesAreNeighbors {#h3indexesareneighbors}
Returns whether or not the provided [H3](#h3index) indexes are neighbors.
@@ -704,4 +740,144 @@ Result:
└───────┘
```
+## h3DegsToRads {#h3degstorads}
+
+Converts degrees to radians.
+
+**Syntax**
+
+``` sql
+h3DegsToRads(degrees)
+```
+
+**Parameter**
+
+- `degrees` — Input in degrees. Type: [Float64](../../../sql-reference/data-types/float.md).
+
+**Returned values**
+
+- Radians. Type: [Float64](../../../sql-reference/data-types/float.md).
+
+**Example**
+
+Query:
+
+``` sql
+SELECT h3DegsToRads(180.0) AS radians;
+```
+
+Result:
+
+``` text
+┌───────────radians─┐
+│ 3.141592653589793 │
+└───────────────────┘
+```
+
+## h3RadsToDegs {#h3radstodegs}
+
+Converts radians to degrees.
+
+**Syntax**
+
+``` sql
+h3RadsToDegs(radians)
+```
+
+**Parameter**
+
+- `radians` — Input in radians. Type: [Float64](../../../sql-reference/data-types/float.md).
+
+**Returned values**
+
+- Degrees. Type: [Float64](../../../sql-reference/data-types/float.md).
+
+**Example**
+
+Query:
+
+``` sql
+SELECT h3RadsToDegs(3.141592653589793) AS degrees;
+```
+
+Result:
+
+``` text
+┌─degrees─┐
+│ 180 │
+└─────────┘
+```
+
+## h3CellAreaM2 {#h3cellaream2}
+
+Returns the exact area of a specific cell in square meters corresponding to the given input H3 index.
+
+**Syntax**
+
+``` sql
+h3CellAreaM2(index)
+```
+
+**Parameter**
+
+- `index` — Hexagon index number. Type: [UInt64](../../../sql-reference/data-types/int-uint.md).
+
+**Returned value**
+
+- Cell area in square meters.
+
+Type: [Float64](../../../sql-reference/data-types/float.md).
+
+**Example**
+
+Query:
+
+``` sql
+SELECT h3CellAreaM2(579205133326352383) AS area;
+```
+
+Result:
+
+``` text
+┌───────────────area─┐
+│ 4106166334463.9233 │
+└────────────────────┘
+```
+
+## h3CellAreaRads2 {#h3cellarearads2}
+
+Returns the exact area of a specific cell in square radians corresponding to the given input H3 index.
+
+**Syntax**
+
+``` sql
+h3CellAreaRads2(index)
+```
+
+**Parameter**
+
+- `index` — Hexagon index number. Type: [UInt64](../../../sql-reference/data-types/int-uint.md).
+
+**Returned value**
+
+- Cell area in square radians.
+
+Type: [Float64](../../../sql-reference/data-types/float.md).
+
+**Example**
+
+Query:
+
+``` sql
+SELECT h3CellAreaRads2(579205133326352383) AS area;
+```
+
+Result:
+
+``` text
+┌────────────────area─┐
+│ 0.10116268528089567 │
+└─────────────────────┘
+```
+
[Original article](https://clickhouse.com/docs/en/sql-reference/functions/geo/h3)
diff --git a/docs/en/sql-reference/statements/optimize.md b/docs/en/sql-reference/statements/optimize.md
index 4054f373cc1..30899cc2940 100644
--- a/docs/en/sql-reference/statements/optimize.md
+++ b/docs/en/sql-reference/statements/optimize.md
@@ -16,7 +16,7 @@ This query tries to initialize an unscheduled merge of data parts for tables.
OPTIMIZE TABLE [db.]name [ON CLUSTER cluster] [PARTITION partition | PARTITION ID 'partition_id'] [FINAL] [DEDUPLICATE [BY expression]]
```
-The `OPTMIZE` query is supported for [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) family, the [MaterializedView](../../engines/table-engines/special/materializedview.md) and the [Buffer](../../engines/table-engines/special/buffer.md) engines. Other table engines aren’t supported.
+The `OPTIMIZE` query is supported for [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) family, the [MaterializedView](../../engines/table-engines/special/materializedview.md) and the [Buffer](../../engines/table-engines/special/buffer.md) engines. Other table engines aren’t supported.
When `OPTIMIZE` is used with the [ReplicatedMergeTree](../../engines/table-engines/mergetree-family/replication.md) family of table engines, ClickHouse creates a task for merging and waits for execution on all replicas (if the [replication_alter_partitions_sync](../../operations/settings/settings.md#replication-alter-partitions-sync) setting is set to `2`) or on current replica (if the [replication_alter_partitions_sync](../../operations/settings/settings.md#replication-alter-partitions-sync) setting is set to `1`).
diff --git a/docs/zh/engines/table-engines/integrations/kafka.md b/docs/zh/engines/table-engines/integrations/kafka.md
index 6784b366e85..ee6bbbe67fc 100644
--- a/docs/zh/engines/table-engines/integrations/kafka.md
+++ b/docs/zh/engines/table-engines/integrations/kafka.md
@@ -132,4 +132,33 @@ Kafka 特性:
有关详细配置选项列表,请参阅 [librdkafka配置参考](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md)。在 ClickHouse 配置中使用下划线 (`_`) ,并不是使用点 (`.`)。例如,`check.crcs=true` 将是 `true`。
+### Kerberos 支持 {#kafka-kerberos-zhi-chi}
+
+对于使用了kerberos的kafka, 将security_protocol 设置为sasl_plaintext就够了,如果kerberos的ticket是由操作系统获取和缓存的。
+clickhouse也支持自己使用keyfile的方式来维护kerbros的凭证。配置sasl_kerberos_service_name、sasl_kerberos_keytab、sasl_kerberos_principal三个子元素就可以。
+
+示例:
+
+``` xml
+
+
+ SASL_PLAINTEXT
+ /home/kafkauser/kafkauser.keytab
+ kafkauser/kafkahost@EXAMPLE.COM
+
+```
+
+## 虚拟列
+
+- `_topic` – Kafka 主题。
+- `_key` – 信息的键。
+- `_offset` – 消息的偏移量。
+- `_timestamp ` – 消息的时间戳。
+- `_partition ` – Kafka 主题的分区。
+
+**另请参阅**
+
+- [虚拟列](../../../engines/table-engines/index.md#table_engines-virtual_columns)
+- [后台消息代理调度池大小](../../../operations/settings/settings.md#background_message_broker_schedule_pool_size)
+
[原始文章](https://clickhouse.com/docs/zh/operations/table_engines/kafka/)
diff --git a/programs/client/Client.cpp b/programs/client/Client.cpp
index b1e1345cf71..a5e4517824d 100644
--- a/programs/client/Client.cpp
+++ b/programs/client/Client.cpp
@@ -1,23 +1,17 @@
#include
#include
-#include
#include