From 0904ede3029f336f6e65be43a18c69f7bf7d8a42 Mon Sep 17 00:00:00 2001
From: strtgbb <146047128+strtgbb@users.noreply.github.com>
Date: Thu, 25 Sep 2025 10:06:44 -0400
Subject: [PATCH 001/362] Rebase CICD on v25.8.7.3-lts
---
.../10_project-antalya-bug-report.md | 36 +
.github/ISSUE_TEMPLATE/10_question.yaml | 20 -
.../ISSUE_TEMPLATE/20_feature-request.yaml | 38 -
.../20_project-antalya-feature-request.md | 20 +
.../30_project-antalya-question.md | 16 +
.../30_unexpected-behaviour.yaml | 55 -
.../35_incomplete_implementation.yaml | 50 -
.../40_altinity-stable-bug-report.md | 50 +
.../ISSUE_TEMPLATE/45_usability-issue.yaml | 48 -
.../50_altinity-stable-question.md | 16 +
.github/ISSUE_TEMPLATE/50_build-issue.yaml | 50 -
.../60_documentation-issue.yaml | 26 -
.../ISSUE_TEMPLATE/70_performance-issue.yaml | 48 -
.../80_backward-compatibility.yaml | 48 -
.github/ISSUE_TEMPLATE/85_bug-report.yaml | 76 -
.github/ISSUE_TEMPLATE/90_fuzzing-report.yaml | 26 -
.../ISSUE_TEMPLATE/95_sanitizer-report.yaml | 26 -
.../96_installation-issues.yaml | 46 -
.github/PULL_REQUEST_TEMPLATE.md | 31 +-
.github/actionlint.yml | 10 +-
.../actions/create_workflow_report/action.yml | 52 +
.../ci_run_report.html.jinja | 272 ++
.../create_workflow_report.py | 864 +++++
.../workflow_report_hook.sh | 7 +
.github/actions/docker_setup/action.yml | 32 +
.github/actions/runner_setup/action.yml | 19 +
.github/grype/parse_vulnerabilities_grype.py | 32 +
.github/grype/run_grype_scan.sh | 18 +
.../grype/transform_and_upload_results_s3.sh | 20 +
.github/retry.sh | 22 +
.github/workflows/README.md | 13 +
.github/workflows/backport_branches.yml | 447 ++-
.github/workflows/cancel.yml | 19 +
.github/workflows/cherry_pick.yml | 2 +-
.github/workflows/compare_fails.yml | 110 +
.github/workflows/create_release.yml | 2 +-
.github/workflows/docker_publish.yml | 150 +
.github/workflows/grype_scan.yml | 154 +
.github/workflows/init_praktika.yml | 27 +
.github/workflows/master.yml | 3092 ++++++++---------
.github/workflows/merge_queue.yml | 121 +-
.github/workflows/nightly_fuzzers.yml | 67 +-
.github/workflows/nightly_jepsen.yml | 67 +-
.github/workflows/nightly_statistics.yml | 31 +-
.github/workflows/pull_request.yml | 3007 ++++++++--------
.github/workflows/regression.yml | 1040 ++++++
.github/workflows/release_branches.yml | 574 ++-
.github/workflows/repo-sanity-checks.yml | 150 +
.github/workflows/reusable_sign.yml | 166 +
.github/workflows/reusable_simple_job.yml | 2 +-
.github/workflows/scheduled_runs.yml | 55 +
.github/workflows/sign_and_release.yml | 567 +++
.github/workflows/vectorsearchstress.yml | 40 +-
ci/defs/defs.py | 203 +-
ci/defs/job_configs.py | 119 +-
ci/docker/binary-builder/Dockerfile | 8 +-
ci/docker/cctools/Dockerfile | 4 +-
ci/docker/compatibility/centos/Dockerfile | 2 +-
ci/docker/compatibility/ubuntu/Dockerfile | 2 +-
ci/docker/docs-builder/Dockerfile | 2 +-
ci/docker/fasttest/Dockerfile | 4 +-
ci/docker/fuzzer/Dockerfile | 2 +-
ci/docker/integration/arrowflight/Dockerfile | 2 +-
ci/docker/integration/base/Dockerfile | 8 +-
.../clickhouse_with_hms_catalog/Dockerfile | 2 +-
.../clickhouse_with_unity_catalog/Dockerfile | 2 +-
.../integration/helper_container/Dockerfile | 2 +-
ci/docker/integration/kerberos_kdc/Dockerfile | 2 +-
.../mysql_dotnet_client/Dockerfile | 2 +-
.../mysql_golang_client/Dockerfile | 2 +-
.../integration/mysql_java_client/Dockerfile | 2 +-
.../integration/mysql_js_client/Dockerfile | 2 +-
.../integration/mysql_php_client/Dockerfile | 2 +-
.../postgresql_java_client/Dockerfile | 2 +-
ci/docker/integration/resolver/Dockerfile | 2 +-
ci/docker/integration/runner/Dockerfile | 8 +-
.../integration/runner/dockerd-entrypoint.sh | 4 +-
ci/docker/integration/s3_proxy/Dockerfile | 2 +-
ci/docker/keeper-jepsen-test/Dockerfile | 2 +-
ci/docker/libfuzzer/Dockerfile | 2 +-
ci/docker/performance-comparison/Dockerfile | 4 +-
ci/docker/server-jepsen-test/Dockerfile | 2 +-
ci/docker/sqlancer-test/Dockerfile | 2 +-
ci/docker/stateless-test/Dockerfile | 8 +-
ci/docker/stress-test/Dockerfile | 2 +-
ci/docker/style-test/Dockerfile | 2 +-
ci/docker/test-base/Dockerfile | 6 +-
ci/jobs/build_clickhouse.py | 21 +-
ci/jobs/clickbench.py | 4 +-
ci/jobs/functional_tests.py | 32 +-
ci/jobs/install_check.py | 9 +-
ci/jobs/integration_test_check.py | 6 +-
ci/jobs/scripts/clickhouse_proc.py | 25 +-
ci/jobs/scripts/clickhouse_version.py | 73 +-
ci/jobs/scripts/functional_tests_results.py | 53 +-
ci/jobs/scripts/fuzzer/run-fuzzer.sh | 7 +-
ci/jobs/scripts/integration_tests_runner.py | 136 +-
ci/jobs/scripts/workflow_hooks/filter_job.py | 17 +
ci/praktika/_environment.py | 39 +-
ci/praktika/execution/__main__.py | 4 +
ci/praktika/execution/execution_settings.py | 2 +-
ci/praktika/gh.py | 4 +-
ci/praktika/hook_cache.py | 2 +-
ci/praktika/job.py | 2 +-
ci/praktika/native_jobs.py | 21 +-
ci/praktika/result.py | 2 +
ci/praktika/runner.py | 12 +
ci/praktika/s3.py | 41 +
ci/praktika/yaml_additional_templates.py | 131 +
ci/praktika/yaml_generator.py | 51 +-
ci/settings/altinity_overrides.py | 55 +
ci/settings/settings.py | 8 +-
ci/workflows/VectorSearchStress.py | 2 +-
ci/workflows/backport_branches.py | 1 +
ci/workflows/master.py | 33 +-
ci/workflows/merge_queue.py | 4 +-
ci/workflows/pull_request.py | 63 +-
ci/workflows/release_branches.py | 1 +
cmake/autogenerated_versions.txt | 9 +-
cmake/version.cmake | 9 +-
docker/keeper/Dockerfile | 2 +-
docker/server/README.md | 2 +-
docker/server/README.src/github-repo | 2 +-
docker/server/README.src/license.md | 2 +-
docker/server/README.src/logo.svg | 56 +-
docker/server/README.src/maintainer.md | 2 +-
docker/test/upgrade/Dockerfile | 29 +
packages/clickhouse-client.yaml | 6 +-
packages/clickhouse-common-static-dbg.yaml | 6 +-
packages/clickhouse-common-static.yaml | 6 +-
packages/clickhouse-keeper-dbg.yaml | 6 +-
packages/clickhouse-keeper.yaml | 6 +-
packages/clickhouse-server.yaml | 6 +-
programs/server/binary.html | 5 +-
programs/server/dashboard.html | 2 +-
programs/server/index.html | 109 +-
programs/server/merges.html | 2 +-
programs/server/play.html | 46 +-
src/Common/SignalHandlers.cpp | 6 +-
tests/broken_tests.json | 420 +++
tests/ci/changelog.py | 56 +-
tests/ci/ci.py | 6 +-
tests/ci/ci_buddy.py | 4 +-
tests/ci/ci_cache.py | 3 +-
tests/ci/ci_config.py | 24 +-
tests/ci/ci_definitions.py | 45 +-
tests/ci/ci_fuzzer_check.py | 3 +-
tests/ci/clickhouse_helper.py | 18 +-
tests/ci/commit_status_helper.py | 9 +-
tests/ci/compatibility_check.py | 4 +-
tests/ci/create_release.py | 2 +-
tests/ci/docker_images_helper.py | 7 +-
tests/ci/docker_server.py | 13 +-
tests/ci/env_helper.py | 17 +-
tests/ci/get_robot_token.py | 14 +-
tests/ci/git_helper.py | 44 +-
tests/ci/jepsen_check.py | 4 +-
tests/ci/libfuzzer_test_check.py | 2 +-
tests/ci/pr_info.py | 26 +-
.../packaging/ansible/inventory/localhost.yml | 73 +
.../roles/get_cloudfront_info/tasks/main.yml | 34 +
.../ansible/roles/publish_pkgs/tasks/main.yml | 98 +
.../roles/update_bin_repo/tasks/main.yml | 52 +
.../roles/update_deb_repo/tasks/main.yml | 61 +
.../templates/apt-ftparchive-stable.conf | 6 +
.../templates/apt-ftparchive.conf | 17 +
.../roles/update_rpm_repo/tasks/main.yml | 51 +
.../roles/update_rpm_repo/templates/repo.j2 | 7 +
.../update_rpm_repo/templates/rpmmacros.j2 | 1 +
.../roles/update_tar_repo/tasks/main.yml | 61 +
.../packaging/ansible/sign-and-release.yml | 8 +
.../release/packaging/dirindex/dirindexgen.py | 122 +
.../packaging/static/bootstrap.bundle.min.js | 7 +
tests/ci/report.py | 5 +-
tests/ci/s3_helper.py | 41 +
tests/ci/sign_release.py | 97 +
tests/ci/sqltest.py | 2 +-
tests/ci/stress_check.py | 30 +-
tests/ci/version_helper.py | 140 +-
tests/config/config.d/azure_storage_conf.xml | 8 +-
.../compose/docker_compose_arrowflight.yml | 2 +-
.../compose/docker_compose_azurite.yml | 2 +-
.../compose/docker_compose_clickhouse.yml | 2 +-
.../compose/docker_compose_dotnet_client.yml | 2 +-
.../compose/docker_compose_jdbc_bridge.yml | 1 +
.../compose/docker_compose_keeper.yml | 6 +-
.../docker_compose_kerberized_kafka.yml | 2 +-
.../compose/docker_compose_kerberos_kdc.yml | 2 +-
.../compose/docker_compose_minio.yml | 6 +-
.../docker_compose_mysql_dotnet_client.yml | 2 +-
.../docker_compose_mysql_golang_client.yml | 2 +-
.../docker_compose_mysql_java_client.yml | 2 +-
.../docker_compose_mysql_js_client.yml | 2 +-
.../docker_compose_mysql_php_client.yml | 2 +-
.../compose/docker_compose_nginx.yml | 2 +-
.../docker_compose_postgresql_java_client.yml | 2 +-
tests/integration/helpers/cluster.py | 11 +-
tests/integration/helpers/network.py | 2 +-
tests/integration/integration_test_images.py | 32 +-
tests/integration/runner | 2 +-
.../test_attach_partition_using_copy/test.py | 4 +-
.../test_backward_compatibility/test.py | 2 +-
.../test_aggregate_fixed_key.py | 2 +-
.../test_aggregate_function_state.py | 4 +-
.../test_convert_ordinary.py | 2 +-
.../test_cte_distributed.py | 2 +-
.../test_functions.py | 2 +-
.../test_insert_profile_events.py | 2 +-
.../test_ip_types_binary_compatibility.py | 2 +-
.../test_memory_bound_aggregation.py | 4 +-
.../test_normalized_count_comparison.py | 2 +-
.../test_rocksdb_upgrade.py | 2 +-
.../test_select_aggregate_alias_column.py | 2 +-
.../test_short_strings_aggregation.py | 12 +-
...test_vertical_merges_from_compact_parts.py | 2 +-
tests/integration/test_cow_policy/test.py | 4 +-
tests/integration/test_database_delta/test.py | 2 +-
.../test_disk_over_web_server/test.py | 2 +-
.../test.py | 2 +-
.../test_lightweight_updates/test.py | 2 +-
tests/integration/test_old_versions/test.py | 2 +-
.../test_polymorphic_parts/test.py | 2 +-
.../test.py | 4 +-
.../test_replicating_constants/test.py | 4 +-
.../test_trace_log_build_id/test.py | 2 +-
tests/integration/test_ttl_replicated/test.py | 6 +-
tests/integration/test_version_update/test.py | 2 +-
.../test.py | 6 +-
.../queries/0_stateless/01528_play.reference | 2 +-
tests/queries/0_stateless/01528_play.sh | 2 +-
utils/tests-visualizer/index.html | 2 +-
231 files changed, 10565 insertions(+), 4834 deletions(-)
create mode 100644 .github/ISSUE_TEMPLATE/10_project-antalya-bug-report.md
delete mode 100644 .github/ISSUE_TEMPLATE/10_question.yaml
delete mode 100644 .github/ISSUE_TEMPLATE/20_feature-request.yaml
create mode 100644 .github/ISSUE_TEMPLATE/20_project-antalya-feature-request.md
create mode 100644 .github/ISSUE_TEMPLATE/30_project-antalya-question.md
delete mode 100644 .github/ISSUE_TEMPLATE/30_unexpected-behaviour.yaml
delete mode 100644 .github/ISSUE_TEMPLATE/35_incomplete_implementation.yaml
create mode 100644 .github/ISSUE_TEMPLATE/40_altinity-stable-bug-report.md
delete mode 100644 .github/ISSUE_TEMPLATE/45_usability-issue.yaml
create mode 100644 .github/ISSUE_TEMPLATE/50_altinity-stable-question.md
delete mode 100644 .github/ISSUE_TEMPLATE/50_build-issue.yaml
delete mode 100644 .github/ISSUE_TEMPLATE/60_documentation-issue.yaml
delete mode 100644 .github/ISSUE_TEMPLATE/70_performance-issue.yaml
delete mode 100644 .github/ISSUE_TEMPLATE/80_backward-compatibility.yaml
delete mode 100644 .github/ISSUE_TEMPLATE/85_bug-report.yaml
delete mode 100644 .github/ISSUE_TEMPLATE/90_fuzzing-report.yaml
delete mode 100644 .github/ISSUE_TEMPLATE/95_sanitizer-report.yaml
delete mode 100644 .github/ISSUE_TEMPLATE/96_installation-issues.yaml
create mode 100644 .github/actions/create_workflow_report/action.yml
create mode 100644 .github/actions/create_workflow_report/ci_run_report.html.jinja
create mode 100755 .github/actions/create_workflow_report/create_workflow_report.py
create mode 100755 .github/actions/create_workflow_report/workflow_report_hook.sh
create mode 100644 .github/actions/docker_setup/action.yml
create mode 100644 .github/actions/runner_setup/action.yml
create mode 100644 .github/grype/parse_vulnerabilities_grype.py
create mode 100755 .github/grype/run_grype_scan.sh
create mode 100755 .github/grype/transform_and_upload_results_s3.sh
create mode 100755 .github/retry.sh
create mode 100644 .github/workflows/README.md
create mode 100644 .github/workflows/cancel.yml
create mode 100644 .github/workflows/compare_fails.yml
create mode 100644 .github/workflows/docker_publish.yml
create mode 100644 .github/workflows/grype_scan.yml
create mode 100644 .github/workflows/init_praktika.yml
create mode 100644 .github/workflows/regression.yml
create mode 100644 .github/workflows/repo-sanity-checks.yml
create mode 100644 .github/workflows/reusable_sign.yml
create mode 100644 .github/workflows/scheduled_runs.yml
create mode 100644 .github/workflows/sign_and_release.yml
create mode 100644 ci/praktika/yaml_additional_templates.py
create mode 100644 ci/settings/altinity_overrides.py
create mode 100644 docker/test/upgrade/Dockerfile
create mode 100644 tests/broken_tests.json
create mode 100644 tests/ci/release/packaging/ansible/inventory/localhost.yml
create mode 100644 tests/ci/release/packaging/ansible/roles/get_cloudfront_info/tasks/main.yml
create mode 100644 tests/ci/release/packaging/ansible/roles/publish_pkgs/tasks/main.yml
create mode 100644 tests/ci/release/packaging/ansible/roles/update_bin_repo/tasks/main.yml
create mode 100644 tests/ci/release/packaging/ansible/roles/update_deb_repo/tasks/main.yml
create mode 100644 tests/ci/release/packaging/ansible/roles/update_deb_repo/templates/apt-ftparchive-stable.conf
create mode 100644 tests/ci/release/packaging/ansible/roles/update_deb_repo/templates/apt-ftparchive.conf
create mode 100644 tests/ci/release/packaging/ansible/roles/update_rpm_repo/tasks/main.yml
create mode 100644 tests/ci/release/packaging/ansible/roles/update_rpm_repo/templates/repo.j2
create mode 100644 tests/ci/release/packaging/ansible/roles/update_rpm_repo/templates/rpmmacros.j2
create mode 100644 tests/ci/release/packaging/ansible/roles/update_tar_repo/tasks/main.yml
create mode 100644 tests/ci/release/packaging/ansible/sign-and-release.yml
create mode 100755 tests/ci/release/packaging/dirindex/dirindexgen.py
create mode 100644 tests/ci/release/packaging/static/bootstrap.bundle.min.js
create mode 100644 tests/ci/sign_release.py
diff --git a/.github/ISSUE_TEMPLATE/10_project-antalya-bug-report.md b/.github/ISSUE_TEMPLATE/10_project-antalya-bug-report.md
new file mode 100644
index 000000000000..0c8c15a05eaf
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/10_project-antalya-bug-report.md
@@ -0,0 +1,36 @@
+---
+name: Project Antalya Bug Report
+about: Help us improve Project Antalya
+title: ''
+labels: antalya
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Key information**
+Provide relevant runtime details.
+ - Project Antalya Build Version
+ - Cloud provider, e.g., AWS
+ - Kubernetes provider, e.g., GKE or Minikube
+ - Object storage, e.g., AWS S3 or Minio
+ - Iceberg catalog, e.g., Glue with REST Proxy
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/10_question.yaml b/.github/ISSUE_TEMPLATE/10_question.yaml
deleted file mode 100644
index 71a3d3da6425..000000000000
--- a/.github/ISSUE_TEMPLATE/10_question.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: Question
-description: Ask a question about ClickHouse
-labels: ["question"]
-body:
- - type: markdown
- attributes:
- value: |
- > Make sure to check documentation https://clickhouse.com/docs/ first. If the question is concise and probably has a short answer, asking it in [community Slack](https://join.slack.com/t/clickhousedb/shared_invite/zt-1gh9ds7f4-PgDhJAaF8ad5RbWBAAjzFg) is probably the fastest way to find the answer. For more complicated questions, consider asking them on StackOverflow with "clickhouse" tag https://stackoverflow.com/questions/tagged/clickhouse
- - type: textarea
- attributes:
- label: Company or project name
- description: Put your company name or project description here.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Question
- description: Please put your question here.
- validations:
- required: true
diff --git a/.github/ISSUE_TEMPLATE/20_feature-request.yaml b/.github/ISSUE_TEMPLATE/20_feature-request.yaml
deleted file mode 100644
index 054efc2d61ee..000000000000
--- a/.github/ISSUE_TEMPLATE/20_feature-request.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: Feature request
-description: Suggest an idea for ClickHouse
-labels: ["feature"]
-body:
- - type: markdown
- attributes:
- value: |
- > (you don't have to strictly follow this form)
- - type: textarea
- attributes:
- label: Company or project name
- description: Put your company name or project description here.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Use case
- description: A clear and concise description of what the intended usage scenario is.
- validations:
- required: true
- - type: textarea
- attributes:
- label: Describe the solution you'd like
- description: A clear and concise description of what you want to happen.
- validations:
- required: true
- - type: textarea
- attributes:
- label: Describe alternatives you've considered
- description: A clear and concise description of any alternative solutions or features you've considered.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Additional context
- description: Add any other context or screenshots about the feature request here.
- validations:
- required: false
diff --git a/.github/ISSUE_TEMPLATE/20_project-antalya-feature-request.md b/.github/ISSUE_TEMPLATE/20_project-antalya-feature-request.md
new file mode 100644
index 000000000000..603584bf4428
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/20_project-antalya-feature-request.md
@@ -0,0 +1,20 @@
+---
+name: Project Antalya Feature request
+about: Suggest an idea for Project Antalya
+title: ''
+labels: antalya, enhancement
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/ISSUE_TEMPLATE/30_project-antalya-question.md b/.github/ISSUE_TEMPLATE/30_project-antalya-question.md
new file mode 100644
index 000000000000..c77cee4a916b
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/30_project-antalya-question.md
@@ -0,0 +1,16 @@
+---
+name: Project Antalya Question
+about: Ask a question about Project Antalya
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+Make sure to check the [Altinity documentation](https://docs.altinity.com/) and the [Altinity Knowledge Base](https://kb.altinity.com/) first.
+
+If your question is concise and probably has a short answer, asking it in the [the Altinity Slack workspace](https://altinity.com/slack) is probably the fastest way to find the answer. Use the #antalya channel.
+
+If you'd rather file a GitHub issue, remove all this text and ask your question here.
+
+Please include relevant environment information as applicable.
diff --git a/.github/ISSUE_TEMPLATE/30_unexpected-behaviour.yaml b/.github/ISSUE_TEMPLATE/30_unexpected-behaviour.yaml
deleted file mode 100644
index 7a34c4bb7ba8..000000000000
--- a/.github/ISSUE_TEMPLATE/30_unexpected-behaviour.yaml
+++ /dev/null
@@ -1,55 +0,0 @@
-name: Unexpected behaviour
-description: Some feature is working in non-obvious way
-labels: ["unexpected behaviour"]
-body:
- - type: markdown
- attributes:
- value: |
- > (you don't have to strictly follow this form)
- - type: textarea
- attributes:
- label: Company or project name
- description: Put your company name or project description here.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Describe the unexpected behaviour
- description: A clear and concise description of what doesn't work as it is supposed to.
- validations:
- required: true
- - type: textarea
- attributes:
- label: Which ClickHouse versions are affected?
- validations:
- required: true
- - type: textarea
- attributes:
- label: How to reproduce
- description: |
- * Which ClickHouse server version to use
- * Which interface to use, if matters
- * Non-default settings, if any
- * `CREATE TABLE` statements for all tables involved
- * Sample data for all these tables, use [clickhouse-obfuscator](https://github.com/ClickHouse/ClickHouse/blob/c81bec37a58757be1e2b1ac6f20a62b3f14a31f1/programs/obfuscator/Obfuscator.cpp#L55-L95) if necessary
- * Queries to run that lead to unexpected result
- validations:
- required: true
- - type: textarea
- attributes:
- label: Expected behavior
- description: A clear and concise description of what you expected to happen.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Error message and/or stacktrace
- description: If applicable, add screenshots to help explain your problem.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Additional context
- description: Add any other context about the problem here.
- validations:
- required: false
diff --git a/.github/ISSUE_TEMPLATE/35_incomplete_implementation.yaml b/.github/ISSUE_TEMPLATE/35_incomplete_implementation.yaml
deleted file mode 100644
index 969c1893e6f5..000000000000
--- a/.github/ISSUE_TEMPLATE/35_incomplete_implementation.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
-name: Incomplete implementation
-description: Implementation of existing feature is not finished
-labels: ["unfinished code"]
-body:
- - type: markdown
- attributes:
- value: |
- > (you don't have to strictly follow this form)
- - type: textarea
- attributes:
- label: Company or project name
- description: Put your company name or project description here.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Describe the unexpected behaviour
- description: A clear and concise description of what works not as it is supposed to.
- validations:
- required: true
- - type: textarea
- attributes:
- label: How to reproduce
- description: |
- * Which ClickHouse server version to use
- * Which interface to use, if matters
- * Non-default settings, if any
- * `CREATE TABLE` statements for all tables involved
- * Sample data for all these tables, use [clickhouse-obfuscator](https://github.com/ClickHouse/ClickHouse/blob/c81bec37a58757be1e2b1ac6f20a62b3f14a31f1/programs/obfuscator/Obfuscator.cpp#L55-L95) if necessary
- * Queries to run that lead to unexpected result
- validations:
- required: true
- - type: textarea
- attributes:
- label: Expected behavior
- description: A clear and concise description of what you expected to happen.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Error message and/or stacktrace
- description: If applicable, add screenshots to help explain your problem.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Additional context
- description: Add any other context about the problem here.
- validations:
- required: false
diff --git a/.github/ISSUE_TEMPLATE/40_altinity-stable-bug-report.md b/.github/ISSUE_TEMPLATE/40_altinity-stable-bug-report.md
new file mode 100644
index 000000000000..90bf241dc195
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/40_altinity-stable-bug-report.md
@@ -0,0 +1,50 @@
+---
+name: Altinity Stable Bug report
+about: Report something broken in an Altinity Stable Build
+title: ''
+labels: stable
+assignees: ''
+
+---
+
+✅ *I checked [the Altinity Stable Builds lifecycle table](https://docs.altinity.com/altinitystablebuilds/#altinity-stable-builds-life-cycle-table), and the Altinity Stable Build version I'm using is still supported.*
+
+## Type of problem
+Choose one of the following items, then delete the others:
+
+**Bug report** - something's broken
+
+**Incomplete implementation** - something's not quite right
+
+**Performance issue** - something works, just not as quickly as it should
+
+**Backwards compatibility issue** - something used to work, but now it doesn't
+
+**Unexpected behavior** - something surprising happened, but it wasn't the good kind of surprise
+
+**Installation issue** - something doesn't install the way it should
+
+**Usability issue** - something works, but it could be a lot easier
+
+**Documentation issue** - something in the docs is wrong, incomplete, or confusing
+
+## Describe the situation
+A clear, concise description of what's happening. Can you reproduce it in a ClickHouse Official build of the same version?
+
+## How to reproduce the behavior
+
+* Which Altinity Stable Build version to use
+* Which interface to use, if it matters
+* Non-default settings, if any
+* `CREATE TABLE` statements for all tables involved
+* Sample data for all these tables, use the [clickhouse-obfuscator](https://github.com/ClickHouse/ClickHouse/blob/31fd4f5eb41d5ec26724fc645c11fe4d62eae07f/programs/obfuscator/README.md) if necessary
+* Queries to run that lead to an unexpected result
+
+## Expected behavior
+A clear, concise description of what you expected to happen.
+
+## Logs, error messages, stacktraces, screenshots...
+Add any details that might explain the issue.
+
+## Additional context
+Add any other context about the issue here.
diff --git a/.github/ISSUE_TEMPLATE/45_usability-issue.yaml b/.github/ISSUE_TEMPLATE/45_usability-issue.yaml
deleted file mode 100644
index 0d2ae1a580e5..000000000000
--- a/.github/ISSUE_TEMPLATE/45_usability-issue.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
-name: Usability improvement request
-description: Report something can be made more convenient to use
-labels: ["usability"]
-body:
- - type: markdown
- attributes:
- value: |
- > (you don't have to strictly follow this form)
- - type: textarea
- attributes:
- label: Company or project name
- description: Put your company name or project description here.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Describe the improvement
- description: A clear and concise description of what you want to happen
- validations:
- required: true
- - type: textarea
- attributes:
- label: Which ClickHouse versions are affected?
- validations:
- required: true
- - type: textarea
- attributes:
- label: How to reproduce
- description: |
- * Which interface to use, if matters
- * Non-default settings, if any
- * `CREATE TABLE` statements for all tables involved
- * Sample data for all these tables, use [clickhouse-obfuscator](https://github.com/ClickHouse/ClickHouse/blob/c81bec37a58757be1e2b1ac6f20a62b3f14a31f1/programs/obfuscator/Obfuscator.cpp#L55-L95) if necessary
- * Queries to run that lead to unexpected result
- validations:
- required: true
- - type: textarea
- attributes:
- label: Error message and/or stacktrace
- description: If applicable, add screenshots to help explain your problem.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Additional context
- description: Add any other context about the problem here.
- validations:
- required: false
diff --git a/.github/ISSUE_TEMPLATE/50_altinity-stable-question.md b/.github/ISSUE_TEMPLATE/50_altinity-stable-question.md
new file mode 100644
index 000000000000..027970e25a02
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/50_altinity-stable-question.md
@@ -0,0 +1,16 @@
+---
+name: Altinity Stable Question
+about: Ask a question about an Altinity Stable Build
+title: ''
+labels: question, stable
+assignees: ''
+
+---
+
+Make sure to check the [Altinity documentation](https://docs.altinity.com/) and the [Altinity Knowledge Base](https://kb.altinity.com/) first.
+
+If your question is concise and probably has a short answer, asking it in the [the Altinity Slack channel](https://altinity.com/slack) is probably the fastest way to find the answer.
+
+For more complicated questions, consider [asking them on StackOverflow with the tag "clickhouse"](https://stackoverflow.com/questions/tagged/clickhouse).
+
+If you'd rather file a GitHub issue, remove all this text and ask your question here.
diff --git a/.github/ISSUE_TEMPLATE/50_build-issue.yaml b/.github/ISSUE_TEMPLATE/50_build-issue.yaml
deleted file mode 100644
index 0549944c0bb2..000000000000
--- a/.github/ISSUE_TEMPLATE/50_build-issue.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
-name: Build issue
-description: Report failed ClickHouse build from master
-labels: ["build"]
-body:
- - type: markdown
- attributes:
- value: |
- > Make sure that `git diff` result is empty and you've just pulled fresh master. Try cleaning up cmake cache. Just in case, official build instructions are published here: https://clickhouse.com/docs/en/development/build/
- - type: textarea
- attributes:
- label: Company or project name
- description: Put your company name or project description here.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Describe the problem
- description: A clear and concise description of what doesn't work as it is supposed to.
- validations:
- required: true
- - type: textarea
- attributes:
- label: Operating system
- description: OS kind or distribution, specific version/release, non-standard kernel if any. If you are trying to build inside virtual machine, please mention it too.
- validations:
- required: false
- - type: textarea
- attributes:
- label: CMake version
- description: The output of `cmake --version`.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Ninja version
- description: The output of `ninja --version`.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Compiler name and version
- description: We recommend to use clang. The version can be obtained via `clang --version`.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Full cmake and/or ninja output with the error
- description: Please include everything (use https://pastila.nl/ for large output)!
- validations:
- required: true
diff --git a/.github/ISSUE_TEMPLATE/60_documentation-issue.yaml b/.github/ISSUE_TEMPLATE/60_documentation-issue.yaml
deleted file mode 100644
index bba6df87a783..000000000000
--- a/.github/ISSUE_TEMPLATE/60_documentation-issue.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: Documentation issue
-description: Report something incorrect or missing in documentation
-labels: ["comp-documentation"]
-body:
- - type: markdown
- attributes:
- value: |
- > Make sure that `git diff` result is empty and you've just pulled fresh master. Try cleaning up cmake cache. Just in case, official build instructions are published here: https://clickhouse.com/docs/en/development/build/
- - type: textarea
- attributes:
- label: Company or project name
- description: Put your company name or project description here.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Describe the issue
- description: A clear and concise description of what's wrong in documentation.
- validations:
- required: true
- - type: textarea
- attributes:
- label: Additional context
- description: Add any other context about the problem here.
- validations:
- required: false
diff --git a/.github/ISSUE_TEMPLATE/70_performance-issue.yaml b/.github/ISSUE_TEMPLATE/70_performance-issue.yaml
deleted file mode 100644
index 1df99dc76fda..000000000000
--- a/.github/ISSUE_TEMPLATE/70_performance-issue.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
-name: Performance issue
-description: Report something working slower than expected
-labels: ["performance"]
-body:
- - type: markdown
- attributes:
- value: |
- > (you don't have to strictly follow this form)
- - type: textarea
- attributes:
- label: Company or project name
- description: Put your company name or project description here.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Describe the situation
- description: What exactly works slower than expected?
- validations:
- required: true
- - type: textarea
- attributes:
- label: Which ClickHouse versions are affected?
- validations:
- required: true
- - type: textarea
- attributes:
- label: How to reproduce
- description: |
- * Which interface to use, if matters
- * Non-default settings, if any
- * `CREATE TABLE` statements for all tables involved
- * Sample data for all these tables, use [clickhouse-obfuscator](https://github.com/ClickHouse/ClickHouse/blob/c81bec37a58757be1e2b1ac6f20a62b3f14a31f1/programs/obfuscator/Obfuscator.cpp#L55-L95) if necessary
- * Queries to run that lead to unexpected result
- validations:
- required: true
- - type: textarea
- attributes:
- label: Expected performance
- description: What are your performance expectation, why do you think they are realistic? Has it been working faster in older ClickHouse releases? Is it working faster in some specific other system?
- validations:
- required: false
- - type: textarea
- attributes:
- label: Additional context
- description: Add any other context about the problem here.
- validations:
- required: false
diff --git a/.github/ISSUE_TEMPLATE/80_backward-compatibility.yaml b/.github/ISSUE_TEMPLATE/80_backward-compatibility.yaml
deleted file mode 100644
index 72f56d781979..000000000000
--- a/.github/ISSUE_TEMPLATE/80_backward-compatibility.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
-name: Backward compatibility issue
-description: Report the case when the behaviour of a new version can break existing use cases
-labels: ["backward compatibility"]
-body:
- - type: markdown
- attributes:
- value: |
- > (you don't have to strictly follow this form)
- - type: textarea
- attributes:
- label: Company or project name
- description: Put your company name or project description here.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Describe the unexpected behaviour
- description: A clear and concise description of what works not as it is supposed to.
- validations:
- required: true
- - type: textarea
- attributes:
- label: Which ClickHouse versions are affected?
- validations:
- required: true
- - type: textarea
- attributes:
- label: How to reproduce
- description: |
- * Which interface to use, if matters
- * Non-default settings, if any
- * `CREATE TABLE` statements for all tables involved
- * Sample data for all these tables, use [clickhouse-obfuscator](https://github.com/ClickHouse/ClickHouse/blob/c81bec37a58757be1e2b1ac6f20a62b3f14a31f1/programs/obfuscator/Obfuscator.cpp#L55-L95) if necessary
- * Queries to run that lead to unexpected result
- validations:
- required: true
- - type: textarea
- attributes:
- label: Error message and/or stacktrace
- description: If applicable, add screenshots to help explain your problem.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Additional context
- description: Add any other context about the problem here.
- validations:
- required: false
diff --git a/.github/ISSUE_TEMPLATE/85_bug-report.yaml b/.github/ISSUE_TEMPLATE/85_bug-report.yaml
deleted file mode 100644
index 349bf82a3a4e..000000000000
--- a/.github/ISSUE_TEMPLATE/85_bug-report.yaml
+++ /dev/null
@@ -1,76 +0,0 @@
-name: Bug report
-description: Wrong behavior (visible to users) in the official ClickHouse release.
-labels: ["potential bug"]
-body:
- - type: markdown
- attributes:
- value: |
- > Please make sure that the version you're using is still supported (you can find the list [here](https://github.com/ClickHouse/ClickHouse/blob/master/SECURITY.md#scope-and-supported-versions)).
- > You have to provide the following information whenever possible.
- - type: textarea
- attributes:
- label: Company or project name
- description: Put your company name or project description here.
- validations:
- required: false
- - type: textarea
- attributes:
- label: Describe what's wrong
- description: |
- * A clear and concise description of what works not as it is supposed to.
- * A link to reproducer in [https://fiddle.clickhouse.com/](https://fiddle.clickhouse.com/).
- validations:
- required: true
- - type: dropdown
- attributes:
- label: Does it reproduce on the most recent release?
- description: |
- [The list of releases](https://github.com/ClickHouse/ClickHouse/blob/master/utils/list-versions/version_date.tsv)
- options:
- - 'Yes'
- - 'No'
- validations:
- required: true
- - type: markdown
- attributes:
- value: |
- -----
- > Change "enabled" to true in "send_crash_reports" section in `config.xml`:
- ```xml
-
| Pull Request | +{{ pr_info_html }} | +
|---|---|
| Workflow Run | +{{ workflow_id }} | +
| Commit | +{{ commit_sha }} | +
| Build Report | +{% for job_name, link in build_report_links.items() %}[{{ job_name }}] {% endfor %} | +
| Date | +{{ date }} | +
This is a preview. The workflow is not yet finished.
+ {% endif %} +Compared with base sha {{ base_sha }}
+ {{ new_fails_html }} + {%- endif %} + +
+ Fail reason conventions:
+ KNOWN - Accepted fail and fix is not planned
+ INVESTIGATE - We don't know why it fails
+ NEEDSFIX - Investigation done and a fix is needed to make it pass
+
Nothing to report
" + results.columns = [col.replace("_", " ").title() for col in results.columns] + html = results.to_html( + index=False, + formatters={ + "Results Link": url_to_html_link, + "Test Name": format_test_name_for_linewrap, + "Test Status": format_test_status, + "Job Status": format_test_status, + "Status": format_test_status, + "Message": lambda m: m.replace("\n", " "), + "Identifier": lambda i: url_to_html_link( + "https://nvd.nist.gov/vuln/detail/" + i + ), + }, + escape=False, + border=0, + classes=["test-results-table"], + ) + return html + + +def backfill_skipped_statuses( + job_statuses: pd.DataFrame, pr_number: int, branch: str, commit_sha: str +): + """ + Fill in the job statuses for skipped jobs. + """ + + if pr_number == 0: + ref_param = f"REF={branch}" + workflow_name = "MasterCI" + else: + ref_param = f"PR={pr_number}" + workflow_name = "PR" + + status_file = f"result_{workflow_name.lower()}.json" + s3_path = f"https://{S3_BUCKET}.s3.amazonaws.com/{ref_param.replace('=', 's/')}/{commit_sha}/{status_file}" + response = requests.get(s3_path) + + if response.status_code != 200: + return job_statuses + + status_data = response.json() + skipped_jobs = [] + for job in status_data["results"]: + if job["status"] == "skipped" and len(job["links"]) > 0: + skipped_jobs.append( + { + "job_name": job["name"], + "job_status": job["status"], + "message": job["info"], + "results_link": job["links"][0], + } + ) + + return pd.concat([job_statuses, pd.DataFrame(skipped_jobs)], ignore_index=True) + + +def get_build_report_links( + job_statuses: pd.DataFrame, pr_number: int, branch: str, commit_sha: str +): + """ + Get the build report links for the given PR number, branch, and commit SHA. + + First checks if a build job submitted a success or skipped status. + If not available, it guesses the links. + """ + build_job_names = [ + "Build (amd_release)", + "Build (arm_release)", + "Docker server image", + "Docker keeper image", + ] + build_report_links = {} + + for job in job_statuses.itertuples(): + if ( + job.job_name in build_job_names + and job.job_status + in ( + "success", + "skipped", + ) + and job.results_link + ): + build_report_links[job.job_name] = job.results_link + + if 0 < len(build_report_links) < len(build_job_names): + # Only have some of the build jobs, guess the rest. + # (It was straightforward to force the build jobs to always appear in the cache, + # however doing the same for the docker image jobs is difficult.) + ref_job, ref_link = list(build_report_links.items())[0] + link_template = ref_link.replace( + urllib.parse.quote(ref_job, safe=""), "{job_name}" + ) + for job in build_job_names: + if job not in build_report_links: + build_report_links[job] = link_template.format(job_name=job) + + if len(build_report_links) > 0: + return build_report_links + + # No cache or build result was found, guess the links + if pr_number == 0: + ref_param = f"REF={branch}" + workflow_name = "MasterCI" + else: + ref_param = f"PR={pr_number}" + workflow_name = "PR" + + build_report_link_base = f"https://{S3_BUCKET}.s3.amazonaws.com/json.html?{ref_param}&sha={commit_sha}&name_0={urllib.parse.quote(workflow_name, safe='')}" + build_report_links = { + job_name: f"{build_report_link_base}&name_1={urllib.parse.quote(job_name, safe='')}" + for job_name in build_job_names + } + return build_report_links + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser(description="Create a combined CI report.") + parser.add_argument( # Need the full URL rather than just the ID to query the databases + "--actions-run-url", required=True, help="URL of the actions run" + ) + parser.add_argument( + "--pr-number", help="Pull request number for the S3 path", type=int + ) + parser.add_argument("--commit-sha", help="Commit SHA for the S3 path") + parser.add_argument( + "--no-upload", action="store_true", help="Do not upload the report" + ) + parser.add_argument( + "--known-fails", type=str, help="Path to the file with known fails" + ) + parser.add_argument( + "--cves", action="store_true", help="Get CVEs from Grype results" + ) + parser.add_argument( + "--mark-preview", action="store_true", help="Mark the report as a preview" + ) + return parser.parse_args() + + +def create_workflow_report( + actions_run_url: str, + pr_number: int = None, + commit_sha: str = None, + no_upload: bool = False, + known_fails: str = None, + check_cves: bool = False, + mark_preview: bool = False, +) -> str: + if pr_number is None or commit_sha is None: + run_details = get_run_details(actions_run_url) + if pr_number is None: + if len(run_details["pull_requests"]) > 0: + pr_number = run_details["pull_requests"][0]["number"] + else: + pr_number = 0 + if commit_sha is None: + commit_sha = run_details["head_commit"]["id"] + + host = os.getenv(DATABASE_HOST_VAR) + if not host: + print(f"{DATABASE_HOST_VAR} is not set") + user = os.getenv(DATABASE_USER_VAR) + if not user: + print(f"{DATABASE_USER_VAR} is not set") + password = os.getenv(DATABASE_PASSWORD_VAR) + if not password: + print(f"{DATABASE_PASSWORD_VAR} is not set") + if not GITHUB_TOKEN: + print("GITHUB_TOKEN is not set") + if not all([host, user, password, GITHUB_TOKEN]): + raise Exception("Required environment variables are not set") + + db_client = Client( + host=host, + user=user, + password=password, + port=9440, + secure="y", + verify=False, + settings={"use_numpy": True}, + ) + + run_details = get_run_details(actions_run_url) + branch_name = run_details.get("head_branch", "unknown branch") + + fail_results = { + "job_statuses": get_commit_statuses(commit_sha), + "checks_fails": get_checks_fails(db_client, commit_sha, branch_name), + "checks_known_fails": [], + "pr_new_fails": [], + "checks_errors": get_checks_errors(db_client, commit_sha, branch_name), + "regression_fails": get_regression_fails(db_client, actions_run_url), + "docker_images_cves": ( + [] if not check_cves else get_cves(pr_number, commit_sha, branch_name) + ), + } + + # get_cves returns ... in the case where no Grype result files were found. + # This might occur when run in preview mode. + cves_not_checked = not check_cves or fail_results["docker_images_cves"] is ... + + if known_fails: + if not os.path.exists(known_fails): + print(f"Known fails file {known_fails} not found.") + exit(1) + + with open(known_fails) as f: + known_fails = json.load(f) + + if known_fails: + fail_results["checks_known_fails"] = get_checks_known_fails( + db_client, commit_sha, branch_name, known_fails + ) + + if pr_number == 0: + pr_info_html = f"Release ({branch_name})" + else: + try: + pr_info = get_pr_info_from_number(pr_number) + pr_info_html = f""" + #{pr_info.get("number")} ({pr_info.get("base", {}).get('ref')} <- {pr_info.get("head", {}).get('ref')}) {pr_info.get("title")} + """ + fail_results["pr_new_fails"] = get_new_fails_this_pr( + db_client, + pr_info, + fail_results["checks_fails"], + fail_results["regression_fails"], + ) + except Exception as e: + pr_info_html = e + + fail_results["job_statuses"] = backfill_skipped_statuses( + fail_results["job_statuses"], pr_number, branch_name, commit_sha + ) + + high_cve_count = 0 + if not cves_not_checked and len(fail_results["docker_images_cves"]) > 0: + high_cve_count = ( + fail_results["docker_images_cves"]["severity"] + .str.lower() + .isin(("high", "critical")) + .sum() + ) + + # Set up the Jinja2 environment + template_dir = os.path.dirname(__file__) + + # Load the template + template = Environment(loader=FileSystemLoader(template_dir)).get_template( + "ci_run_report.html.jinja" + ) + + # Define the context for rendering + context = { + "title": "ClickHouse® CI Workflow Run Report", + "github_repo": GITHUB_REPO, + "s3_bucket": S3_BUCKET, + "pr_info_html": pr_info_html, + "pr_number": pr_number, + "workflow_id": actions_run_url.split("/")[-1], + "commit_sha": commit_sha, + "base_sha": "" if pr_number == 0 else pr_info.get("base", {}).get("sha"), + "date": f"{datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')} UTC", + "is_preview": mark_preview, + "counts": { + "jobs_status": f"{sum(fail_results['job_statuses']['job_status'].value_counts().get(x, 0) for x in ('failure', 'error'))} fail/error", + "checks_errors": len(fail_results["checks_errors"]), + "checks_new_fails": len(fail_results["checks_fails"]), + "regression_new_fails": len(fail_results["regression_fails"]), + "cves": "N/A" if cves_not_checked else f"{high_cve_count} high/critical", + "checks_known_fails": ( + "N/A" if not known_fails else len(fail_results["checks_known_fails"]) + ), + "pr_new_fails": len(fail_results["pr_new_fails"]), + }, + "build_report_links": get_build_report_links( + fail_results["job_statuses"], pr_number, branch_name, commit_sha + ), + "ci_jobs_status_html": format_results_as_html_table( + fail_results["job_statuses"] + ), + "checks_errors_html": format_results_as_html_table( + fail_results["checks_errors"] + ), + "checks_fails_html": format_results_as_html_table(fail_results["checks_fails"]), + "regression_fails_html": format_results_as_html_table( + fail_results["regression_fails"] + ), + "docker_images_cves_html": ( + "Not Checked
" + if cves_not_checked + else format_results_as_html_table(fail_results["docker_images_cves"]) + ), + "checks_known_fails_html": ( + "Not Checked
" + if not known_fails + else format_results_as_html_table(fail_results["checks_known_fails"]) + ), + "new_fails_html": format_results_as_html_table(fail_results["pr_new_fails"]), + } + + # Render the template with the context + rendered_html = template.render(context) + + report_name = "ci_run_report.html" + report_path = Path(report_name) + report_path.write_text(rendered_html, encoding="utf-8") + + if no_upload: + print(f"Report saved to {report_path}") + exit(0) + + if pr_number == 0: + report_destination_key = f"REFs/{branch_name}/{commit_sha}/{report_name}" + else: + report_destination_key = f"PRs/{pr_number}/{commit_sha}/{report_name}" + + # Upload the report to S3 + s3_client = boto3.client("s3", endpoint_url=os.getenv("S3_URL")) + + try: + s3_client.put_object( + Bucket=S3_BUCKET, + Key=report_destination_key, + Body=rendered_html, + ContentType="text/html; charset=utf-8", + ) + except NoCredentialsError: + print("Credentials not available for S3 upload.") + + return f"https://s3.amazonaws.com/{S3_BUCKET}/" + report_destination_key + + +def main(): + args = parse_args() + + report_url = create_workflow_report( + args.actions_run_url, + args.pr_number, + args.commit_sha, + args.no_upload, + args.known_fails, + args.cves, + args.mark_preview, + ) + + print(report_url) + + +if __name__ == "__main__": + main() diff --git a/.github/actions/create_workflow_report/workflow_report_hook.sh b/.github/actions/create_workflow_report/workflow_report_hook.sh new file mode 100755 index 000000000000..55f5a1ede5c3 --- /dev/null +++ b/.github/actions/create_workflow_report/workflow_report_hook.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# This script is for generating preview reports when invoked as a post-hook from a praktika job +pip install clickhouse-driver==0.2.8 numpy==1.26.4 pandas==2.0.3 jinja2==3.1.5 +ARGS="--mark-preview --known-fails tests/broken_tests.json --cves --actions-run-url $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID --pr-number $PR_NUMBER" +CMD="python3 .github/actions/create_workflow_report/create_workflow_report.py" +$CMD $ARGS + diff --git a/.github/actions/docker_setup/action.yml b/.github/actions/docker_setup/action.yml new file mode 100644 index 000000000000..56f713fa59d1 --- /dev/null +++ b/.github/actions/docker_setup/action.yml @@ -0,0 +1,32 @@ +name: Docker setup +description: Setup docker +inputs: + test_name: + description: name of the test, used in determining ipv6 configs. + default: None + type: string +runs: + using: "composite" + steps: + - name: Docker IPv6 configuration + shell: bash + if: ${{ contains(inputs.test_name, 'Stateless') }} + env: + ipv6_subnet: 2001:3984:3989::/64 + run: | + # make sure docker uses proper IPv6 config + sudo touch /etc/docker/daemon.json + sudo chown ubuntu:ubuntu /etc/docker/daemon.json + sudo cat <- + diff --git a/programs/server/merges.html b/programs/server/merges.html index 119fb058b0ba..6b1686973d25 100644 --- a/programs/server/merges.html +++ b/programs/server/merges.html @@ -3,7 +3,7 @@
| Pull Request | +{{ pr_info_html }} | +
|---|---|
| Workflow Run | +{{ workflow_id }} | +
| Commit | +{{ commit_sha }} | +
| Build Report | +{% for job_name, link in build_report_links.items() %}[{{ job_name }}] {% endfor %} | +
| Date | +{{ date }} | +
This is a preview. The workflow is not yet finished.
+ {% endif %} +Compared with base sha {{ base_sha }}
+ {{ new_fails_html }} + {%- endif %} + +
+ Fail reason conventions:
+ KNOWN - Accepted fail and fix is not planned
+ INVESTIGATE - We don't know why it fails
+ NEEDSFIX - Investigation done and a fix is needed to make it pass
+