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
4 changes: 2 additions & 2 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4173,7 +4173,7 @@ jobs:

RegressionTestsRelease:
needs: [config_workflow, build_amd_release]
if: ${{ !failure() && !cancelled() && !contains(github.event.pull_request.body, '[x] <!---ci_exclude_regression')}}
if: ${{ !failure() && !cancelled() && !contains(fromJson(needs.config_workflow.outputs.data).custom_data.ci_exclude_tags, 'regression')}}
uses: ./.github/workflows/regression.yml
secrets: inherit
with:
Expand All @@ -4185,7 +4185,7 @@ jobs:
workflow_config: ${{ needs.config_workflow.outputs.data }}
RegressionTestsAarch64:
needs: [config_workflow, build_arm_release]
if: ${{ !failure() && !cancelled() && !contains(github.event.pull_request.body, '[x] <!---ci_exclude_regression') && !contains(github.event.pull_request.body, '[x] <!---ci_exclude_aarch64')}}
if: ${{ !failure() && !cancelled() && !contains(fromJson(needs.config_workflow.outputs.data).custom_data.ci_exclude_tags, 'regression') && !contains(fromJson(needs.config_workflow.outputs.data).custom_data.ci_exclude_tags, 'aarch64')}}
uses: ./.github/workflows/regression.yml
secrets: inherit
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4129,7 +4129,7 @@ jobs:

RegressionTestsRelease:
needs: [config_workflow, build_amd_release]
if: ${{ !failure() && !cancelled() && !contains(github.event.pull_request.body, '[x] <!---ci_exclude_regression')}}
if: ${{ !failure() && !cancelled() && !contains(fromJson(needs.config_workflow.outputs.data).custom_data.ci_exclude_tags, 'regression')}}
uses: ./.github/workflows/regression.yml
secrets: inherit
with:
Expand All @@ -4141,7 +4141,7 @@ jobs:
workflow_config: ${{ needs.config_workflow.outputs.data }}
RegressionTestsAarch64:
needs: [config_workflow, build_arm_release]
if: ${{ !failure() && !cancelled() && !contains(github.event.pull_request.body, '[x] <!---ci_exclude_regression') && !contains(github.event.pull_request.body, '[x] <!---ci_exclude_aarch64')}}
if: ${{ !failure() && !cancelled() && !contains(fromJson(needs.config_workflow.outputs.data).custom_data.ci_exclude_tags, 'regression') && !contains(fromJson(needs.config_workflow.outputs.data).custom_data.ci_exclude_tags, 'aarch64')}}
uses: ./.github/workflows/regression.yml
secrets: inherit
with:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ jobs:
input: ${{ inputs.runner_type }}

Common:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 'common')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -210,6 +213,9 @@ jobs:
path: ${{ env.artifact_paths}}

AggregateFunctions:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 'aggregate_functions')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -275,6 +281,9 @@ jobs:
name: ${{ env.SUITE }}-${{ matrix.PART }}-${{ inputs.arch }}-artifacts
path: ${{ env.artifact_paths}}
Alter:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 'alter')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -347,6 +356,9 @@ jobs:
path: ${{ env.artifact_paths}}

Benchmark:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 'benchmark')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -420,6 +432,9 @@ jobs:
path: ${{ env.artifact_paths }}

ClickHouseKeeper:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 'clickhouse_keeper')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -489,6 +504,9 @@ jobs:
path: ${{ env.artifact_paths }}

Iceberg:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 'iceberg')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -560,6 +578,9 @@ jobs:
name: ${{ env.SUITE }}-${{ matrix.PART }}-${{ inputs.arch }}-artifacts
path: ${{ env.artifact_paths}}
LDAP:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 'ldap')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -624,6 +645,9 @@ jobs:
path: ${{ env.artifact_paths }}

Parquet:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 'parquet')
needs: [runner_labels_setup]
runs-on: ${{ fromJson(needs.runner_labels_setup.outputs.runner_labels) }}
timeout-minutes: ${{ inputs.timeout_minutes }}
Expand Down Expand Up @@ -684,6 +708,9 @@ jobs:
path: ${{ env.artifact_paths }}

ParquetS3:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 'parquet')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -755,6 +782,9 @@ jobs:


RBAC:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 'rbac')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -820,6 +850,9 @@ jobs:
name: ${{ env.SUITE }}-${{ matrix.PART }}-${{ inputs.arch }}-artifacts
path: ${{ env.artifact_paths}}
SSLServer:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 'ssl_server')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -886,6 +919,9 @@ jobs:
path: ${{ env.artifact_paths}}

