Skip to content
Open
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
12 changes: 8 additions & 4 deletions .github/workflows/docker_test_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: Build docker images
description: set latest tag for resulting multiarch manifest
required: false
type: boolean
default: false
default: false
secrets:
secret_envs:
description: if given, it's passed to the environments
Expand All @@ -26,10 +26,14 @@ env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
ROBOT_TOKEN: ${{ secrets.GITHUB_TOKEN }}


jobs:
DockerBuildAarch64:
runs-on: [self-hosted, altinity-on-demand, altinity-type-cax41, altinity-image-arm-snapshot-22.04-arm, altinity-startup-snapshot, altinity-setup-none]
runs-on: [self-hosted, altinity-on-demand, altinity-style-checker-aarch64]
if: |
!failure() && !cancelled() && toJson(fromJson(inputs.data).docker_data.missing_aarch64) != '[]'
steps:
Expand All @@ -44,7 +48,7 @@ jobs:
--image-tags '${{ toJson(fromJson(inputs.data).docker_data.images) }}' \
--missing-images '${{ toJson(fromJson(inputs.data).docker_data.missing_aarch64) }}'
DockerBuildAmd64:
runs-on: [self-hosted, altinity-on-demand, altinity-type-cpx51, altinity-image-x86-snapshot-22.04-amd, altinity-startup-snapshot, altinity-setup-none]
runs-on: [self-hosted, altinity-on-demand, altinity-style-checker]
if: |
!failure() && !cancelled() && toJson(fromJson(inputs.data).docker_data.missing_amd64) != '[]'
steps:
Expand All @@ -60,7 +64,7 @@ jobs:
--missing-images '${{ toJson(fromJson(inputs.data).docker_data.missing_amd64) }}'
DockerMultiArchManifest:
needs: [DockerBuildAmd64, DockerBuildAarch64]
runs-on: [self-hosted, altinity-on-demand, altinity-type-cpx51, altinity-image-x86-snapshot-22.04-amd, altinity-startup-snapshot, altinity-setup-none]
runs-on: [self-hosted, altinity-on-demand, altinity-style-checker]
if: |
!failure() && !cancelled() && (toJson(fromJson(inputs.data).docker_data.missing_multi) != '[]' || inputs.set_latest)
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/grype_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
TAG_SUFFIX: ${{ inputs.tag-suffix }}
SPECIFIED_VERSION: ${{ inputs.version }}
run: |
python3 ./tests/ci/version_helper.py | tee /tmp/version_info
python3 ./tests/ci/version_helper.py | grep = | tee /tmp/version_info
source /tmp/version_info
if [ -z "$SPECIFIED_VERSION" ]; then
VERSION=$CLICKHOUSE_VERSION_STRING
Expand Down
193 changes: 170 additions & 23 deletions .github/workflows/regression.yml

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions .github/workflows/release_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ jobs:
secrets: inherit
with:
test_name: Integration tests (aarch64)
runner_type: altinity-on-demand, altinity-type-cax41, altinity-image-arm-snapshot-22.04-arm, altinity-startup-snapshot, altinity-setup-none
runner_type: altinity-on-demand, altinity-func-tester-aarch64
data: ${{ needs.RunConfig.outputs.data }}
#############################################################################################
####################################### AST FUZZERS #########################################
Expand All @@ -504,7 +504,7 @@ jobs:
secrets: inherit
with:
test_name: AST fuzzer (asan)
runner_type: altinity-on-demand, altinity-type-cpx51, altinity-image-x86-snapshot-22.04-amd, altinity-startup-snapshot, altinity-setup-none
runner_type: altinity-on-demand, altinity-func-tester
data: ${{ needs.RunConfig.outputs.data }}
ASTFuzzerTsan:
needs: [RunConfig, BuilderDebTsan]
Expand All @@ -513,7 +513,7 @@ jobs:
secrets: inherit
with:
test_name: AST fuzzer (tsan)
runner_type: altinity-on-demand, altinity-type-cpx51, altinity-image-x86-snapshot-22.04-amd, altinity-startup-snapshot, altinity-setup-none
runner_type: altinity-on-demand, altinity-func-tester
data: ${{ needs.RunConfig.outputs.data }}
ASTFuzzerMsan:
needs: [RunConfig, BuilderDebMsan]
Expand All @@ -522,7 +522,7 @@ jobs:
secrets: inherit
with:
test_name: AST fuzzer (msan)
runner_type: altinity-on-demand, altinity-type-cpx51, altinity-image-x86-snapshot-22.04-amd, altinity-startup-snapshot, altinity-setup-none
runner_type: altinity-on-demand, altinity-func-tester
data: ${{ needs.RunConfig.outputs.data }}
ASTFuzzerUBsan:
needs: [RunConfig, BuilderDebUBsan]
Expand All @@ -531,7 +531,7 @@ jobs:
secrets: inherit
with:
test_name: AST fuzzer (ubsan)
runner_type: altinity-on-demand, altinity-type-cpx51, altinity-image-x86-snapshot-22.04-amd, altinity-startup-snapshot, altinity-setup-none
runner_type: altinity-on-demand, altinity-func-tester
data: ${{ needs.RunConfig.outputs.data }}
ASTFuzzerDebug:
needs: [RunConfig, BuilderDebDebug]
Expand All @@ -540,7 +540,7 @@ jobs:
secrets: inherit
with:
test_name: AST fuzzer (debug)
runner_type: altinity-on-demand, altinity-type-cpx51, altinity-image-x86-snapshot-22.04-amd, altinity-startup-snapshot, altinity-setup-none
runner_type: altinity-on-demand, altinity-func-tester
data: ${{ needs.RunConfig.outputs.data }}
#############################################################################################
##################################### REGRESSION TESTS ######################################
Expand All @@ -552,7 +552,7 @@ jobs:
secrets: inherit
with:
runner_type: altinity-on-demand, altinity-regression-tester
commit: e3c00be97a045aa04e9d1a6ec50cc64f4c387b70
commit: fd33d9e73ebd14392d601d87902ddf0e7c90709c
arch: release
build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout_minutes: 300
Expand All @@ -563,7 +563,7 @@ jobs:
secrets: inherit
with:
runner_type: altinity-on-demand, altinity-regression-tester-aarch64
commit: e3c00be97a045aa04e9d1a6ec50cc64f4c387b70
commit: fd33d9e73ebd14392d601d87902ddf0e7c90709c
arch: aarch64
build_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout_minutes: 300
Expand Down
5 changes: 4 additions & 1 deletion docker/test/fuzzer/run-fuzzer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ BASE_REF=${BASE_REF:="master"}
function git_clone_with_retry
{
for _ in 1 2 3 4; do
if git clone --depth 1 https://github.com/Altinity/ClickHouse.git -b "${BASE_REF}" -- "$1" 2>&1 | ts '%Y-%m-%d %H:%M:%S';then
# Strip refs/tags/ prefix if present, as --branch expects just the tag/branch name
local ref_name="${BASE_REF#refs/tags/}"

if git clone --depth 1 https://github.com/Altinity/ClickHouse.git --branch "${ref_name}" -- "$1" 2>&1 | ts '%Y-%m-%d %H:%M:%S';then
return 0
else
sleep 0.5
Expand Down
4 changes: 4 additions & 0 deletions docker/test/stress/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ azurite-blob --blobHost 0.0.0.0 --blobPort 10000 --debug /azurite_log &

config_logs_export_cluster /etc/clickhouse-server/config.d/system_logs_export.yaml

# NOTE(strtgbb): Trying to avoid errors that may be related to running out of resources
export CLICKHOUSE_MAX_THREADS=8
export CLICKHOUSE_MAX_CONCURRENT_QUERIES=4

start_server

setup_logs_replication
Expand Down
24 changes: 21 additions & 3 deletions tests/broken_tests.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
{
"02700_s3_part_INT_MAX": {
"reason": "Fails on asan"
"reason": "INVESTIGATE: Fails on asan"
},
"02815_no_throw_in_simple_queries": {
"reason": "Fails on asan,msan,tsan,debug,Aarch64"
"reason": "INVESTIGATE: Fails on asan,msan,tsan,debug,Aarch64"
},
"03206_no_exceptions_clickhouse_local": {
"reason": "Fails on asan,msan,tsan,debug,Aarch64"
"reason": "INVESTIGATE: Fails on asan,msan,tsan,debug,Aarch64"
},
"02479_race_condition_between_insert_and_droppin_mv": {
"reason": "INVESTIGATE: Unstable on ubsan"
},
"01825_new_type_json_ghdata": {
"reason": "INVESTIGATE: Sometime out of memory on msan"
},
"00159_parallel_formatting_http": {
"reason": "INVESTIGATE: Unstable on tsan"
},
"02941_variant_type_3": {
"reason": "INVESTIGATE: Memory limit exceeded on asan"
},
"03008_local_plain_rewritable": {
"reason": "INVESTIGATE: Memory limit exceeded on asan"
},
"02490_benchmark_max_consecutive_errors": {
"reason": "INVESTIGATE: Unstable on msan"
}
}
18 changes: 10 additions & 8 deletions tests/ci/ci_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ class CI:
required_builds=[BuildNames.PACKAGE_ASAN]
),
JobNames.STATEFUL_TEST_TSAN: CommonJobConfigs.STATEFUL_TEST.with_properties(
required_builds=[BuildNames.PACKAGE_TSAN]
required_builds=[BuildNames.PACKAGE_TSAN],
timeout=2 * 3600,
),
JobNames.STATEFUL_TEST_MSAN: CommonJobConfigs.STATEFUL_TEST.with_properties(
required_builds=[BuildNames.PACKAGE_MSAN]
Expand Down Expand Up @@ -397,18 +398,19 @@ class CI:
required_builds=[BuildNames.PACKAGE_DEBUG], pr_only=True
),
JobNames.INTEGRATION_TEST_ASAN: CommonJobConfigs.INTEGRATION_TEST.with_properties(
required_builds=[BuildNames.PACKAGE_ASAN], num_batches=4,
timeout=9000, # the job timed out with default value (7200)
required_builds=[BuildNames.PACKAGE_ASAN],
num_batches=4,
timeout=3 * 3600, # the job timed out with default value (7200)
),
JobNames.INTEGRATION_TEST_ASAN_OLD_ANALYZER: CommonJobConfigs.INTEGRATION_TEST.with_properties(
required_builds=[BuildNames.PACKAGE_ASAN],
num_batches=6,
timeout=12000, # the job timed out with default value (7200)
timeout=4 * 3600, # the job timed out with default value (7200)
),
JobNames.INTEGRATION_TEST_TSAN: CommonJobConfigs.INTEGRATION_TEST.with_properties(
required_builds=[BuildNames.PACKAGE_TSAN],
num_batches=6,
timeout=12000, # the job timed out with default value (7200)
timeout=4 * 3600, # the job timed out with default value (7200)
),
JobNames.INTEGRATION_TEST_ARM: CommonJobConfigs.INTEGRATION_TEST.with_properties(
required_builds=[BuildNames.PACKAGE_AARCH64],
Expand All @@ -419,7 +421,7 @@ class CI:
JobNames.INTEGRATION_TEST: CommonJobConfigs.INTEGRATION_TEST.with_properties(
required_builds=[BuildNames.PACKAGE_RELEASE],
num_batches=4,
#release_only=True,
# release_only=True,
timeout=12000, # the job timed out with default value (7200)
),
JobNames.INTEGRATION_TEST_FLAKY: CommonJobConfigs.INTEGRATION_TEST.with_properties(
Expand Down Expand Up @@ -558,11 +560,11 @@ class CI:
),
JobNames.SIGN_RELEASE: JobConfig(
required_builds=[BuildNames.PACKAGE_RELEASE],
runner_type=Runners.STYLE_CHECKER
runner_type=Runners.STYLE_CHECKER,
),
JobNames.SIGN_AARCH64: JobConfig(
required_builds=[BuildNames.PACKAGE_AARCH64],
runner_type=Runners.STYLE_CHECKER_ARM
runner_type=Runners.STYLE_CHECKER_ARM,
),
}