S3:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 's3')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -968,6 +1004,9 @@ jobs:
path: ${{ env.artifact_paths}}

TieredStorage:
if: |
fromJson(inputs.workflow_config).custom_data.ci_regression_jobs[0] == null ||
contains(fromJson(inputs.workflow_config).custom_data.ci_regression_jobs, 'tiered_storage')
strategy:
fail-fast: false
matrix:
Expand Down
15 changes: 15 additions & 0 deletions ci/jobs/scripts/workflow_hooks/regression_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import re

from ci.praktika.info import Info

def get_ci_regression_jobs(pr_body):
pattern = r"(#|- \[x\] +<!---ci_regression_)([|\w]+)"
matches = []
for match in re.findall(pattern, pr_body):
matches.extend(match[-1].split("|"))
return matches

if __name__ == "__main__":
info = Info()

info.store_kv_data("ci_regression_jobs", get_ci_regression_jobs(info.pr_body))
11 changes: 11 additions & 0 deletions ci/jobs/scripts/workflow_hooks/store_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import copy
import re

from ci.defs.job_configs import JobConfigs
from ci.jobs.scripts.clickhouse_version import CHVersion
Expand All @@ -7,6 +8,13 @@
from ci.praktika.info import Info
from ci.praktika.utils import Shell

def get_ci_exclude_tags(pr_body):
pattern = r"(#|- \[x\] +<!---ci_exclude_)([|\w]+)"
matches = []
for match in re.findall(pattern, pr_body):
matches.extend(match[-1].split("|"))
return matches

if __name__ == "__main__":
info = Info()

Expand All @@ -23,6 +31,9 @@
digest = Digest().calc_job_digest(some_build_job, {}, {}).split("-")[0]
info.store_kv_data("build_digest", digest)

# store ci exclude tags
info.store_kv_data("ci_exclude_tags", get_ci_exclude_tags(info.pr_body))

if info.git_branch == "master" and info.repo_name == "ClickHouse/ClickHouse":
# store previous commits for perf tests
raw = Shell.get_output(
Expand Down
4 changes: 2 additions & 2 deletions ci/praktika/yaml_additional_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class AltinityWorkflowTemplates:
"Regression": r"""
RegressionTestsRelease:
needs: [config_workflow, build_amd_release]
if: ${{ !failure() && !cancelled() && !contains(github.event.pull_request.body, '[x] <!---ci_exclude_regression')}}
if: ${{ !failure() && !cancelled() && !contains(fromJson(needs.config_workflow.outputs.data).custom_data.ci_exclude_tags, 'regression')}}
uses: ./.github/workflows/regression.yml
secrets: inherit
with:
Expand All @@ -75,7 +75,7 @@ class AltinityWorkflowTemplates:
workflow_config: ${{ needs.config_workflow.outputs.data }}
RegressionTestsAarch64:
needs: [config_workflow, build_arm_release]
if: ${{ !failure() && !cancelled() && !contains(github.event.pull_request.body, '[x] <!---ci_exclude_regression') && !contains(github.event.pull_request.body, '[x] <!---ci_exclude_aarch64')}}
if: ${{ !failure() && !cancelled() && !contains(fromJson(needs.config_workflow.outputs.data).custom_data.ci_exclude_tags, 'regression') && !contains(fromJson(needs.config_workflow.outputs.data).custom_data.ci_exclude_tags, 'aarch64')}}
uses: ./.github/workflows/regression.yml
secrets: inherit
with:
Expand Down
1 change: 1 addition & 0 deletions ci/workflows/master.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
pre_hooks=[
"python3 ./ci/jobs/scripts/workflow_hooks/store_data.py",
"python3 ./ci/jobs/scripts/workflow_hooks/version_log.py",
"python3 ./ci/jobs/scripts/workflow_hooks/regression_config.py",
# "python3 ./ci/jobs/scripts/workflow_hooks/merge_sync_pr.py", # NOTE (strtgbb): we don't do this
],
workflow_filter_hooks=[should_skip_job],
Expand Down
1 change: 1 addition & 0 deletions ci/workflows/pull_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"python3 ./ci/jobs/scripts/workflow_hooks/version_log.py",
# "python3 ./ci/jobs/scripts/workflow_hooks/quick_sync.py", # NOTE (strtgbb): we don't do this
# "python3 ./ci/jobs/scripts/workflow_hooks/team_notifications.py",
"python3 ./ci/jobs/scripts/workflow_hooks/regression_config.py",
],
workflow_filter_hooks=[should_skip_job],
post_hooks=[
Expand Down
Loading