Expand Down
6 changes: 1 addition & 5 deletions tests/ci/s3_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
S3_URL,
)

sensitive_var_pattern = re.compile(
r"\b[A-Z_]*(?<!WRONG_)(SECRET|PASSWORD|ACCESS_KEY|TOKEN)[A-Z_]*\b(?!%)(?!=clickhouse$)(?!=minio)(?!: \*{3}$)(?! '\[HIDDEN\]')"
)
sensitive_var_pattern = re.compile(r"[A-Z_]*(SECRET|PASSWORD|KEY|TOKEN|AZURE)[A-Z_]*")
sensitive_strings = {
var: value for var, value in os.environ.items() if sensitive_var_pattern.match(var)
}
Expand All @@ -41,8 +39,6 @@ def clean_line(line):

matches = []
for line_number, line in enumerate(file_content.splitlines(), start=1):
for match in sensitive_var_pattern.finditer(line):
matches.append((file_name, line_number, clean_line(line)))
for name, value in sensitive_strings.items():
if value in line:
matches.append((file_name, line_number, clean_line(line)))
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/compose/docker_compose_azurite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '2.3'

services:
azurite1:
image: mcr.microsoft.com/azure-storage/azurite
image: altinityinfra/azurite:3.35.0 # NOTE(strtgbb): Use mirror to avoid access denied error from mcr.microsoft.com
ports:
- "${AZURITE_PORT}:${AZURITE_PORT}"
volumes:
Expand Down
Loading