Compare commits

..

1687 Commits

Author SHA1 Message Date
Julia Kartseva
318e9b4f33 add plain_object_storage_write_fail_on_directory_move fault injection 2024-11-21 05:48:41 +00:00
Julia Kartseva
4ac4098d2b add failpoint and test 2024-11-21 03:33:17 +00:00
Julia Kartseva
0ce8088382 address feedback
Introduce removePathIfExists method.
2024-11-20 23:26:52 +00:00
Julia Kartseva
d34a3208f7 fix transaction rollback when file write finalize fails 2024-11-20 23:26:48 +00:00
Mikhail Artemenko
44b4bd38b9
Merge pull request #72045 from ClickHouse/issues/70174/cluster_versions
Enable cluster table functions for DataLake Storages
2024-11-20 21:22:37 +00:00
Shichao Jin
40c7d5fd1a
Merge pull request #71894 from udiz/fix-arrayWithConstant-size-estimation
Fix: arrayWithConstant size estimation using row's element size
2024-11-20 19:56:27 +00:00
Vitaly Baranov
4e56c026cd
Merge pull request #72103 from vitlibar/get-rid-of-code-duplication-after-check-grant
Get rid of code duplication after adding CHECK GRANT
2024-11-20 17:30:12 +00:00
Raúl Marín
2e776256e8
Merge pull request #72046 from Algunenano/decimal_trash
Save several minutes of build time
2024-11-20 17:13:01 +00:00
Nikita Mikhaylov
2b3098c641
Merge pull request #72147 from ClickHouse/fix-rabbit
Fix `test_storage_rabbitmq`
2024-11-20 16:59:40 +00:00
Kseniia Sumarokova
c6a10151d9
Merge pull request #71947 from ClickHouse/fix_weird_problem
Fix weird case when `s3`/`s3Cluster` return incomplete result or exception
2024-11-20 16:37:58 +00:00
Pablo Marcos
bccbb0a6b5
Merge pull request #72092 from ClickHouse/google-cloud-cpp
Add google-cloud-cpp submodule
2024-11-20 16:21:27 +00:00
Pavel Kruglov
1aceb608f3
Merge pull request #71785 from Avogar/fix-json-parsing
Slightly better JSON type parsing
2024-11-20 14:20:05 +00:00
Pavel Kruglov
64ea850e5b
Merge pull request #71761 from Avogar/dynamic-in-min-max
Forbid Dynamic/Variant types in min/max functions to avoid confusion
2024-11-20 14:12:41 +00:00
Max Kainov
f711005eaa
Merge pull request #71976 from ClickHouse/revert-71974-revert-71081-ci_paktika_integration_4
CI: Functional Tests with praktika
2024-11-20 13:56:43 +00:00
Sema Checherinda
999bff236c
Merge pull request #72126 from ClickHouse/chesema-partition-sink
fix cancelation for PartitionedSink
2024-11-20 13:51:07 +00:00
Nikita Mikhaylov
9120462ed4 Retry waiting 2024-11-20 13:08:24 +00:00
Raúl Marín
3ae055c74e
Merge pull request #71841 from Algunenano/experimental_tiers_switch
Implement `allowed_feature_tier` as a global switch to  disable all experimental / beta features
2024-11-20 12:39:06 +00:00
Pablo Marcos
e11220beb3
Merge branch 'master' into google-cloud-cpp 2024-11-20 13:05:30 +01:00
Raúl Marín
f84083d174 Clang tidy gives one error at a time 2024-11-20 12:45:46 +01:00
Vladimir Cherkasov
59fe7e1951
Merge pull request #71911 from ianton-ru/auxiliary_autodicovery
Auxiliary autodiscovery
2024-11-20 11:27:04 +00:00
Mikhail Artemenko
4ccebd9a24 fix syntax for iceberg in docs 2024-11-20 11:15:39 +00:00
Mikhail Artemenko
99177c0daf remove icebergCluster alias 2024-11-20 11:15:12 +00:00
Max Kainov
cf33249988 add configs to fast test digest 2024-11-20 10:19:58 +00:00
Max Kainov
c1e556df84 fix install.sh 2024-11-20 10:19:58 +00:00
Max Kainov
546f225d10 Revert "Revert "CI: Functional Tests with praktika"" 2024-11-20 10:19:58 +00:00
Sema Checherinda
e68011e8f5 fix StorageJoin when not persistent 2024-11-20 11:04:38 +01:00
Sema Checherinda
a264de35d1 fix cancelation for PartitionedSink 2024-11-20 10:44:07 +01:00
Pablo Marcos
2d26a0cbce Revert "Add GCP KMS example POC to test the CI"
This reverts commit e0bf6ec7e4.
2024-11-20 09:34:15 +00:00
Pablo Marcos
a3c969b44d Remove tests before merge 2024-11-20 09:33:48 +00:00
Pablo Marcos
ed4d955df6
Merge pull request #72104 from ClickHouse/add-jwt-cpp-submodule
Add jwt-cpp submodule
2024-11-20 09:15:41 +00:00
Alexey Milovidov
0fd196771e
Merge pull request #72079 from ClickHouse/fix-keeper-docker
Check the keeper docker works for the simplest case, fix the keeper image
2024-11-20 02:24:03 +00:00
Raúl Marín
17fdd2bd37 Loving tidy 2024-11-20 02:06:29 +01:00
Nikita Mikhaylov
334b28f6db
Merge pull request #72107 from Algunenano/list_licenses
Fix list-licenses.sh with OSX
2024-11-20 01:04:15 +00:00
Nikita Mikhaylov
e83d531772
Merge pull request #71498 from ClickHouse/backtracks-check
Fixed incorrect settings order.
2024-11-20 00:52:31 +00:00
Nikita Mikhaylov
dae913c53b
Merge pull request #72080 from ClickHouse/fix-move-partition-to-table-formatting-with-parens
Fix formatting of `MOVE PARTITION ... TO TABLE ...` alter commands
2024-11-20 00:50:19 +00:00
pufit
07be02d297
Merge pull request #70332 from zvonand/ldap-remote-roles
Passing external user roles from query originator to other nodes
2024-11-19 23:06:45 +00:00
Raúl Marín
6446c11a7b Fix list-licenses.sh with OSX 2024-11-19 21:56:16 +01:00
Raúl Marín
1c414b9987 OSX fix 2024-11-19 21:48:37 +01:00
Pablo Marcos
170da747d5 Fix googleapis_download to always use the local tarball 2024-11-19 20:00:07 +00:00
Vladimir Cherkasov
456a41ee42
Merge pull request #71845 from aalexfvk/acquire_zero_copy_shared_lock_before_swap
Acquire zero-copy shared lock before moving a part
2024-11-19 19:38:54 +00:00
Raúl Marín
dd90fbe13b Fix clang tidy after moving implementation to cpp 2024-11-19 20:04:52 +01:00
Nikita Taranov
5aeeec0f42
Merge branch 'master' into fix_weird_problem 2024-11-19 19:48:10 +01:00
Nikita Taranov
1c5d0c7f93 fix test 2024-11-19 19:43:56 +01:00
Max Kainov
b77c9cdd7f
Merge pull request #72101 from ClickHouse/ci_add_fuzzers_to_nightly_wf
CI: Enable fuzzer job in Nightly workflow
2024-11-19 18:40:25 +00:00
Pablo Marcos
4563e79688 Enable jwt-cpp only for ClickHouse Cloud 2024-11-19 18:03:25 +00:00
Pavel Kruglov
9bf2c6f968
Merge pull request #71982 from Avogar/select-explain-bug
Allow only SELECT queries in EXPLAIN AST used inside subquery
2024-11-19 17:55:05 +00:00
Pablo Marcos
75f781c18e Enable Google Cloud Cpp by default only for ClickHouse Cloud 2024-11-19 17:20:55 +00:00
Pablo Marcos
d35e230ef6 Add jwt-cpp submodule 2024-11-19 17:00:15 +00:00
Yarik Briukhovetskyi
98f7681497
Merge pull request #71889 from yariks5s/fix_insert_hive_partititoning
Fixes for hive partitioning while reading
2024-11-19 16:51:47 +00:00
Vitaly Baranov
ecedbcc763 Allow test 03234_check_grant.sh to run in parallel. 2024-11-19 17:48:12 +01:00
Vitaly Baranov
8551162dcb Get rid of code duplucation after adding CHECK GRANT. 2024-11-19 17:48:06 +01:00
robot-clickhouse
5bdb1dc8aa Automatic style fix 2024-11-19 16:36:56 +00:00
Max Kainov
529721923f CI: Enable fuzzer job in Nightly workflow 2024-11-19 17:28:36 +01:00
Vitaly Baranov
353ff951aa
Merge pull request #68885 from Unalian/feat-67772
Add CHECK GRANT query
2024-11-19 16:09:30 +00:00
Pablo Marcos
e0bf6ec7e4 Add GCP KMS example POC to test the CI 2024-11-19 15:59:55 +00:00
Pablo Marcos
bf180940cd Update google-cloud-cpp to v2.31.0
Also address some minor issues pointed in the review
2024-11-19 15:52:23 +00:00
Pablo Marcos
a44f877343 Ensure destination dir is empty to allow configuring more than once :)
CMake Error at contrib/google-cloud-cpp-cmake/CMakeLists.txt:47 (file):
  file RENAME failed to rename

    /home/ubuntu/ClickHouse/clickhouse-private/build/contrib/google-cloud-cpp-cmake/../../external/googleapis/src/googleapis-e60db19f11f94175ac682c5898cce0f77cc508ea

  to

    /home/ubuntu/ClickHouse/clickhouse-private/build/contrib/google-cloud-cpp-cmake/../../external/googleapis/src/googleapis_download

  because: Directory not empty
2024-11-19 15:51:46 +00:00
Pablo Marcos
67d81a377e Remove find_package calls
Even if the lines are commented out, the style check
complains about it, so we'd rather remove them entirely.
2024-11-19 15:51:46 +00:00
Pablo Marcos
adcee45ad2 Allow us to use google-cloud-cpp CMake files 2024-11-19 15:51:46 +00:00
Robert Schulze
bdb35d9b63 Don't downlaod from remote 2024-11-19 15:51:46 +00:00
Pablo Marcos
4db7468386 Add google-cloud-cpp 2024-11-19 15:51:43 +00:00
Kseniia Sumarokova
0ff7c280f9
Merge pull request #72075 from ClickHouse/kssenii-patch-13
Fix  test_disk_over_web_server/
2024-11-19 15:46:01 +00:00
Pablo Marcos
b18fb82ed0
Merge pull request #72076 from ClickHouse/minor-improvement-for-system-query-metric-log-test
Minor improvement for system.query_metric_log stateless test
2024-11-19 15:20:13 +00:00
János Benjamin Antal
7eac602350 Try to fix style 2024-11-19 14:57:08 +00:00
János Benjamin Antal
7f493c81d0 Fix test 2024-11-19 14:10:55 +00:00
Raúl Marín
5286fa65c4 Fix 2024-11-19 15:07:17 +01:00
Raúl Marín
d1ed49d84b Fix tidy 2024-11-19 14:56:26 +01:00
Kseniia Sumarokova
58dd039aac
Merge pull request #71946 from ClickHouse/fix-s3-queue-log-processed-rows
Fix rows_processed column in system.s3/azure_queue_log broken in 24.6
2024-11-19 13:50:43 +00:00
Raúl Marín
e6f4afe569 Move things to implementation file 2024-11-19 14:42:45 +01:00
Raúl Marín
2146ab4e4e Move more things to private 2024-11-19 14:37:06 +01:00
Mikhail f. Shiryaev
1243f2fb54
Add forgotten patch for the ln command 2024-11-19 14:33:37 +01:00
Pavel Kruglov
e3e4e45278
Merge pull request #60129 from bigo-sg/short_circut_func
Short circuit optimization for functions executed over Nullable arguments
2024-11-19 13:31:55 +00:00
János Benjamin Antal
144fd4082b Fix compile error 2024-11-19 13:29:28 +00:00
Vladimir Cherkasov
6865d1e383
Merge pull request #71855 from ClickHouse/vdimir/grouping_sets_aliases
Fix GROUPING function error when input is ALIAS on distribured table
2024-11-19 13:23:05 +00:00
Mikhail f. Shiryaev
c6f901adaa
Add docker/keeper to the digests 2024-11-19 14:13:46 +01:00
János Benjamin Antal
a1fb0ad706 Make sure parens are always matching 2024-11-19 13:11:11 +00:00
Mikhail Artemenko
0951991c1d update aspell-dict.txt 2024-11-19 13:10:42 +00:00
Mikhail Artemenko
19aec5e572 Merge branch 'issues/70174/cluster_versions' of github.com:ClickHouse/ClickHouse into issues/70174/cluster_versions 2024-11-19 12:51:56 +00:00
Mikhail Artemenko
a367de9977 add docs 2024-11-19 12:49:59 +00:00
Yarik Briukhovetskyi
bd0634ce9d
Merge branch 'ClickHouse:master' into fix_insert_hive_partititoning 2024-11-19 13:45:38 +01:00
Mikhail Artemenko
6894e280b2 fix pr issues 2024-11-19 12:34:42 +00:00
Nikita Mikhaylov
567270afa8
Merge pull request #72053 from ClickHouse/document_cache_populated_by_fetch
Documenting MergeTree's cache_populated_by_fetch setting.
2024-11-19 12:31:05 +00:00
Nikita Mikhaylov
317bdad1e9
Merge pull request #72054 from ClickHouse/alexey-milovidov-patch-8
Add Bluesky and X.
2024-11-19 12:29:55 +00:00
Nikita Mikhaylov
40ad02f229
Merge pull request #72052 from ClickHouse/document_ttl_only_drop_parts
Documenting MergeTree's ttl_only_drop_parts setting, and updating ref…
2024-11-19 12:29:45 +00:00
Mikhail f. Shiryaev
042f0acdb9
Check the keeper docker works for the simplest case 2024-11-19 13:28:39 +01:00
Raúl Marín
59f73a2053 Add back declaration 2024-11-19 13:27:19 +01:00
Yarik Briukhovetskyi
e4f6553eab
Merge branch 'ClickHouse:master' into fix_insert_hive_partititoning 2024-11-19 13:26:16 +01:00
Mikhail Artemenko
39ebe113d9 Merge branch 'master' into issues/70174/cluster_versions 2024-11-19 11:28:46 +00:00
Pablo Marcos
b4a6ee77ab Add more diff margin depending on number of event rows
There's been a case where the avg(diff) for the 1000ms
query has been 1205ms, which is over 1000 * 1.2.
In order to leave more margin for the case where the
sample of rows is low, while leaving it more strict
when the number of rows is higher, we use an adaptive
margin:

20 + 20/event_rows
2024-11-19 11:00:03 +00:00
alesapin
05bd7f4b4c
Merge pull request #71907 from yokofly/misc/typo-parititon-to-partition
TreeRewriter: fix typo: `parititon` => `partition`
2024-11-19 10:56:29 +00:00
Pablo Marcos
c9b843a6bb Demote LOG_DEBUG and LOG_TRACE to LOG_TEST 2024-11-19 10:54:43 +00:00
Kseniia Sumarokova
6e1de8b8a4
Update test.py 2024-11-19 11:23:46 +01:00
Raúl Marín
514c1f7215 Add missing type 2024-11-19 11:22:43 +01:00
Kseniia Sumarokova
9c4456df1a
Merge branch 'master' into fix-s3-queue-log-processed-rows 2024-11-19 11:21:40 +01:00
Aleksei Filatov
559d9ac517
Merge branch 'master' into acquire_zero_copy_shared_lock_before_swap 2024-11-19 13:00:31 +03:00
Andrey Zvonov
e785bb908e fix after review 2024-11-19 09:53:28 +00:00
Andrey Zvonov
6e58cfc5b8 fix build, fix test 2024-11-19 09:53:28 +00:00
Andrey Zvonov
c4fc7a1bac fix style (2) 2024-11-19 09:53:28 +00:00
Andrey Zvonov
94e2a9cc43 fix style 2024-11-19 09:53:28 +00:00
Andrey Zvonov
9fadfb98b4 add a test that works 2024-11-19 09:53:27 +00:00
Andrey Zvonov
c5b5b5841b fix typo 2024-11-19 09:53:27 +00:00
Andrey Zvonov
86eb3d6425 Revive #42537
Co-authored-by: Enmk <V.Nemkov@gmail.com>

fix memory access
2024-11-19 09:53:27 +00:00
Nikita Mikhaylov
0f4990d2e7
Merge pull request #72048 from tbragin/patch-22
Update README.md - Update meetups
2024-11-19 09:17:46 +00:00
robot-clickhouse
7785a9b15e
Merge pull request #72042 from ClickHouse/auto/v24.3.14.35-lts
Update version_date.tsv and changelog after v24.3.14.35-lts
2024-11-19 09:14:49 +00:00
Sema Checherinda
7bb68c0f8a
Merge pull request #68800 from ClickHouse/chesema-merge-wb
no auto write buffer finalization in destructors
2024-11-19 09:00:50 +00:00
Alexey Milovidov
e27fbc79d0
Merge pull request #72049 from evillique/another-highlighting-fix
Another fix for client syntax highlighting
2024-11-19 08:48:04 +01:00
Alexey Milovidov
eb9bdd1fb0
Merge pull request #72051 from ClickHouse/corrent_permissions_for_dictionaries
Correct permissions for dictionaries
2024-11-19 06:33:48 +00:00
Alexey Milovidov
dc2e91d0b5 Update docs 2024-11-19 05:03:27 +01:00
Alexey Milovidov
54c69998c9
Update README.md
Add Bluesky and X.
2024-11-19 04:59:41 +01:00
taiyang-li
3386cbb009 Merge branch 'short_circut_func' of https://github.com/bigo-sg/ClickHouse into short_circut_func 2024-11-19 11:43:51 +08:00
taiyang-li
47944a4d0e fix failed uts 2024-11-19 11:43:28 +08:00
kellytoole
c1ea3d4213 Documenting MergeTree's cache_populated_by_fetch setting. 2024-11-18 16:34:14 -08:00
Nikita Mikhaylov
36902c66a0 Corrections 2024-11-19 00:20:51 +00:00
udiz
239bbaa133 use length 2024-11-19 00:00:43 +00:00
udiz
07fac5808d format null on test 2024-11-18 23:08:48 +00:00
kellytoole
cad22e7a2d Documenting MergeTree's ttl_only_drop_parts setting, and updating reference to it. 2024-11-18 15:06:08 -08:00
udiz
ed95e0781f test uses less memory 2024-11-18 22:48:38 +00:00
Nikita Mikhaylov
dc88b973e9 Better 2024-11-18 22:38:16 +00:00
Nikita Mikhaylov
ed2af768a1 Correct permissions for dictionaries 2024-11-18 22:37:28 +00:00
Raúl Marín
ff7e1333c2 Fix incorrect setting order
(cherry picked from commit 3f22f01e8a)
2024-11-18 22:32:11 +01:00
Nikolay Degterinsky
b2fc69a6bb Another fix for client syntax highlighting 2024-11-18 21:32:02 +00:00
Tanya Bragin
c917b9ed9a
Update README.md - Update meetups
Move Dubai date to Feb 3, add Kuala Lampur
2024-11-18 13:10:52 -08:00
Alexey Milovidov
6aa2fe525e
Merge pull request #71987 from ClickHouse/miscellaneous-4
Miscellaneous
2024-11-18 20:47:39 +00:00
Alexey Milovidov
03c5e4b107
Merge pull request #72021 from matsumotomiki/translated_ja_docs
add translated Japanese docs
2024-11-18 20:45:51 +00:00
Nikita Mikhaylov
3259e6396f
Merge pull request #71991 from ClickHouse/hanfei/fix-write-text-order
fix bug when column description has settings, ttl and statistics
2024-11-18 19:08:41 +00:00
Raúl Marín
445a5e9c9e Style 2024-11-18 20:03:35 +01:00
Raúl Marín
47bed13b42 Remove extra instantiations of classes 2024-11-18 19:51:42 +01:00
Kseniia Sumarokova
196399bcad
Merge pull request #71827 from ClickHouse/turn-off-boundary-alignment-for-table-engines
Disable fs cache setting boundary_alignment for non-disk read
2024-11-18 18:41:51 +00:00
Raúl Marín
557b3e370d Remove code bloat from ColumnVector.h 2024-11-18 19:08:42 +01:00
robot-clickhouse
014608fb6b Automatic style fix 2024-11-18 17:51:51 +00:00
Mikhail Artemenko
a29ded4941 add test for iceberg 2024-11-18 17:39:46 +00:00
Mikhail Artemenko
d2efae7511 enable cluster versions for datalake storages 2024-11-18 17:35:21 +00:00
Raúl Marín
6b55754bc9 Remove some nested includes in IFunction usage 2024-11-18 18:25:37 +01:00
Anton Popov
07807f1450
Merge pull request #71996 from CurtizJ/fix-mark-cache-prewarm
Fix prewarm of mark cache after adding a new column
2024-11-18 16:58:41 +00:00
robot-clickhouse
926e4a3c38 Update version_date.tsv and changelogs after v24.3.14.35-lts 2024-11-18 16:54:41 +00:00
robot-clickhouse
7564681621
Merge pull request #72041 from ClickHouse/auto/v24.9.3.128-stable
Update version_date.tsv and changelog after v24.9.3.128-stable
2024-11-18 16:51:19 +00:00
Raúl Marín
e33f5bb4e9 Remove unused leftovers
Usage was removed in 23.6
https://github.com/ClickHouse/ClickHouse/pull/50531
2024-11-18 17:45:50 +01:00
Raúl Marín
a258b6d0f2 Prevent magic_enum in Field.h 2024-11-18 17:36:45 +01:00
Raúl Marín
1c308f970b Try to remove more decimal instantiations 2024-11-18 17:21:06 +01:00
Sema Checherinda
7b37bddcd7 fix test 2024-11-18 17:15:26 +01:00
robot-clickhouse
ddc5c80601 Update version_date.tsv and changelogs after v24.9.3.128-stable 2024-11-18 16:13:27 +00:00
Raúl Marín
ec776fe8db Remove wasteful template instatiations 2024-11-18 17:08:43 +01:00
robot-clickhouse
84828120b3
Merge pull request #72037 from ClickHouse/auto/v24.8.7.41-lts
Update version_date.tsv and changelog after v24.8.7.41-lts
2024-11-18 16:08:28 +00:00
Max Kainov
d8fb85117e
Merge pull request #72028 from ClickHouse/ci_remove_unsafe_secret_envs_input
CI: Remove unsafe secret_envs input from yml workflows
2024-11-18 15:47:06 +00:00
Anton Ivashkin
9917dc66d4 Antother style fix 2024-11-18 16:18:36 +01:00
robot-clickhouse
85a5f91b29 Update version_date.tsv and changelogs after v24.8.7.41-lts 2024-11-18 15:16:24 +00:00
robot-clickhouse
fc688ccbec
Merge pull request #72029 from ClickHouse/auto/v24.10.2.80-stable
Update version_date.tsv and changelog after v24.10.2.80-stable
2024-11-18 15:12:19 +00:00
Nikita Taranov
14248d322e
Merge pull request #72026 from ClickHouse/test_for_33604
Add test for 33604
2024-11-18 14:59:34 +00:00
Yarik Briukhovetskyi
9f59fb6a5d
Merge branch 'ClickHouse:master' into fix_insert_hive_partititoning 2024-11-18 15:57:25 +01:00
Nikolai Kochetov
b25a01922c
Merge pull request #71966 from ClickHouse/fix-pk-const-monotonic-transform-for-2-args
Fix partition pruning with binary monotonic function by second arg.
2024-11-18 14:41:14 +00:00
robot-clickhouse
8bec9a1e34 Update version_date.tsv and changelogs after v24.10.2.80-stable 2024-11-18 14:34:58 +00:00
Dmitry Novik
d7f920d2cf
Merge pull request #71971 from ClickHouse/fix-error-counter-bitmapTransform
Do not increment counter in system.errors when bitmapTransform is used
2024-11-18 14:03:09 +00:00
Anton Ivashkin
fb4e1feb16 Add cleanup after test 2024-11-18 14:38:46 +01:00
Max Kainov
608aae85cf CI: Remove unsafe secret_envs input from yml workflows 2024-11-18 14:35:34 +01:00
Han Fei
841337d6fb Merge branch 'master' into hanfei/fix-write-text-order 2024-11-18 14:15:47 +01:00
Nikita Taranov
240c05b128 upd test 2024-11-18 14:04:02 +01:00
Nikita Taranov
3a012e5a96 enable s3_skip_empty_files by default 2024-11-18 13:55:18 +01:00
Sema Checherinda
67d1eb84aa Merge branch 'master' into chesema-merge-wb 2024-11-18 13:54:20 +01:00
Raúl Marín
fb552dd2c0 Remove unused trash 2024-11-18 13:49:11 +01:00
Nikita Taranov
e45dd36343 add test from Christoph 2024-11-18 13:38:26 +01:00
Nikita Taranov
bdf6ab8d45 Merge branch 'master' into fix_weird_problem 2024-11-18 13:06:17 +01:00
Nikita Taranov
c998df6c8c impl 2024-11-18 12:46:26 +01:00
avogar
05f638ea52 Update test 2024-11-18 11:44:54 +00:00
Raúl Marín
926f7ca7a2 Style changes 2024-11-18 12:14:18 +01:00
Raúl Marín
e5b7ba7717 Tidy 2024-11-18 12:07:39 +01:00
Anton Popov
fe0d96f72a fix tests 2024-11-18 10:41:47 +00:00
Anton Popov
62000b22fc Merge remote-tracking branch 'upstream/master' into HEAD 2024-11-18 10:38:23 +00:00
Nikolai Kochetov
5a23d19c75 Fix timezone in tests and old analyzer run. 2024-11-18 10:37:33 +00:00
Anton Ivashkin
2d48406a82 Fix test style 2024-11-18 11:21:32 +01:00
Vladimir Cherkasov
5445f55e62
Merge pull request #71857 from ClickHouse/vdimir/join_condition_executed_block_bug
Remove excess check in HashJoinMethodsImpl.h
2024-11-18 09:12:16 +00:00
Vladimir Cherkasov
3e05ffe675
Merge pull request #71560 from xogoodnow/json-utc-formatted-log
Added UTC date format (RFC 3339) for json formatted logging
2024-11-18 09:10:52 +00:00
Kseniia Sumarokova
ba0f03fce9
Merge branch 'master' into turn-off-boundary-alignment-for-table-engines 2024-11-18 10:07:16 +01:00
Miki Matsumoto
9f42828800 Remove unused temporary image files 2024-11-18 17:22:13 +09:00
李扬
b1e816f60c
Merge branch 'ClickHouse:master' into short_circut_func 2024-11-18 15:09:14 +08:00
Miki Matsumoto
1e15312729 add translated Japanese docs 2024-11-18 11:58:58 +09:00
Alexey Milovidov
01c5762fc5 Merge branch 'master' into miscellaneous-4 2024-11-18 03:49:41 +01:00
Alexey Milovidov
2d2d611bd3
Merge pull request #71778 from ClickHouse/docs-docker-links
[Docs] Update links to use official Docker image
2024-11-18 02:47:15 +00:00
Alexey Milovidov
aa23ab4b21
Merge pull request #71928 from Algunenano/local_ci
Adapt some tests to run in non-CI configurations
2024-11-18 02:46:47 +00:00
Alexey Milovidov
8e0dc599b8
Merge pull request #71948 from Blargian/docs_add_example
Clean up `EXCEPT` docs
2024-11-18 02:45:58 +00:00
李扬
b706458a23
Merge branch 'master' into short_circut_func 2024-11-18 10:39:51 +08:00
taiyang-li
f4e18669c4 fix failed uts 2024-11-18 10:30:41 +08:00
Nikita Mikhaylov
d7cc5e892e
Merge pull request #72014 from ClickHouse/fix-docs-asynchronous-metrics
Fix docs: asynchronous_metrics
2024-11-17 22:36:48 +00:00
Nikita Mikhaylov
57cefae6f2
Merge pull request #72018 from vitlibar/correction-after-reworking-backup-sync-3
Corrections after reworking backup/restore synchronization #3
2024-11-17 22:36:20 +00:00
Nikita Taranov
c198e1cb1f
Merge pull request #67782 from ClickHouse/better_parallel_hash2
Scatter blocks in hash join without copying
2024-11-17 21:02:26 +00:00
Vitaly Baranov
e00128c717 Increase timeout in test test_long_disconnection_stops_backup. 2024-11-17 17:36:22 +01:00
Vitaly Baranov
a7831c991f Better conditions when cancelling a backup. 2024-11-17 17:33:38 +01:00
Robert Schulze
742f1eb41e
Merge pull request #71403 from petern48/alias_any_respect_nulls
Added camelCase aliases for `any`/`anyLast` aggregation functions
2024-11-17 16:02:10 +00:00
Nikita Taranov
d0842ee937 don't squash output for ordinary join for now 2024-11-17 15:36:22 +01:00
Sema Checherinda
6ba8afc443 fix benchmark 2024-11-17 11:52:51 +01:00
Robert Schulze
3bdd4a5173
Consistency fixups 2024-11-17 10:21:09 +00:00
Robert Schulze
61b3231a72
Merge pull request #71993 from rschu1ze/followup-71581
Minor follow-up to #71581
2024-11-17 09:19:53 +00:00
Alexey Milovidov
0a9560adb5
Merge pull request #71999 from pratimapatel2008/patch-1
Update s3queue.md
2024-11-17 05:58:24 +00:00
Alexey Milovidov
fc77a01de8
Merge pull request #71994 from linhgiang24/patch-4
Update aggregatingmergetree.md to include video
2024-11-17 05:58:18 +00:00
Peter Nguyen
082d639043 Empty commit 2024-11-16 20:38:18 -08:00
Shichao Jin
d61e2e1c28
Merge pull request #72016 from petern48/fix_typo_agg_funcs_doc
Fix typos in aggregation function docs
2024-11-17 00:53:49 +00:00
Peter Nguyen
f9431a3150 Update docs for any, anyLast, first_value, and last_value 2024-11-16 15:49:35 -08:00
Peter Nguyen
77d288a3e5 Add 03261_any_respect_camelCase_aliases.sql 2024-11-16 15:48:09 -08:00
Sema Checherinda
e9fff481fa Merge branch 'master' into chesema-merge-wb 2024-11-17 00:46:58 +01:00
Sema Checherinda
63aacef8d5 Merge branch 'master' into chesema-merge-wb 2024-11-17 00:42:03 +01:00
Nikita Taranov
ade2dadd01
Merge branch 'master' into fix_weird_problem 2024-11-16 23:57:18 +01:00
Peter Nguyen
7d5fc90b19 Add lastValueRespectNulls and firstValueRespectNulls aliases 2024-11-16 14:43:10 -08:00
Peter Nguyen
df0eec90e8 Fix typos 'of of' and 'The a' in agg functions index.html 2024-11-16 13:49:51 -08:00
Nikita Taranov
ab6e49b930
Update src/Interpreters/HashJoin/HashJoin.cpp 2024-11-16 21:42:07 +01:00
Alexey Milovidov
ada1af5718 Fix docs 2024-11-16 21:16:38 +01:00
Alexey Milovidov
7705f9b009 Fix docs 2024-11-16 21:16:15 +01:00
Alexey Milovidov
39ae3f4da5 Miscellaneous 2024-11-16 21:15:54 +01:00
alesapin
208fd6efe1
Merge pull request #71786 from CurtizJ/const-adaptive-granularity
Allow to use constant adaptive index granularity for whole part
2024-11-16 19:32:57 +00:00
Nikita Taranov
3a2dca0193
Merge branch 'master' into better_parallel_hash2 2024-11-16 20:09:46 +01:00
Nikita Taranov
1f7e2845be
Merge pull request #71868 from ClickHouse/fix_hash_table_stats
More accurate `calculateCacheKey` implementation
2024-11-16 13:48:46 +00:00
Yakov Olkhovskiy
8bd95a40af
Merge pull request #71849 from ClickHouse/fix-toDayOfWeek-mono
Fix: add monotonic estimation for DateTime64 in toDayOfWeek
2024-11-16 13:28:06 +00:00
Ali
59f2c44a52
Merge branch 'ClickHouse:master' into json-utc-formatted-log 2024-11-16 11:29:48 +03:30
Pratima Patel
183593a568
Update s3queue.md
Updated description for s3queue_polling_min_timeout_ms, s3queue_polling_max_timeout_ms and s3queue_polling_backoff_ms properties
2024-11-15 21:02:40 -05:00
Alexander Gololobov
5ca9f2e570
Merge pull request #71977 from ClickHouse/fix_00098_primary_key_memory_allocated
Fix 00098_primary_key_memory_allocated
2024-11-16 02:00:54 +00:00
Alexey Milovidov
ba757696eb
Merge pull request #71949 from evillique/fix-highlighting
Fix a crash in clickhouse-client syntax highlighting
2024-11-16 01:32:14 +00:00
Alexey Milovidov
c31f6968c0
Merge pull request #71986 from ClickHouse/revert-71914-revert-71790-remove-code-bloat
Add a test for #71908
2024-11-16 00:53:32 +00:00
Alexander Gololobov
9270deb83e Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix_00098_primary_key_memory_allocated 2024-11-15 22:57:39 +01:00
Yakov Olkhovskiy
571cf33136 Merge branch 'master' into fix-toDayOfWeek-mono 2024-11-15 21:17:19 +00:00
Nikolay Degterinsky
936eb3a567 Add comment and test 2024-11-15 20:44:34 +00:00
Anton Popov
1aa3e47e89 fix prewarm of mark cache after adding a new column 2024-11-15 20:31:24 +00:00
Anton Popov
f97a1150b9 fix index granularity with empty parts 2024-11-15 20:20:56 +00:00
Nikita Taranov
a82ab36c08 try fix 2024-11-15 20:41:27 +01:00
Linh Giang
864f35dd11
Update aggregatingmergetree.md to include video
Added relevant video to the page.
2024-11-15 11:30:01 -07:00
Raúl Marín
072e81e5e5 Merge remote-tracking branch 'blessed/master' into local_ci 2024-11-15 19:21:37 +01:00
Raúl Marín
93403eb38e Merge remote-tracking branch 'blessed/master' into experimental_tiers_switch 2024-11-15 19:13:03 +01:00
Raúl Marín
ec0bdcc1cb Test and fix reload of default profile with allowed experimental settings from config 2024-11-15 19:11:18 +01:00
Nikolai Kochetov
4831414476 Updating test. 2024-11-15 17:57:26 +00:00
Han Fei
91b62c56d2 fix bug when column description has settings, ttl and statistics 2024-11-15 18:54:01 +01:00
Robert Schulze
9bd6f9c6b4
Smaller fixups 2024-11-15 17:47:20 +00:00
Raúl Marín
268b823010 Test new users 2024-11-15 18:37:21 +01:00
Raúl Marín
f73d48c61b Some integration tests for allowed_feature_tier 2024-11-15 18:23:14 +01:00
Raúl Marín
764dd82345 Support MergeTree settings and clickhouse local 2024-11-15 18:21:53 +01:00
Alexey Milovidov
8d4cc787fe
Merge pull request #71774 from petern48/enable_http_compression_default
Set enable_http_compression default value to 1
2024-11-15 17:10:14 +00:00
Kseniia Sumarokova
e58e6dd4bd
Merge branch 'master' into fix-s3-queue-log-processed-rows 2024-11-15 17:24:26 +01:00
Raúl Marín
bff84d44e8 Analyzer is not beta 2024-11-15 17:19:08 +01:00
Nikolai Kochetov
ee7b53646f Merge branch 'master' into fix-pk-const-monotonic-transform-for-2-args 2024-11-15 16:07:45 +00:00
Vladimir Cherkasov
7cc4df487a
Merge branch 'master' into vdimir/join_condition_executed_block_bug 2024-11-15 16:58:35 +01:00
Vladimir Cherkasov
e106ae1232
Merge branch 'master' into vdimir/grouping_sets_aliases 2024-11-15 16:58:11 +01:00
Alexey Milovidov
d5b3228b98 Miscellaneous 2024-11-15 16:47:01 +01:00
Alexey Milovidov
85a7a5fb2e Add a test 2024-11-15 16:45:22 +01:00
Alexey Milovidov
66ff828fae
Merge pull request #71945 from ClickHouse/revert-71914-revert-71790-remove-code-bloat
Revert "Revert "Remove ridiculous code bloat""
2024-11-15 16:44:34 +01:00
Kseniia Sumarokova
49e05329c2
Update Settings.cpp 2024-11-15 16:34:41 +01:00
Kseniia Sumarokova
92754f80cc
Update FileCache.cpp 2024-11-15 16:33:02 +01:00
Robert Schulze
469733d327
Merge pull request #71581 from KevinyhZou/fix_comments_parse_date_time
Add function `parseDateTime64` and follow-up to #70737
2024-11-15 15:31:46 +00:00
Robert Schulze
358dd5da32
Merge pull request #71973 from rschu1ze/cmake-docs
Add comment about bf16 to CMake docs
2024-11-15 15:31:27 +00:00
Alexander Gololobov
c81dccdcdf
Fix table name 2024-11-15 15:31:40 +01:00
avogar
c2543d0316 Allow only SELECT queries in EXPLAIN AST used inside subquery 2024-11-15 14:20:05 +00:00
Nikolai Kochetov
252effe32c
Merge pull request #71964 from ClickHouse/reenable-merge-filters-optimization
Reenable merge filters optimization.
2024-11-15 14:04:01 +00:00
robot-clickhouse
0b3945e48a Automatic style fix 2024-11-15 13:55:39 +00:00
kssenii
0e24114b16 Fix 2024-11-15 14:46:38 +01:00
Igor Nikonov
c5b12d3e16
Merge pull request #71162 from ClickHouse/pr-right-joins
Fix right JOINS with parallel replicas
2024-11-15 13:32:40 +00:00
Alexander Gololobov
bb4549eb08
Merge pull request #66606 from ClickHouse/vdimir/tmp_data_refactoring
Refactor TempDataOnDisk
2024-11-15 13:23:15 +00:00
Alexander Gololobov
e085f14aa6 Force PK index load before checking its size in memory 2024-11-15 14:06:53 +01:00
Alexander Gololobov
c66f71c795 Log PK index loading 2024-11-15 14:05:52 +01:00
Sema Checherinda
b3f4e3e5a5 Merge branch 'master' into chesema-merge-wb 2024-11-15 13:53:46 +01:00
Dmitry Novik
373ce71157 Do not run test in parallel 2024-11-15 13:40:10 +01:00
Dmitry Novik
0cae881171 Fix test 2024-11-15 13:40:10 +01:00
Dmitry Novik
540e9bc893 Do not increment counter in system.errors when bitmapTransform is used 2024-11-15 13:40:10 +01:00
Max Kainov
f29d7841fe
Merge pull request #63518 from qhsong/dev/profile_uniq_id
Enhance ClickHouse Profile: generate a uniq id for steps and processors
2024-11-15 12:19:05 +00:00
Max Kainov
da632e4d83
Merge pull request #71944 from ClickHouse/nickitat-patch-29
Don't randomise settings in 02354_distributed_with_external_aggregation_memory_usage
2024-11-15 12:18:26 +00:00
Max Kainov
1fb1bfe6f9
Merge pull request #71974 from ClickHouse/revert-71081-ci_paktika_integration_4
Revert "CI: Functional Tests with praktika"
2024-11-15 12:01:45 +00:00
Max Kainov
ff609bc501
Revert "CI: Functional Tests with praktika" 2024-11-15 12:55:30 +01:00
Robert Schulze
9c5017323d
Add comment about bf16 to CMake docs 2024-11-15 11:50:08 +00:00
vdimir
e70bfd8f3c
bump build 2024-11-15 11:49:20 +00:00
kssenii
8cfec23dbe Return lost change after conflict resolution 2024-11-15 11:57:50 +01:00
Max Kainov
3b0b42cbbb
Merge pull request #71081 from ClickHouse/ci_paktika_integration_4
CI: Functional Tests with praktika
2024-11-15 10:46:01 +00:00
Nikolai Kochetov
628d0d3fc9 Fix monotonic function argument type in PK monotonic chain transformation. 2024-11-15 10:35:30 +00:00
kssenii
96dc3cd55a Fix flaky check 2024-11-15 11:21:28 +01:00
Nikolai Kochetov
4db481f7da Reenable merge filters optimization. 2024-11-15 10:08:15 +00:00
Vladimir Cherkasov
f6366252f2
Merge branch 'master' into vdimir/grouping_sets_aliases 2024-11-15 10:46:58 +01:00
Konstantin Bogdanov
98cd45153d
Merge pull request #71929 from ClickHouse/fix-build-after-71179
Fix build with Clang-19 after #71179
2024-11-15 08:24:25 +00:00
xogoodnow
d55ebb19e0 Re run pipeline 2024-11-15 11:10:31 +03:30
Julia Kartseva
3c0f299148
Merge pull request #71901 from jkartseva/fix-infile-interactive-metrics
Fix data race between progress indicator and progress table in clickhouse-client
2024-11-15 02:16:12 +00:00
Alexey Milovidov
4dc9331b7a
Merge pull request #64712 from ClickHouse/fp16
Adding BFloat16
2024-11-15 00:37:46 +00:00
Max Kainov
efabf19926 fix install.sh 2024-11-14 23:57:57 +00:00
Nikolay Degterinsky
0bd6a1fb04 Fix client highlighting 2024-11-14 23:01:46 +00:00
Nikita Taranov
1c682f1316 impl 2024-11-14 23:49:58 +01:00
Alexey Milovidov
d2c54bc140
Update AggregateFunctionDeltaSumTimestamp.cpp 2024-11-14 23:49:44 +01:00
Julia Kartseva
26aaa87a91 intercept keystrokes for INSERT queries, too 2024-11-14 22:18:46 +00:00
Julia Kartseva
e5f4ba8017 fix race between progress indicator and progress table 2024-11-14 22:18:46 +00:00
Blargian
af8d7c0b60 fix style 2024-11-14 23:14:41 +01:00
Blargian
1926f6ca4a clean up EXCEPT clause page and add an example of EXCEPT() 2024-11-14 23:09:49 +01:00
Vitaly Baranov
c98765a509
Merge pull request #71912 from vitlibar/correction-after-reworking-backup-sync-2
Corrections after reworking backup/restore synchronization #2
2024-11-14 22:00:44 +00:00
Igor Nikonov
5a04826fa5 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-14 21:11:25 +00:00
Igor Nikonov
7d3d940b08 Cleanup 2024-11-14 21:11:01 +00:00
Alexey Milovidov
7007ce7596
Merge pull request #71898 from ClickHouse/fix-benchmark
Fix `clickhouse-benchmark` metrics report
2024-11-14 21:38:04 +01:00
kssenii
6b1eae5899 Fix 2024-11-14 20:54:43 +01:00
Alexey Milovidov
8d99fb9e7c
Revert "Revert "Remove ridiculous code bloat"" 2024-11-14 20:51:18 +01:00
Nikita Taranov
13abc806a2
Don't randomise settings in 02354_distributed_with_external_aggregation_memory_usage
maybe it will help, i'm not sure
2024-11-14 20:35:33 +01:00
Alexey Milovidov
e6c6217e87 Merge branch 'master' into fp16 2024-11-14 19:58:22 +01:00
Peter Nguyen
f1b4e7ea59
Merge branch 'master' into enable_http_compression_default 2024-11-14 11:27:52 -07:00
Anton Popov
8a79e1959f fix test 2024-11-14 17:31:54 +00:00
Anton Popov
9cccea93d2 better index granularity 2024-11-14 16:40:56 +00:00
Vladimir Cherkasov
73362e7339
Merge pull request #71924 from ClickHouse/vdimir/fix_mongodb_secure
Fix test_storage_mongodb/test.py::test_secure_connection_uri
2024-11-14 16:38:05 +00:00
Vladimir Cherkasov
ad65cdab90
Merge branch 'master' into acquire_zero_copy_shared_lock_before_swap 2024-11-14 17:35:17 +01:00
Pavel Kruglov
d3db070cc5
Merge pull request #71931 from ClickHouse/Avogar-patch-7
Fix flaky test 03262_column_sizes_with_dynamic_structure
2024-11-14 16:22:42 +00:00
xogoodnow
99e5e550da Omitted comment and reformatted
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-14 19:47:30 +03:30
Alexey Milovidov
62f44b9e6a Merge branch 'master' into fp16 2024-11-14 17:16:45 +01:00
Alexey Milovidov
903e403b06
Merge pull request #71900 from ClickHouse/remove-trash-2
Remove useless code
2024-11-14 17:15:59 +01:00
xogoodnow
5ae6572cd6 ran black
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-14 19:33:32 +03:30
Sema Checherinda
21a39e6b50 work with review comments 2024-11-14 16:57:50 +01:00
xogoodnow
140bd01427 Corrected the check for time format
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-14 19:20:30 +03:30
Max Kainov
941c0f0c3b add stateful tests 2024-11-14 15:36:49 +00:00
Anton Popov
2ed8e4c8b8
Merge pull request #71886 from wxybear/fix_with_ties_when_rows_read_less_than_request
Fix: select statements that use 'with ties' might not return enough rows
2024-11-14 15:34:05 +00:00
Igor Nikonov
6441c59607 Better 2024-11-14 15:24:47 +00:00
Pavel Kruglov
af5f1f5c1d
Update 03262_column_sizes_with_dynamic_structure.sql 2024-11-14 16:24:07 +01:00
Pavel Kruglov
88280aa3fd
Update 03262_column_sizes_with_dynamic_structure.reference 2024-11-14 16:23:04 +01:00
Pavel Kruglov
726dae2f0d
Fix flaky test 03262_column_sizes_with_dynamic_structure 2024-11-14 16:22:26 +01:00
Vladimir Cherkasov
cf90bfaf79
Update src/Analyzer/ValidationUtils.cpp
Co-authored-by: Dmitry Novik <n0vik@clickhouse.com>
2024-11-14 16:18:33 +01:00
vdimir
fde4eb43d5
Revert "fix group_by_use_nulls"
This reverts commit 6249861d16.
2024-11-14 15:17:04 +00:00
Dmitry Novik
005a3f7a36
Fix build with Clang-19 after #71179 2024-11-14 15:42:14 +01:00
Yakov Olkhovskiy
43c2b69b6c Merge branch 'master' into fix-toDayOfWeek-mono 2024-11-14 14:37:06 +00:00
Anton Popov
5c8bf52954 Merge remote-tracking branch 'upstream/master' into HEAD 2024-11-14 14:31:31 +00:00
Vladimir Cherkasov
5fafb44446
m 2024-11-14 15:05:34 +01:00
Raúl Marín
236b09989d Adapt some test to run in non-CI configurations 2024-11-14 15:01:16 +01:00
Raúl Marín
b601541ea5 Use standard variable 2024-11-14 14:37:03 +01:00
Sema Checherinda
92c4dcfa5c
Merge pull request #71863 from ClickHouse/chesema_update_hostresolver
update host resolver a little bit often
2024-11-14 13:28:28 +00:00
vdimir
fb1c2a470a
Fix test_storage_mongodb/test.py::test_secure_connection_uri 2024-11-14 13:25:15 +00:00
kevinyhzou
0305f04494 delete 03252 parse datetime64 test 2024-11-14 20:20:54 +08:00
Nikita Taranov
aeda0db12c fix test 2024-11-14 13:16:28 +01:00
Raúl Marín
22d2c856a7
Merge pull request #71890 from Algunenano/disable_query_plan_merge_filters
Disable query_plan_merge_filters by default
2024-11-14 12:15:46 +00:00
Raúl Marín
4490e854c2
Merge pull request #71867 from Algunenano/allow_reorder_prewhere_conditions_enable
allow_reorder_prewhere_conditions is on by default in old services
2024-11-14 12:14:37 +00:00
kevinyhzou
3fb4bf41bc reslove conflict 2024-11-14 20:02:48 +08:00
Alexander Gololobov
6e864958f9
Merge pull request #71866 from ClickHouse/fix_index_load_for_limit_1
Do not load indexes if key condition in not useful
2024-11-14 11:58:24 +00:00
kssenii
13d3f9171c Merge remote-tracking branch 'origin/master' into turn-off-boundary-alignment-for-table-engines 2024-11-14 12:51:55 +01:00
Raúl Marín
246a6f36d4
Merge pull request #71914 from ClickHouse/revert-71790-remove-code-bloat
Revert "Remove ridiculous code bloat"
2024-11-14 11:50:17 +00:00
Raúl Marín
c8833d6eba
Revert "Remove ridiculous code bloat" 2024-11-14 12:49:41 +01:00
vdimir
1da07b6fe5
Merge branch 'master' into vdimir/grouping_sets_aliases 2024-11-14 11:47:29 +00:00
kssenii
a9409299d1 Allow to change the setting 2024-11-14 12:46:33 +01:00
Kseniia Sumarokova
3300d124d3
Merge pull request #71856 from ClickHouse/add-check-fs-cache
Add check and assertion
2024-11-14 11:31:17 +00:00
Kseniia Sumarokova
75b852e5a1
Merge pull request #71648 from ClickHouse/add-a-setting-to-control-cache-background-download-upper-limit
fs cache: add a separate setting for background download max size
2024-11-14 11:19:21 +00:00
Vitaly Baranov
380aea0fc3 Corrections after reworking synchronization of ON CLUSTER BACKUPs/RESTOREs #2. 2024-11-14 12:18:56 +01:00
kevinyhzou
61d0440f85 modify test 2024-11-14 19:14:15 +08:00
Kseniia Sumarokova
9c3984b735
Merge pull request #71817 from ClickHouse/kssenii-patch-13
Update defaults of s3/azure queue polling settings
2024-11-14 11:08:04 +00:00
Sema Checherinda
5b3b9fad2f
Merge branch 'master' into chesema-merge-wb 2024-11-14 12:04:00 +01:00
Yarik Briukhovetskyi
8d306bfd75
Merge branch 'ClickHouse:master' into fix_insert_hive_partititoning 2024-11-14 11:58:16 +01:00
Anton Ivashkin
57ddde47ea Use auxiliary keeper for cluster discovery 2024-11-14 11:16:48 +01:00
xogoodnow
1ccd88e6df By default the "date_time_utc" is not included in the log
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-14 13:12:55 +03:30
Igor Nikonov
0f63a32d12 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-14 09:32:48 +00:00
Igor Nikonov
17327a242d Cleanup 2024-11-14 09:32:28 +00:00
Igor Nikonov
d6b3f94a35 Cleanup 2024-11-14 09:30:58 +00:00
yun
5a6beb7ad0 fix typo: parititon => partition 2024-11-14 01:13:56 -08:00
kevinyhzou
1dc969c560 fix comments 2024-11-14 16:48:17 +08:00
kevinyhzou
0349eeed37 Merge branch 'master' into fix_comments_parse_date_time 2024-11-14 16:41:52 +08:00
kevinyhzou
66a216f63c fix comments 2024-11-14 16:25:41 +08:00
taiyang-li
02de47c9ba Merge remote-tracking branch 'origin/master' into short_circut_func 2024-11-14 11:27:49 +08:00
taiyang-li
1e1ea07268 Merge branch 'short_circut_func' of https://github.com/bigo-sg/ClickHouse into short_circut_func 2024-11-14 11:25:19 +08:00
taiyang-li
932caea5f7 improve performance 2024-11-14 11:24:56 +08:00
Alexey Milovidov
5108e070cf Remove useless code 2024-11-14 03:22:44 +01:00
Nikita Mikhaylov
7a393dc140
Merge pull request #71865 from ClickHouse/rabbitmq-healthcheck
Added proper a healthcheck for RabbitMQ compose file
2024-11-14 00:59:00 +00:00
Alexey Milovidov
89ca45a278
Merge pull request #71790 from ClickHouse/remove-code-bloat
Remove ridiculous code bloat
2024-11-14 01:27:26 +01:00
Alexey Milovidov
d4599a68fa No, this is better 2024-11-14 00:34:34 +01:00
Alexey Milovidov
d59087a0f6 This is better 2024-11-14 00:21:41 +01:00
Alexey Milovidov
6ea31c81e1 Merge branch 'fix-benchmark' into fp16 2024-11-14 00:17:12 +01:00
Alexey Milovidov
2ddd45cd03 Add a test 2024-11-14 00:11:03 +01:00
udiz
6879aa130a newline 2024-11-13 22:47:54 +00:00
udiz
43f3c886a2 add test 2024-11-13 22:46:36 +00:00
Nikita Taranov
ac0f013fab upd test 2024-11-13 23:36:06 +01:00
Alexey Milovidov
455d362904 Fix clickhouse-benchmark 2024-11-13 23:33:37 +01:00
Alexey Milovidov
55f758fa29 This should be better 2024-11-13 23:33:09 +01:00
Nikita Taranov
94ce517dc1 upd docs 2024-11-13 22:41:30 +01:00
Nikita Taranov
8c3fe9e2c2 upd test 2024-11-13 22:31:23 +01:00
Nikita Taranov
c10de3969c Merge branch 'master' into dev/profile_uniq_id 2024-11-13 22:30:14 +01:00
Anton Ivashkin
3145aeda84 Cluster autodiscovery with auxiliary keeper test 2024-11-13 22:24:37 +01:00
Anton Popov
acd4f46d9c
Merge pull request #71179 from kirillgarbar/table-limit
Hard limits on number of replicated tables, dictionaries and views
2024-11-13 21:13:49 +00:00
Igor Nikonov
33fb3b7099 Test cleanup 2024-11-13 21:13:32 +00:00
Alexey Milovidov
78083130f1 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fp16 2024-11-13 22:11:31 +01:00
Anton Popov
fa8b5283fa
Merge pull request #71854 from CurtizJ/fix-adding-defaults-sparse
Fix filling of defaults after parsing into sparse columns
2024-11-13 21:11:15 +00:00
Igor Nikonov
b2dbbea179 Code cleanup 2024-11-13 21:10:59 +00:00
Alexey Milovidov
e86ee62eb0 Merge branch 'master' into remove-code-bloat 2024-11-13 22:02:44 +01:00
Alexey Milovidov
46fffd27ab
Merge pull request #71869 from ClickHouse/vdimir/test_max_parts_to_move
add test 03248_max_parts_to_move
2024-11-13 21:01:51 +00:00
Nikita Taranov
436462ce98 upd tests 2024-11-13 21:54:45 +01:00
Nikita Taranov
05ed5f28a5 small fixes + add test 2024-11-13 21:51:33 +01:00
Igor Nikonov
7d0a6bd1b8 update 02967_parallel_replicas_joins_and_analyzer.reference 2024-11-13 20:48:03 +00:00
kssenii
e8173de80b Fix 2024-11-13 21:26:39 +01:00
Nikita Mikhaylov
eef2006b68
Merge pull request #71300 from cwurm/reject_invalid_mutation_queries
Check that mutation queries are valid
2024-11-13 20:14:09 +00:00
udiz
c383a743f7 arrayWithConstant size estimation using single value size 2024-11-13 20:02:31 +00:00
Nikita Taranov
6bac632b39 Merge branch 'master' into dev/profile_uniq_id 2024-11-13 20:42:35 +01:00
Igor Nikonov
b8731dc4f4 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-13 19:33:26 +00:00
Igor Nikonov
d34f11a833 Fix RIGHT join with PR local plan 2024-11-13 19:32:47 +00:00
Nikita Mikhaylov
191fe999c1
Merge pull request #71715 from vitlibar/correction-after-reworking-backup-sync
Corrections after reworking backup/restore synchronization
2024-11-13 19:24:53 +00:00
Raúl Marín
0575be39f3 Adapt tests to default optimizations 2024-11-13 19:26:43 +01:00
Nikita Mikhaylov
e944c6a221
Merge pull request #71872 from tbragin/patch-20
Update README.md - Update meetups
2024-11-13 18:20:43 +00:00
Kseniia Sumarokova
451a1da6c4
Update test.py 2024-11-13 18:48:14 +01:00
Raúl Marín
66ebdd050e Disable query_plan_merge_filters by default 2024-11-13 18:43:49 +01:00
Alexey Milovidov
d33f368fd9
Merge branch 'master' into fp16 2024-11-13 18:21:20 +01:00
vdimir
6249861d16
fix group_by_use_nulls 2024-11-13 17:20:19 +00:00
Raúl Marín
e6d70cf0f2 Merge remote-tracking branch 'blessed/master' into experimental_tiers_switch 2024-11-13 17:59:36 +01:00
Yarik Briukhovetskyi
9c22f3d89f
Review update. 2024-11-13 17:54:59 +01:00
Yarik Briukhovetskyi
a41cadb150
init 2024-11-13 17:37:38 +01:00
kssenii
8840739bd4 Fix assert 2024-11-13 17:29:06 +01:00
Yakov Olkhovskiy
b7e7c48842 fix transformer for custom week adapter, add name to ZeroTransform 2024-11-13 16:22:49 +00:00
wxybear
b90a8a62d8 comments: fix typo 2024-11-14 00:18:45 +08:00
Tanya Bragin
dbc6949ef7
Update README.md - Update meetups
Move Barcelona to completed
2024-11-13 08:09:10 -08:00
wxybear
2d85df2748 fix: incorrect assignment of previous_row_chunk leads to logical errors 2024-11-14 00:05:11 +08:00
Kseniia Sumarokova
d2fbc4ab16
Update test.py 2024-11-13 16:27:15 +01:00
Nikita Taranov
9f62518846
Merge pull request #71502 from nauu/support_more_oss_endpoints_v1
Support the endpoint of oss accelerator
2024-11-13 15:21:42 +00:00
Pavel Kruglov
f5c91bf809
Merge pull request #71526 from Avogar/fix-dynamic-sizes
Fix counting column size in wide part for Dynamic and JSON types
2024-11-13 15:15:24 +00:00
Nikita Mikhaylov
3a255c754e
Merge pull request #71192 from amosbird/better-compressor
Print compression method in clickhouse-compressor --stat
2024-11-13 15:07:05 +00:00
Nikita Mikhaylov
82dcd87bf6
Merge pull request #71679 from amosbird/fix-71647
Fix LOGICAL_ERROR when doing ALTER with empty tuple
2024-11-13 14:59:02 +00:00
Dmitry Novik
6f3e817be9
Fix a typo 2024-11-13 15:38:33 +01:00
vdimir
368b45670b
add test 03248_max_parts_to_move 2024-11-13 14:35:17 +00:00
Alexander Gololobov
31e27d3678 Update tests: check that indexes are not loaded when not needed 2024-11-13 15:31:57 +01:00
Nikita Taranov
04e80e675a impl 2024-11-13 15:26:07 +01:00
Sema Checherinda
e1901fa739
Merge pull request #71529 from ClickHouse/chesema-remove-if-exists
use removeObjectIfExists instead removeObject, it is retryable
2024-11-13 14:24:10 +00:00
Sema Checherinda
e5e95b8899 style c-tor 2024-11-13 15:18:26 +01:00
vdimir
b702a0e2a6
fix build 2024-11-13 14:17:49 +00:00
Sema Checherinda
3ba6c18037 fix c-tor 2024-11-13 15:17:21 +01:00
Sema Checherinda
8e9dfdae00 rename var 2024-11-13 15:12:45 +01:00
kssenii
673655b916 Fix 2024-11-13 15:04:25 +01:00
Raúl Marín
156ca86404 allow_reorder_prewhere_conditions should be on by default in old services 2024-11-13 15:01:18 +01:00
Alexander Gololobov
796ac4350f Do not load indexes if key condition in not useful 2024-11-13 14:52:49 +01:00
vdimir
3d086a637f
fix reserve in TemporaryDataBuffer 2024-11-13 13:43:30 +00:00
Max Vostrikov
e00e06b162
Merge pull request #71829 from ClickHouse/test_parseDateTime64InJodaSyntax
tests for parseDateTime64InJodaSyntax
2024-11-13 13:42:49 +00:00
Nikita Mikhaylov
e7ab5fd649 Added proper healthcheck 2024-11-13 14:41:16 +01:00
vdimir
dd246fae0e
Merge branch 'master' into vdimir/tmp_data_refactoring 2024-11-13 13:21:26 +00:00
vdimir
8b340c864a
better 2024-11-13 13:19:56 +00:00
Kseniia Sumarokova
a02b20a981
Merge pull request #71578 from ClickHouse/rename-setting
Rename a setting
2024-11-13 13:11:34 +00:00
kssenii
57867704f5 Fix 2024-11-13 14:07:13 +01:00
vdimir
26767b7955
proper fix 2024-11-13 12:46:45 +00:00
Sema Checherinda
746053e7e0 update host resolver a little bit often 2024-11-13 13:46:05 +01:00
Nikolai Kochetov
4d269bd944
Merge pull request #71539 from ClickHouse/enable-merge-filters-optimization
Enable merge filters optimization.
2024-11-13 12:03:24 +00:00
Max Kainov
73fa0f93a5 arm build 2024-11-13 12:02:13 +00:00
Aleksei Filatov
eb384d489c Fix style for tests 2 2024-11-13 11:51:42 +00:00
kssenii
64881138cc More assertion 2024-11-13 12:31:09 +01:00
Vladimir Cherkasov
41415197ab
stylecheck 2024-11-13 12:28:46 +01:00
kssenii
3efee51942 Add assert 2024-11-13 12:27:44 +01:00
vdimir
c29be90fd6
Remove excess check in HashJoinMethodsImpl.h 2024-11-13 11:26:00 +00:00
kssenii
acf330d83d Add check 2024-11-13 12:20:22 +01:00
Anton Popov
b9f686b47c fix filling of defaults after parsing into sparse columns 2024-11-13 11:15:44 +00:00
Aleksei Filatov
2aa5447f09 Fix style for tests 2024-11-13 11:02:30 +00:00
vdimir
19bb9e0853
Fix GROUPING function error when input is ALIAS on distribured table, close #68602 2024-11-13 11:00:02 +00:00
Kseniia Sumarokova
10a9dbf36c
Update test.py 2024-11-13 11:54:15 +01:00
Anton Popov
511045840b Merge remote-tracking branch 'upstream/master' into HEAD 2024-11-13 10:32:46 +00:00
Sema Checherinda
bf9ceed6ad restore 01111_create_drop_replicated_db_stress.sh 2024-11-13 11:17:56 +01:00
Kirill
38f323ccdc
Add settings to docs 2024-11-13 12:49:58 +03:00
xogoodnow
32311c1db9 Added comment for example log output
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-13 12:39:02 +03:30
xogoodnow
242c2d99ba Added comment for example log output
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-13 12:37:42 +03:30
xogoodnow
51b7916baa Included the DATE_TIME_UTC parameter within the config files
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-13 12:31:56 +03:30
xogoodnow
bf188495bd Included the new parameter within the config all keys file
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-13 12:28:11 +03:30
Pablo Marcos
9caac43b2a
Merge pull request #71473 from ClickHouse/improve-system-query-metric-log
Improve performance of system.query_metric_log
2024-11-13 08:38:13 +00:00
kevinyhzou
5e4dd5d32a fix comments 2024-11-13 12:16:22 +08:00
kevinyhzou
4ea106712f fix comments 2024-11-13 11:49:31 +08:00
Yakov Olkhovskiy
f7c46114f4 add monotonic estimation for DateTime64 in toDayOfWeek, add test 2024-11-13 02:42:31 +00:00
Alexey Milovidov
3ae560d0d0
Merge pull request #71847 from ClickHouse/build-profile-in-prs
Enable build profiling in pull requests
2024-11-13 02:17:49 +00:00
Alexey Milovidov
8a724cd2fa Fix tidy 2024-11-13 02:50:18 +01:00
Alexey Milovidov
a4c26e9c79 Merge branch 'master' into fp16 2024-11-13 02:21:05 +01:00
Alexey Milovidov
61202499b5 Enable build profiling in pull requests 2024-11-13 02:10:40 +01:00
Alexey Milovidov
1cd6e944e2 Merge branch 'master' into remove-code-bloat 2024-11-13 01:38:16 +01:00
Shichao Jin
b68315e594
Merge pull request #71820 from ClickHouse/chesema-fix-00755
relax memory limit for 00755_avg_value_size_hint_passing.sql
2024-11-12 23:52:28 +00:00
Alexey Milovidov
58ba54ca21 Fix logical error 2024-11-12 22:05:09 +01:00
Aleksei Filatov
57ceeb4a63 Change acquiring zero-copy shared lock during moving part 2024-11-12 20:38:23 +00:00
Alexey Milovidov
18a26c1cd0 Fix logical error 2024-11-12 21:15:23 +01:00
xogoodnow
864a8a63df Added a fix
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-12 23:38:22 +03:30
Nikolai Kochetov
de4110097f Fix mox typos. 2024-11-12 19:49:37 +00:00
Raúl Marín
cd97103526 Allow changes in default profile 2024-11-12 20:24:48 +01:00
Raúl Marín
cd269f82d3 Missing experimental tag 2024-11-12 19:39:01 +01:00
Anton Popov
f9a9407186 add unit test for constant index granularity 2024-11-12 18:37:09 +00:00
Nikolai Kochetov
31b4c6c3e9 Fix typo and cleanup. 2024-11-12 18:22:02 +00:00
Mikhail f. Shiryaev
2e3145c757
Merge pull request #71825 from ClickHouse/bake-docker-official-library
Address the last point regarding chmod for /etc/clickhouse*
2024-11-12 18:19:20 +00:00
Alexander Gololobov
1ecd1909d9
Merge pull request #71798 from ClickHouse/fix_async_metrics_read
Allow reading previous vaules of async metrics during update
2024-11-12 18:15:23 +00:00
Mikhail f. Shiryaev
e71db57c11
Merge pull request #57203 from ClickHouse/docker-library
Docker library
2024-11-12 18:04:20 +00:00
Anton Popov
b758838c73 fix test 2024-11-12 17:25:27 +00:00
Kseniia Sumarokova
f8a5464603
Merge pull request #71818 from ClickHouse/fix-mode-in-system-s3queue-settings
Add missing fields in system.s3/azure_queue_settings
2024-11-12 17:19:31 +00:00
Vladimir Cherkasov
9ac8534e60
Merge pull request #68234 from ClickHouse/vdimir/ignore_nulls_query_tree_elimination
Fix OrderByLimitByDuplicateEliminationPass with IGNORE NULLS
2024-11-12 17:14:14 +00:00
Anton Popov
3bba64e975 fix index granularity 2024-11-12 16:45:08 +00:00
maxvostrikov
39aef112d5 tests for parseDateTime64InJodaSyntax
added more corner cases for tests for parseDateTime64InJodaSyntax functions
2024-11-12 17:44:54 +01:00
Pablo Marcos
1ffffee389
Merge branch 'master' into improve-system-query-metric-log 2024-11-12 17:20:54 +01:00
kssenii
c9cfc8afd6 Disable boundary alignment for non-disk read 2024-11-12 17:11:13 +01:00
Alexey Milovidov
9285622a59 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fp16 2024-11-12 17:07:19 +01:00
Mikhail f. Shiryaev
e1b84f1f01
Add more comments and function-docs 2024-11-12 17:01:27 +01:00
Mikhail f. Shiryaev
e698bbeb75
Improve script usability 2024-11-12 17:01:27 +01:00
Mikhail f. Shiryaev
687564bee8
Ignore README and its sources on unpacking 2024-11-12 17:01:26 +01:00
Mikhail f. Shiryaev
20717d1bbe
ClickHouseVersion.is_supported property, create images for them exclusively 2024-11-12 17:00:30 +01:00
Mikhail f. Shiryaev
dcd0d1acac
Support a dedicated repository for DOL sources 2024-11-12 17:00:17 +01:00
Mikhail f. Shiryaev
c05c72cb80
Set the Dockerfile.* as an argument 2024-11-12 17:00:16 +01:00
Mikhail f. Shiryaev
7b65bebe2d
Filter out the CI-related stuff from official docker 2024-11-12 17:00:16 +01:00
Mikhail f. Shiryaev
259baa1f49
Add argument to skip checking the changed docker/official tree 2024-11-12 17:00:15 +01:00
Mikhail f. Shiryaev
27b544e47e
Improve branch for docker usability 2024-11-12 17:00:15 +01:00
Mikhail f. Shiryaev
61030eb43c
Fix the help for subcommands 2024-11-12 17:00:14 +01:00
Mikhail f. Shiryaev
81a3ca147a
Add command to generate docker LDF 2024-11-12 17:00:12 +01:00
Mikhail f. Shiryaev
5ef2104ae1
Add options to fetch tags and commit changes 2024-11-12 17:00:12 +01:00
Mikhail f. Shiryaev
985d19fc5a
Improve logging, separate keeper/server generation 2024-11-12 17:00:11 +01:00
Mikhail f. Shiryaev
e513cc9601
Add a script to generate docker/official directory 2024-11-12 17:00:08 +01:00
Raúl Marín
6ad72f1b8f Implement ServerSetting 'allowed_feature_tier' 2024-11-12 16:56:01 +01:00
Mikhail f. Shiryaev
e1b6d70c8b
Address point regarding chmod for /etc/clickhouse* 2024-11-12 16:47:36 +01:00
Kseniia Sumarokova
d4538a2155
Fix test 2024-11-12 16:46:36 +01:00
Pavel Kruglov
43456d7447
Restart CI 2024-11-12 16:30:57 +01:00
Pavel Kruglov
3dae5def48
Update 01825_new_type_json_12.reference 2024-11-12 16:25:17 +01:00
Alexey Milovidov
5bc2591ef2 Merge branch 'remove-code-bloat' into fp16 2024-11-12 16:16:59 +01:00
Alexander Tokmakov
dbb20fc864
Merge pull request #65636 from kirillgarbar/attaching_parts
Fix "attaching_" prefix for deduplicated parts
2024-11-12 14:29:09 +00:00
Sema Checherinda
36dba0cae4 relax memory limit 2024-11-12 15:29:09 +01:00
Alexey Milovidov
e72d04c749 Merge branch 'remove-code-bloat' of github.com:ClickHouse/ClickHouse into remove-code-bloat 2024-11-12 15:24:22 +01:00
Alexey Milovidov
4bb39a8c08 Fix tidy 2024-11-12 15:20:27 +01:00
kssenii
410e09b248 Add missing fields in system.s3_queue_settings 2024-11-12 15:00:12 +01:00
Alexander Gololobov
dde5633c6d
Fix darwin build 2024-11-12 14:56:37 +01:00
Christoph Wurm
1615cd1297 Merge remote-tracking branch 'origin/master' into reject_invalid_mutation_queries 2024-11-12 13:53:01 +00:00
Max Vostrikov
d38bd0df0a
Merge pull request #71469 from ClickHouse/tests_to_utc_timestamp_arrayunion_quntiles
Added tests for corner cases for 24.10
2024-11-12 13:37:22 +00:00
kevinyhzou
7634e646e8 fix review 2024-11-12 21:23:09 +08:00
Kseniia Sumarokova
12478f4aff
Update defaults of s3/azure queue polling settings 2024-11-12 14:16:03 +01:00
Nikita Taranov
46cbe3660c
Merge pull request #71787 from ClickHouse/fix_processor_profiles_for_subqueries
Fix processors profile is not collected for subqueries in some cases
2024-11-12 13:14:29 +00:00
Raúl Marín
7dc84515f3
Merge pull request #71432 from Algunenano/i71382
Fix crash with optimize_rewrite_array_exists_to_has
2024-11-12 12:17:25 +00:00
Vitaly Baranov
1501dc033f
Merge pull request #71772 from vitlibar/fix-flaky-test_prometheus_protocols
Fix flaky test test_prometheus_protocols
2024-11-12 12:07:16 +00:00
Sema Checherinda
8a433a2222 add finalize calls in utils 2024-11-12 12:50:57 +01:00
Sema Checherinda
4d8bb01a77 add finalize calls 2024-11-12 12:46:25 +01:00
Kseniia Sumarokova
16a6638c4a
Merge branch 'master' into rename-setting 2024-11-12 12:37:18 +01:00
kevinyhzou
178bf89652 fix ci ast error 2024-11-12 19:30:51 +08:00
Nikita Taranov
021301430b
Merge pull request #71500 from bigo-sg/fix_uninitialized_orc_data
Fix date32 out of range caused by uninitialized orc `DataBuffer`
2024-11-12 11:26:58 +00:00
Pablo Marcos
5c8d89bf13 Remove unnecessary extern 2024-11-12 11:05:29 +00:00
Pablo Marcos
a56d2c371a Merge branch 'master' into improve-system-query-metric-log 2024-11-12 11:03:43 +00:00
Pablo Marcos
d4e288a8c1 Refactor to avoid too much TSA_GUARD clutter
Remove LOGICAL_ERROR check that should never happen.
It didn't happen on the CI so far, and seems unnecessary.
2024-11-12 11:02:49 +00:00
Kseniia Sumarokova
e331d42842
Merge branch 'master' into rename-setting 2024-11-12 12:00:19 +01:00
Kseniia Sumarokova
dbaf167449
Merge pull request #71640 from ClickHouse/cache-allow-to-disable-memory-buffer-increase-in-fs-cache
Allow to disable memory buffer increase for filesystem cache
2024-11-12 10:58:33 +00:00
maxvostrikov
05be65315a squash! Missing tests in several tests in 24.10 Added corner cases for tests for: to_utc_timestamp and from_utc_timestamp (more timezones, spetial timezones, epoch corners does not look right, raising a bug over that) arrayUnion (empty and big arrays) quantilesExactWeightedInterpolated (more data types) 2024-11-12 11:54:12 +01:00
Nikolai Kochetov
4e0e0f0d88 Cleanup. 2024-11-12 09:50:12 +00:00
Nikolai Kochetov
0223e6c971 Cleanup. 2024-11-12 09:47:07 +00:00
Mikhail f. Shiryaev
51308e692d
Merge pull request #71782 from ClickHouse/fix-db-and-reports
Fix db and reports
2024-11-12 09:45:22 +00:00
Nikolai Kochetov
0e2cd397d2 Cleanup. 2024-11-12 09:40:51 +00:00
Alexander Gololobov
cba6267431 Allow reading previous vaules of async metrics during update 2024-11-12 10:31:28 +01:00
Mikhail f. Shiryaev
e85a9852e7
Fix issues with garbage DB events from orphane branches 2024-11-12 07:59:01 +01:00
kevinyhzou
2507daa3b1 fix build error 2024-11-12 14:57:15 +08:00
Konstantin Bogdanov
dc92242c39
Merge pull request #71795 from ClickHouse/lint-some-stuff
Lint some stuff
2024-11-12 06:51:57 +00:00
Konstantin Bogdanov
0825b42d5f
Lint 2024-11-12 07:12:02 +01:00
kevinyhzou
701fb76edb fix ci test 2024-11-12 13:03:38 +08:00
kevinyhzou
9fb1cf20c7 fix ci test 2024-11-12 12:25:38 +08:00
kevinyhzou
eea644dc45 remove unused changes 2024-11-12 11:35:50 +08:00
Peter Nguyen
286bcb030e
Merge branch 'master' into enable_http_compression_default 2024-11-11 20:29:57 -07:00
kevinyhzou
373f00c127 fix review & ci 2024-11-12 11:25:14 +08:00
Peter Nguyen
a5fba9744e Add to SettingsChangesHistory.cpp 2024-11-11 19:22:05 -08:00
Alexey Milovidov
2c5e35a8e7
Update AggregateFunctionDeltaSumTimestamp.cpp 2024-11-12 02:20:44 +01:00
Alexey Milovidov
fab8acaae7 Merge branch 'master' into fp16 2024-11-12 01:23:35 +01:00
Alexey Milovidov
ec27bd2e51 Remove ridiculous code bloat 2024-11-12 01:23:25 +01:00
Alexey Milovidov
7310376413 Remove ridiculous code bloat 2024-11-12 01:23:01 +01:00
Nikita Taranov
bd71442ea2 add test 2024-11-11 22:49:45 +01:00
Nikita Taranov
b05d3ed6df impl 2024-11-11 22:43:03 +01:00
Anton Popov
c5817d528c add test for const adaptive granularity 2024-11-11 21:16:20 +00:00
Pavel Kruglov
ce8ca7c9f5
Merge pull request #71742 from Avogar/fix-lc-to-dynamic-cast
Fix CAST from LowCardinality(Nullable) to Dynamic
2024-11-11 21:13:45 +00:00
avogar
237a81ff8c Slightly better JSON type parsing 2024-11-11 21:11:31 +00:00
Max Kainov
06debdc479 result with versioning 2024-11-11 20:53:27 +00:00
Shichao Jin
9eb0ac21ae
Merge pull request #71779 from petern48/fix_typo_column_docs
Fix typo in sql-reference/statements/alter/column.md
2024-11-11 20:32:12 +00:00
kssenii
5f9506cc7d Cleanup 2024-11-11 21:24:18 +01:00
Kseniia Sumarokova
da7cd5b141
Merge branch 'master' into cache-allow-to-disable-memory-buffer-increase-in-fs-cache 2024-11-11 21:18:55 +01:00
Anton Popov
aa51f4cc88 Merge remote-tracking branch 'upstream/master' into const-adaptive-granularity 2024-11-11 19:23:11 +00:00
Peter Nguyen
621cb60446 Fix 'was was' typo in sql-reference/statements/alter/column.md 2024-11-11 11:12:01 -08:00
Nikita Taranov
92c94861a5
Merge branch 'master' into better_parallel_hash2 2024-11-11 20:07:50 +01:00
justindeguzman
c0e239a14a [Docs] Update links to use official Docker image 2024-11-11 10:58:45 -08:00
Alexey Milovidov
935694480b Merge branch 'master' into fp16 2024-11-11 19:54:43 +01:00
Anton Popov
c7ad0b897a allow to use constant adaptive granularity for part 2024-11-11 18:47:42 +00:00
Miсhael Stetsyuk
a2d37aba4d
Merge pull request #71385 from ClickHouse/rm-metadata_version-creation-from-restarting-thread
remove `metadata_version` ZooKeeper node creation from RMT restarting thread
2024-11-11 18:13:27 +00:00
Nikolai Kochetov
92114f3c74 Fixing typos. 2024-11-11 18:01:24 +00:00
Nikolai Kochetov
a0cc03b175 Cleanup. 2024-11-11 17:50:11 +00:00
Peter Nguyen
f60d35161f Update docs for ru/ and zh/ 2024-11-11 08:56:50 -08:00
Peter Nguyen
a5318f6084 Change enable_http_compression setting's default value to 1 2024-11-11 08:55:53 -08:00
Nikolai Kochetov
6f00b49067 Fixing more tests. 2024-11-11 16:41:23 +00:00
Sema Checherinda
40c4183ae7 fix tidy build 2024-11-11 17:26:28 +01:00
Sema Checherinda
a75e1bafff clean up 2024-11-11 17:03:24 +01:00
Mikhail f. Shiryaev
eeb25267e5
Merge pull request #71698 from ClickHouse/cherry-pick-branch-naming
Let's name cherry-pick branches the same way as backports
2024-11-11 15:58:09 +00:00
avogar
75cbf0ca9a Remove old test 2024-11-11 15:12:30 +00:00
Mikhail f. Shiryaev
0bdf4402fe
Post critical errors from cherry_pick.py 2024-11-11 16:12:01 +01:00
avogar
b62aac446e Better tests 2024-11-11 15:11:55 +00:00
avogar
5efbae615c Forbid Dynamic type in min/max functions to avoid confusion 2024-11-11 15:07:38 +00:00
Vitaly Baranov
b7d8072819 Add waiting for prometheus instances to start before running test "test_prometheus_protocols". 2024-11-11 16:06:17 +01:00
Nikolai Kochetov
5c5016218b Fixing style. 2024-11-11 15:05:53 +00:00
Mikhail f. Shiryaev
bcab2d51aa
Use get_parameter_from_ssm in ci_buddy 2024-11-11 15:58:06 +01:00
Nikolai Kochetov
9b01b6aa2b
Merge pull request #62125 from jsc0218/LessReadInOrder
Read-in-order Optimization With Virtual Row
2024-11-11 14:52:07 +00:00
Nikolai Kochetov
8c2e541392 Avoid using manes in multistage prewhere optimization. 2024-11-11 14:27:48 +00:00
Sema Checherinda
1c69a275a6 tcp cancel with QUERY_WAS_CANCELLED_BY_CLIENT 2024-11-11 15:19:26 +01:00
Sema Checherinda
b2933280b2 try to use only QUERY_WAS_CANCELLED exception code 2024-11-11 14:38:08 +01:00
Raúl Marín
356393b488 Some typos 2024-11-11 14:34:53 +01:00
Sema Checherinda
69ac9751a0 do not log error when cancel 2024-11-11 14:33:54 +01:00
Sema Checherinda
9c4f89c136 fix limit read buffer 2024-11-11 14:33:10 +01:00
Sema Checherinda
2c59df765c fix headers in Client 2024-11-11 14:32:45 +01:00
Nikolai Kochetov
288756bc9a Fix for stateful functions. 2024-11-11 13:32:01 +00:00
avogar
17f7097d5b Fix CAST from LowCardinality(Nullable) to Dynamic 2024-11-11 13:28:52 +00:00
Raúl Marín
9cb78214fa Add some missing tiers 2024-11-11 14:21:45 +01:00
Alexey Milovidov
d65f68f88e
Merge pull request #71734 from andreineustroev/master
Fix typo (logs)
2024-11-11 12:59:24 +00:00
Alexey Milovidov
bcf05c1227
Merge pull request #68024 from ClickHouse/revert-68023-revert-65860-atomic-database-in-clickhouse-local
Revert "Revert "Use `Atomic` database by default in `clickhouse-local`""
2024-11-11 12:58:33 +00:00
Raúl Marín
87f3cea8b5
Merge pull request #71589 from Algunenano/positional_file
Allow using clickhouse with a file argument as --queries-file
2024-11-11 12:57:25 +00:00
Raúl Marín
0666088b1c Merge remote-tracking branch 'blessed/master' into i71382 2024-11-11 13:46:53 +01:00
Raúl Marín
5f0f2628b1 Avoid failures on fault injection 2024-11-11 13:46:50 +01:00
Pavel Kruglov
194b4449cf
Merge branch 'master' into fix-dynamic-sizes 2024-11-11 13:34:24 +01:00
nauu
33f9e8bc2e fix error 2024-11-11 20:25:57 +08:00
Nikita Taranov
899702f056 fix test 2024-11-11 13:10:11 +01:00
Igor Nikonov
39e01d47b1 Fix style check 2024-11-11 11:54:04 +00:00
Nikolai Kochetov
30498c3a0a
Merge pull request #71695 from korowa/fix-set-const-transform
fix: transform set while partition pruning only if allowed
2024-11-11 11:49:32 +00:00
kssenii
386e16bee2 Better 2024-11-11 12:36:09 +01:00
Андрей
e1b76e7384
Merge pull request #1 from andreineustroev/fix-typo
Fix typo
2024-11-11 13:29:56 +02:00
Андрей
370b57657b
Fix typo
Fix log message for more clean understanding
2024-11-11 13:26:31 +02:00
kssenii
05dfc6dbdb Update settings changes history 2024-11-11 11:53:24 +01:00
Miсhael Stetsyuk
c4946cf159 style fix 2024-11-11 10:46:15 +00:00
Sema Checherinda
b1d62e2d0c cancelation of the callbacks 2024-11-11 11:37:13 +01:00
Sema Checherinda
0f944781d5 fix style 2024-11-11 11:37:13 +01:00
Sema Checherinda
4c4abd767c fix cancelation for callbacks 2024-11-11 11:37:13 +01:00
robot-clickhouse
7bbdaac3e1 Automatic style fix 2024-11-11 11:37:13 +01:00
Sema Checherinda
35a1a015ce fix tests 2024-11-11 11:37:13 +01:00
Sema Checherinda
0cd4ce01f4 make test repeatable 2024-11-11 11:37:13 +01:00
Sema Checherinda
29bade22ee fix headers 2024-11-11 11:37:13 +01:00
Sema Checherinda
d568e8107b fix headers in HTTPCommon.cpp 2024-11-11 11:37:13 +01:00
Sema Checherinda
59f1e3fa67 fix stop when cluster request 2024-11-11 11:37:13 +01:00
Sema Checherinda
ce78ec602c fix read proxy responce 2024-11-11 11:37:13 +01:00
Sema Checherinda
475344231a fix cancelation 2024-11-11 11:37:13 +01:00
Sema Checherinda
86e3299135 fix tests 2024-11-11 11:37:13 +01:00
Sema Checherinda
167e8db5d1 fix 02340_parts_refcnt_mergetree.sh 2024-11-11 11:37:13 +01:00
Sema Checherinda
6e55bb7618 fix cancelation in TCP 2024-11-11 11:37:13 +01:00
Sema Checherinda
5a62403513 add cancel to IArchiveWriter.h 2024-11-11 11:37:13 +01:00
Sema Checherinda
762fe6f217 fix style 2024-11-11 11:37:13 +01:00
Sema Checherinda
61f623e12c fix style 2024-11-11 11:37:13 +01:00
Sema Checherinda
26ed6defc0 fix excatiopn message in ReadWriteBufferFromHTTP 2024-11-11 11:37:13 +01:00
Sema Checherinda
999aced7c9 fix race, fix attempt to write ti canceled socket 2024-11-11 11:37:13 +01:00
Sema Checherinda
e2ea19f37a fix temp part cancelation, fix ut test 2024-11-11 11:37:13 +01:00
Sema Checherinda
16a93ac1ce fix 02796_calculate_text_stack_trace 2024-11-11 11:37:13 +01:00
Sema Checherinda
2e4cb23039 fix marks prewarm 2024-11-11 11:37:13 +01:00
Sema Checherinda
e6b071f4ae fix lock 2024-11-11 11:37:13 +01:00
Sema Checherinda
e11890818a fix after rebase 2024-11-11 11:37:13 +01:00
Sema Checherinda
b562966ef1 fix 02796_calculate_text_stack_trace 2024-11-11 11:37:13 +01:00
Sema Checherinda
22c97480c2 fix mutex 2024-11-11 11:37:13 +01:00
Sema Checherinda
4b46065bcd differ kill query and cancel packet 2024-11-11 11:37:13 +01:00
Sema Checherinda
a115e468bd fix build 2024-11-11 11:37:13 +01:00
Sema Checherinda
fe2aa961b6 rework TCPHandler exception handling 2024-11-11 11:37:13 +01:00
Sema Checherinda
392676b89a fix client 2024-11-11 11:37:13 +01:00
Sema Checherinda
6297856d16 fix the dedug naming 2024-11-11 11:37:13 +01:00
Sema Checherinda
bb0b573193 fix style and review notes 2024-11-11 11:37:13 +01:00
Sema Checherinda
1e49313ed6 fix build 2024-11-11 11:37:13 +01:00
Sema Checherinda
ee57c9f804 fix TablesStatusResponse 2024-11-11 11:37:13 +01:00
Sema Checherinda
2280aa5e30 fix tests 2024-11-11 11:37:12 +01:00
Sema Checherinda
7dab7ae9a4 fix tests 2024-11-11 11:37:12 +01:00
Sema Checherinda
5812029467 work with review, fix TCPHandler and Spans 2024-11-11 11:37:12 +01:00
Sema Checherinda
4513bd017f fix out format finalization 2024-11-11 11:37:12 +01:00
Sema Checherinda
1975c5267f style fix 2024-11-11 11:37:12 +01:00
Sema Checherinda
5274d951f8 style fix 2024-11-11 11:37:12 +01:00
Sema Checherinda
5303391514 fix rebase 2024-11-11 11:37:12 +01:00
Sema Checherinda
68344e723a work with review comments 2024-11-11 11:37:12 +01:00
Sema Checherinda
19b7b97418 finalize compressed buffer in TCP handler 2024-11-11 11:37:12 +01:00
Sema Checherinda
cea797e254 LimitReadBuffer 2024-11-11 11:37:12 +01:00
Sema Checherinda
e0f083ac0b add more checks and fix tcp handler 2024-11-11 11:37:12 +01:00
Sema Checherinda
8782cf6885 add several checks 2024-11-11 11:37:12 +01:00
Sema Checherinda
35bd341389 less debug logs 2024-11-11 11:37:12 +01:00
Sema Checherinda
f1ab911910 cancel or finalize write buffer 2024-11-11 11:37:12 +01:00
Robert Schulze
d0405135a7
Merge pull request #71730 from rschu1ze/docs-cleanup
Fix trash in the docs, pt. II
2024-11-11 10:30:19 +00:00
Kseniia Sumarokova
2748e76f9f
Merge pull request #71654 from ClickHouse/update-test
Update test
2024-11-11 10:14:19 +00:00
Vitaly Baranov
19bcc5550b Fix tests. 2024-11-11 11:12:02 +01:00
Vitaly Baranov
206bd174c3 Corrections after reworking backup/restore synchronization. 2024-11-11 11:11:57 +01:00
Robert Schulze
5aa9e64070
Fix spelling 2024-11-11 10:11:23 +00:00
Robert Schulze
f57bf2ee15
Fix trash in the docs, pt. II 2024-11-11 09:54:37 +00:00
kevinyhzou
0768e0b265 update doc & comments 2024-11-11 14:26:58 +08:00
kevinyhzou
ab79efe40f make scale argument not optional 2024-11-11 14:07:19 +08:00
Shichao Jin
64b4ea6857
Merge branch 'master' into LessReadInOrder 2024-11-10 20:51:42 -05:00
Alexey Milovidov
3a855f501c Cleanups 2024-11-11 02:15:31 +01:00
Konstantin Bogdanov
4511352efc
Merge pull request #71719 from ClickHouse/alexey-milovidov-patch-8
Fix trash in the docs
2024-11-11 01:03:58 +00:00
Alexey Milovidov
2b20c2d2f2 Fix a race 2024-11-11 01:46:00 +01:00
Alexey Milovidov
cef2e4a1c0 Merge branch 'master' into revert-68023-revert-65860-atomic-database-in-clickhouse-local 2024-11-11 01:19:54 +01:00
Alexey Milovidov
866e4daeec
Update index.md 2024-11-11 01:10:49 +01:00
Alexey Milovidov
3e50cf94fe Rounding 2024-11-11 01:04:55 +01:00
Alexey Milovidov
659a6a22f6
Merge pull request #71718 from Blargian/patch-10
Fix typo
2024-11-11 00:04:39 +00:00
Alexey Milovidov
bfeefa2c8a Introspection 2024-11-11 01:02:10 +01:00
Alexey Milovidov
968a559917 Add a test 2024-11-11 00:59:37 +01:00
Alexey Milovidov
73eba44238 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fp16 2024-11-11 00:40:39 +01:00
Alexey Milovidov
89b015cecf Do not compile BFloat16 2024-11-11 00:25:11 +01:00
Alexey Milovidov
6dee7e4276 Fix style 2024-11-11 00:24:57 +01:00
Alexey Milovidov
f042c921ee Distances 2024-11-11 00:16:28 +01:00
Alexey Milovidov
1a2ee7929e More conversions 2024-11-11 00:16:09 +01:00
Alexey Milovidov
19ab7d484a Add an experimental setting 2024-11-10 23:50:31 +01:00
Alexey Milovidov
92e8fa23ba Remove obsolete setting from tests 2024-11-10 23:43:10 +01:00
Alexey Milovidov
60ea77a60b
Merge pull request #71716 from rschu1ze/docs-tpch-s3
Docs: Steps to populate TPC-H tables from S3
2024-11-10 22:26:34 +00:00
Alexey Milovidov
16d05bbc6d Comparisons 2024-11-10 22:41:40 +01:00
Alexey Milovidov
7877d59ff6 Manual implementation 2024-11-10 22:13:22 +01:00
Shaun Struwig
a74f491df3
Fix typo 2024-11-10 22:02:01 +01:00
Igor Nikonov
9baa5911f9 Debugging stack with PR queries 2024-11-10 20:54:59 +00:00
Robert Schulze
892d43bd7d
SF 1 vs. 100 2024-11-10 20:50:25 +00:00
Robert Schulze
f9fa5ed515
Docs: Steps to populate TPC-H tables from S3 2024-11-10 20:38:51 +00:00
Igor Nikonov
d57a6b1e74 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-10 20:04:53 +00:00
Nikita Taranov
db30c33d04
Merge branch 'master' into better_parallel_hash2 2024-11-10 20:24:37 +01:00
Nikita Taranov
7156499001 don't reserve too much 2024-11-10 19:16:19 +01:00
Robert Schulze
42a8c0129b
Merge pull request #71709 from rschu1ze/docs-tpch-sizes
Docs: Add row and byte sizes of TPC-H tables
2024-11-10 17:51:10 +00:00
Robert Schulze
3668a78589
Fix spelling 2024-11-10 17:24:00 +00:00
Robert Schulze
b6b850a2f1
Docs: Add row and byte sizes of tables 2024-11-10 17:03:35 +00:00
Alexey Milovidov
08e6e598f7 Better code 2024-11-10 17:41:37 +01:00
Alexey Milovidov
ee67e64b70
Merge pull request #71635 from rschu1ze/simsimd-better-msan-suppression
SimSIMD: Improve suppression for msan false positive
2024-11-10 16:36:28 +00:00
Alexey Milovidov
62c94a7841 Maybe better 2024-11-10 16:40:24 +01:00
Alexey Milovidov
bf8fc60bac Arithmetic 2024-11-10 16:20:44 +01:00
Nikita Taranov
0a79fd0c40 fix tests 2024-11-10 15:16:25 +01:00
Alexey Milovidov
1c85a0401f Documentation 2024-11-10 15:14:17 +01:00
Mikhail f. Shiryaev
d1e638da6e
Let's name cherry-pick branches the same way as backports 2024-11-10 15:12:21 +01:00
Nikita Taranov
64244250c2 fix 2024-11-10 15:06:02 +01:00
Nikita Taranov
56f6062bd8 better 2024-11-10 14:51:19 +01:00
Alexey Milovidov
db98fb4c79 Documentation 2024-11-10 14:39:45 +01:00
xogoodnow
01ca2b6947 ran black
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-10 16:34:16 +03:30
Alexey Milovidov
f0dc1330eb Rounding 2024-11-10 13:53:08 +01:00
xogoodnow
5258bb6d01 Trigger pipeline 2024-11-10 16:21:01 +03:30
Robert Schulze
f2d6b1db7f
Better 2024-11-10 12:40:20 +00:00
Alexey Milovidov
bec94da77e Progressing 2024-11-10 13:19:08 +01:00
xogoodnow
19e6274a40 Fixed a typo
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-10 15:40:25 +03:30
Alexey Milovidov
bbea463b29
Merge pull request #58400 from ClickHouse/higher-order-constexpr
Make higher order functions constexpr
2024-11-10 12:05:17 +00:00
Eduard Karacharov
55540c2119 fix: transform set constant only if allowed 2024-11-10 12:35:19 +02:00
Alexey Milovidov
6cb083621a Documentation 2024-11-10 02:47:59 +01:00
Alexey Milovidov
ed1a261364
Merge pull request #71336 from ClickHouse/rmvsec
Exempt refreshable materialized views from ignore_empty_sql_security_in_create_view_query
2024-11-10 01:39:47 +00:00
Alexey Milovidov
b4acc885f3 Documentation 2024-11-10 02:37:26 +01:00
Alexey Milovidov
e65bb147d5 Style 2024-11-10 02:27:53 +01:00
Alexey Milovidov
1da6e1fffa Conversions 2024-11-10 02:25:29 +01:00
Alexey Milovidov
c3f42b7bc7 Something 2024-11-10 01:25:25 +01:00
Alexey Milovidov
04a6107966 Merge branch 'master' into fp16 2024-11-10 00:11:28 +01:00
Alexey Milovidov
703045170c
Merge pull request #71630 from ClickHouse/vertical-is-prettier
Make `Vertical` format prettier
2024-11-09 23:04:06 +00:00
Alexey Milovidov
6763be772c
Merge pull request #71620 from ClickHouse/implicit_select
Implicit SELECT in clickhouse-local
2024-11-09 23:03:37 +00:00
Alexey Milovidov
b70f39879d Only with analyzer 2024-11-10 00:02:24 +01:00
Alexey Milovidov
bc79d9bad3 Only with analyzer 2024-11-10 00:01:51 +01:00
Alexey Milovidov
ce8ffaf5c3 Miscellaneous 2024-11-10 00:01:51 +01:00
Alexey Milovidov
f2d45ba43b Fix tests 2024-11-10 00:01:51 +01:00
Alexey Milovidov
4334a14973 Fix test 2024-11-10 00:01:51 +01:00
Alexey Milovidov
1e64b56a0f Support constexpr functions in arrayFold 2024-11-10 00:01:51 +01:00
Alexey Milovidov
4ae7d589f7 Fix error 2024-11-10 00:01:51 +01:00
Alexey Milovidov
f1777b9579 Fix error 2024-11-10 00:01:51 +01:00
Alexey Milovidov
6c1016568c Better implementation 2024-11-10 00:01:51 +01:00
Alexey Milovidov
3f2f358fb9 Support constant lambda functions 2024-11-10 00:01:50 +01:00
Alexey Milovidov
979b212806 Make higher order functions constant expressions 2024-11-10 00:01:50 +01:00
Alexey Milovidov
a1b46c6761
Merge branch 'master' into revert-68023-revert-65860-atomic-database-in-clickhouse-local 2024-11-09 22:02:47 +01:00
Alexey Milovidov
7849a9ce16 Fix error 2024-11-09 18:12:11 +01:00
Alexey Milovidov
6e1b2709d2 Merge branch 'master' into implicit_select 2024-11-09 18:08:53 +01:00
alesapin
5217f7665f
Merge pull request #71658 from ClickHouse/add_index_granularity
Add index granularity size column to system.parts
2024-11-09 16:56:07 +00:00
Alexey Milovidov
a898f16354 Fix tests 2024-11-09 17:21:53 +01:00
Alexey Milovidov
ca26016839
Merge pull request #71687 from ClickHouse/alexey-milovidov-patch-8
Update PULL_REQUEST_TEMPLATE.md
2024-11-09 16:19:33 +00:00
Alexey Milovidov
016c122af9
Update PULL_REQUEST_TEMPLATE.md 2024-11-09 16:33:37 +01:00
Alexey Milovidov
56d6e50fa7
Merge pull request #71678 from ClickHouse/fix-71677
Fix #71677
2024-11-09 14:54:53 +00:00
Alexey Milovidov
e58d322a57
Merge pull request #71623 from ClickHouse/correct-exit-code
Correct and unify exit codes of CLI apps
2024-11-09 13:33:32 +00:00
Alexey Milovidov
93d5868760 Fix tests 2024-11-09 14:30:46 +01:00
Alexey Milovidov
7b1c72729a Fix upgrade check 2024-11-09 14:22:43 +01:00
Alexey Milovidov
3b7e049001
Merge pull request #71088 from ClickHouse/retry-more-error-codes-from-s3
Retry more errors from S3
2024-11-09 13:19:25 +00:00
Alexey Milovidov
289d96cc73
Merge pull request #70860 from ClickHouse/parallel-compression
Parallel compression option
2024-11-09 13:18:56 +00:00
Alexey Milovidov
5a7941ce28
Merge pull request #71622 from ClickHouse/highlight-multiquery
Highlight multi-statements in interactive mode
2024-11-09 13:18:40 +00:00
alesapin
aa4d37f72c Fix test 2024-11-09 13:41:08 +01:00
Mikhail f. Shiryaev
5d2e2cc58f
Merge pull request #71573 from ClickHouse/doi-review
Docker official library review
2024-11-09 12:02:16 +00:00
Mikhail f. Shiryaev
e50bbc433e
Another review round for docker-library/docs 2024-11-09 10:03:11 +01:00
Pablo Marcos
516300e733 Demote log from warning to debug to avoid failing the test 2024-11-09 08:28:47 +01:00
Pablo Marcos
a888db338e Revert "Add a new setting query_metric_log_debug to avoid the noise"
This reverts commit 955f537bd5.
2024-11-09 08:23:25 +01:00
Michael Kolupaev
bed189bf45
Merge pull request #71046 from ClickHouse/locus
Fix two logical errors when reading from stdin in clickhouse local
2024-11-09 06:02:34 +00:00
Amos Bird
bf58f46808
Fix empty tuple ALTER 2024-11-09 13:04:39 +08:00
Alexey Milovidov
ef0ec74d2b Fix build 2024-11-09 04:50:18 +01:00
Alexey Milovidov
2ba3813654 Merge branch 'master' into implicit_select 2024-11-09 03:42:37 +01:00
Alexey Milovidov
959c4633f9 Apply review suggestion 2024-11-09 02:53:32 +01:00
Alexey Milovidov
b5237313ad Fix tests 2024-11-09 02:49:27 +01:00
Alexey Milovidov
19ca58e952 Fix #71677 2024-11-09 02:30:10 +01:00
Michael Kolupaev
ba2eb3db8b Merge remote-tracking branch 'origin/master' into rmvsec 2024-11-09 00:21:58 +00:00
Alexey Milovidov
68c270abfc Merge branch 'master' into parallel-compression 2024-11-09 01:08:19 +01:00
Alexey Milovidov
fda7c20f44 Merge branch 'master' into retry-more-error-codes-from-s3 2024-11-09 01:07:42 +01:00
Alexey Milovidov
48970d0703 Merge branch 'highlight-multiquery' of github.com:ClickHouse/ClickHouse into highlight-multiquery 2024-11-09 01:04:25 +01:00
Alexey Milovidov
d9006a74b9 Merge branch 'master' into highlight-multiquery 2024-11-09 01:04:09 +01:00
Alexey Milovidov
038d56e988 Merge branch 'master' into correct-exit-code 2024-11-09 01:03:53 +01:00
Alexey Milovidov
cee0e8d667 Merge branch 'master' into implicit_select 2024-11-09 01:03:36 +01:00
Michael Kolupaev
570afce944 Merge remote-tracking branch 'origin/master' into locus 2024-11-09 00:01:46 +00:00
Alexey Milovidov
6d2504662a Update tests 2024-11-09 01:01:46 +01:00
Alexey Milovidov
a17723dac4 Merge branch 'master' into vertical-is-prettier 2024-11-09 00:56:23 +01:00
Alexey Milovidov
49e41f23ee
Merge pull request #71634 from yariks5s/sandbox1
Fix flaky `01287_max_execution_speed`
2024-11-08 23:54:30 +00:00
Christoph Wurm
ed42c13638 Merge remote-tracking branch 'origin/master' into reject_invalid_mutation_queries 2024-11-08 23:48:00 +00:00
Yakov Olkhovskiy
11a36813fc
Merge pull request #71625 from ClickHouse/revert-71619-revert-71039-default_enable_job_stack_trace
Enable enable_job_stack_trace by default, second attempt
2024-11-08 22:42:09 +00:00
Mikhail f. Shiryaev
6c7f40ed9f
Merge pull request #71626 from ClickHouse/try-fix-su
Fix clickhouse-su to accept not only user/group names, but as well IDs
2024-11-08 21:18:37 +00:00
Yakov Olkhovskiy
a1e8207b9f
Merge pull request #71655 from ClickHouse/ci-mysql-container
CI: fix mysql containers using improper log directory
2024-11-08 21:04:47 +00:00
Tyler Hannan
5914bcb858
Merge pull request #71657 from tbragin/patch-19
Update README.md - Update meetups
2024-11-08 19:49:31 +00:00
Yakov Olkhovskiy
78e56e7e3d Merge branch 'master' into revert-71619-revert-71039-default_enable_job_stack_trace 2024-11-08 18:22:11 +00:00
Raúl Marín
9de9216022 Merge remote-tracking branch 'blessed/master' into positional_file 2024-11-08 18:40:54 +01:00
Raúl Marín
9ab5bd74a5
Merge pull request #71584 from Algunenano/flaky_port
Avoid port clash in CoordinationTest/0.TestSummingRaft1
2024-11-08 17:39:53 +00:00
alesapin
6c223c92bd btter 2024-11-08 18:13:29 +01:00
Igor Nikonov
37c2483869 Do not randomize min_bytes_to_use_direct_io 2024-11-08 17:09:23 +00:00
Kseniia Sumarokova
9abda58d92
Merge branch 'master' into rename-setting 2024-11-08 18:06:13 +01:00
alesapin
9dc4046b89 Add index granularity size column to system.parts 2024-11-08 18:02:41 +01:00
Tanya Bragin
fe39c4b65b
Update README.md - Update meetups
Add Stockholm
2024-11-08 08:55:20 -08:00
Yakov Olkhovskiy
97ec890b8e
use /var/log/mysql/ instead of /mysql/, fix MYSQL_ROOT_HOST env initialization 2024-11-08 11:36:36 -05:00
Yakov Olkhovskiy
5d2e1547a8
use /var/log/mysql/ instead of /mysql/ 2024-11-08 11:34:06 -05:00
kssenii
0929f66516 Update test 2024-11-08 17:01:09 +01:00
Yarik Briukhovetskyi
b172651506
Merge branch 'ClickHouse:master' into sandbox1 2024-11-08 16:34:58 +01:00
Kseniia Sumarokova
e18ff6e56b
Update Metadata.cpp 2024-11-08 16:31:58 +01:00
Kseniia Sumarokova
00e1c5cf0b
Update FileCacheSettings.cpp 2024-11-08 16:30:54 +01:00
Yarik Briukhovetskyi
fe249729c1
Merge pull request #71593 from GrigoryPervakov/master
Keep materialized view security overriden context until end of query
2024-11-08 15:29:34 +00:00
Pablo Marcos
608cb0eab2 Merge branch 'master' into improve-system-query-metric-log 2024-11-08 15:12:27 +00:00
alesapin
aeed07bfb9
Merge pull request #71637 from ClickHouse/min_parts_to_merge_at_once
Add `min_parts_to_merge_at_once` setting
2024-11-08 15:02:35 +00:00
Igor Nikonov
1561a0115f Fix test, set min_bytes_to_use_direct_io expicitly 2024-11-08 14:30:02 +00:00
Kseniia Sumarokova
aeb2cbf934
Update Settings.cpp 2024-11-08 15:26:41 +01:00
kssenii
fdc18a6a28 Add a separate setting for background download max size 2024-11-08 15:13:23 +01:00
Robert Schulze
ba20032987
Fix build 2024-11-08 14:08:36 +00:00
Robert Schulze
69ae052103
SimSIMD: Improve suppression for msan false positive 2024-11-08 14:07:53 +00:00
Raúl Marín
1b897e9ce7
Merge pull request #71633 from DerekChia/patch-6
Update settings.md to remove duplicated `background_pool_size` description
2024-11-08 13:31:04 +00:00
Christoph Wurm
f3372896d3 Merge remote-tracking branch 'origin/master' into reject_invalid_mutation_queries 2024-11-08 13:30:43 +00:00
Mikhail f. Shiryaev
c05899fcdd
Merge pull request #71638 from ClickHouse/Avogar-patch-7
Fix broken 03247_ghdata_string_to_json_alter
2024-11-08 14:25:56 +01:00
Mikhail f. Shiryaev
298b172c49
Add fallback to getgrgid_r and getpwuid_r for UID and GID arguments of clickhouse-su 2024-11-08 14:09:22 +01:00
Kseniia Sumarokova
fe73c1880a
Update src/Core/Settings.cpp
Co-authored-by: Nikita Taranov <nikita.taranov@clickhouse.com>
2024-11-08 14:06:59 +01:00
kssenii
fd9f327083 Allow to disable memory buffer increase for filesystem cache 2024-11-08 14:03:41 +01:00
Igor Nikonov
467c961461 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-08 12:40:04 +00:00
Pablo Marcos
051f87aeb7
Merge pull request #71580 from ClickHouse/bitshift-return-0-instead-of-throwing-exception-for-out-of-bounds
Return 0 or default char instead of throwing an error in bitShift functions in case of out of bounds
2024-11-08 12:34:01 +00:00
Pablo Marcos
955f537bd5 Add a new setting query_metric_log_debug to avoid the noise 2024-11-08 12:32:07 +00:00
Igor Nikonov
a8d07555d4 Update 02967_parallel_replicas_joins_and_analyzer
EXPLAIN with RIGHT JOIN changed
2024-11-08 12:31:22 +00:00
Pavel Kruglov
da0e267278
Fix typo 2024-11-08 13:30:21 +01:00
Nikolai Kochetov
6f74b3236b Fix some tests. 2024-11-08 12:22:57 +00:00
maxvostrikov
1dcd06f098 squash! Missing tests in several tests in 24.10 Added corner cases for tests for: to_utc_timestamp and from_utc_timestamp (more timezones, spetial timezones, epoch corners does not look right, raising a bug over that) arrayUnion (empty and big arrays) quantilesExactWeightedInterpolated (more data types) 2024-11-08 13:11:36 +01:00
Pablo Marcos
0dbc041d8b Log when the query finishes for system.query_metric_log ASAP
There are logs where we can see that after the query finishes,
executeQuery takes up to 2 seconds to call finishQuery.
2024-11-08 12:07:04 +00:00
Mikhail f. Shiryaev
aa15b912df
Apply review comments from docker-library/docs 2024-11-08 13:03:03 +01:00
Mikhail f. Shiryaev
10329cbbf2
Generate clickhouse/clickhouse-server README as in docker-library 2024-11-08 12:59:03 +01:00
alesapin
1bd6b9df95 Fix style check 2024-11-08 12:47:48 +01:00
Pablo Marcos
96383d42b1 Small refactor to ease debugging when something happens on the CI 2024-11-08 11:38:43 +00:00
Pavel Kruglov
4c644a98f5
Fix broken 03247_ghdata_string_to_json_alter 2024-11-08 12:29:04 +01:00
alesapin
b6cad9c913 Add test 2024-11-08 12:25:26 +01:00
alesapin
87b9f5cb4e Add min_parts_to_merge_at_once setting 2024-11-08 12:24:29 +01:00
Christoph Wurm
db7440e9f8 Better test fix 2024-11-08 10:55:52 +00:00
kssenii
164e3c2667 Update settings changes history 2024-11-08 11:54:43 +01:00
Raúl Marín
5275c0a8c4 Reverse order on implicit options 2024-11-08 11:53:46 +01:00
Christoph Wurm
b370fefb3c Fix test 03173_forbid_qualify 2024-11-08 10:53:30 +00:00
Nikolai Kochetov
dd1ca389db Trying to cast filter column. 2024-11-08 10:45:13 +00:00
Mikhail f. Shiryaev
11f3568f5b
First check the ROOT to assign the env 2024-11-08 11:45:12 +01:00
Mikhail f. Shiryaev
cf1da69f93
Make keeper entrypoint less verbose, like the in the server 2024-11-08 11:44:02 +01:00
alesapin
1794d8ed27
Merge pull request #71595 from ClickHouse/index_granularity
Shrink to fit index granularity array in memory to reduce memory footprint
2024-11-08 10:38:05 +00:00
Yarik Briukhovetskyi
d75a41f04c
init 2024-11-08 11:24:28 +01:00
Vladimir Cherkasov
bb4a3e503c
Merge pull request #71102 from ClickHouse/better-log-messages-22
Better log messages
2024-11-08 10:08:23 +00:00
Robert Schulze
ea99346e6b
Merge pull request #71572 from rschu1ze/vec-sim-legacy
Vector similarity index: Re-introduce support for legacy index creation syntax
2024-11-08 10:03:40 +00:00
Christoph Wurm
b041199350 Merge remote-tracking branch 'mine/reject_invalid_mutation_queries' into reject_invalid_mutation_queries 2024-11-08 09:48:38 +00:00
Christoph Wurm
2d70dd11d2 Make it work without the new analyzer 2024-11-08 09:47:23 +00:00
Christoph Wurm
bd87540111
Update tests/queries/0_stateless/03256_invalid_mutation_query.sql
Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com>
2024-11-08 09:45:51 +00:00
Derek Chia
0f945cadc7
Update settings.md
Remove duplicated `background_pool_size` description
2024-11-08 17:34:53 +08:00
Max Kainov
a828e3e923 test 2024-11-08 09:58:41 +01:00
Mikhail f. Shiryaev
f24dca21a5
Implement CLICKHOUSE_RUN_AS_ROOT instead of preser UID/GID 2024-11-08 09:15:15 +01:00
Yakov Olkhovskiy
bc65419ea8 Merge branch 'master' into revert-71619-revert-71039-default_enable_job_stack_trace 2024-11-08 08:06:15 +00:00
Alexey Milovidov
3fa72482a7 Revert some changes 2024-11-08 00:56:38 +01:00
Alexey Milovidov
c78272871f Rollback some changes 2024-11-08 00:51:32 +01:00
Alexey Milovidov
863887cca5 Reset WriteSettings to master 2024-11-08 00:50:47 +01:00
Alexey Milovidov
ba90363cda Merge branch 'master' into parallel-compression 2024-11-08 00:50:19 +01:00
Alexey Milovidov
dd5a573302 Reset MergeTree to master 2024-11-08 00:50:13 +01:00
Alexey Milovidov
a15e5b72af
Merge pull request #71597 from ClickHouse/kssenii-patch-13
Fix for `test_storage_s3_queue::test_shards_distributed[ordered-2]`
2024-11-07 23:28:58 +00:00
Alexey Milovidov
5ceb19453d Fix style 2024-11-08 00:26:58 +01:00
Alexey Milovidov
fe79f3511a Merge branch 'master' into vertical-is-prettier 2024-11-08 00:26:50 +01:00
Alexey Milovidov
a2220233b7 Fix test 2024-11-08 00:25:49 +01:00
Alexey Milovidov
ec385f24e4 Merge branch 'master' into implicit_select 2024-11-08 00:21:46 +01:00
Alexey Milovidov
6054f43000 Make Vertical format prettier 2024-11-08 00:14:25 +01:00
Konstantin Bogdanov
6e566dd5f3
Merge pull request #71627 from ClickHouse/auto/v24.3.13.40-lts
Update version_date.tsv and changelog after v24.3.13.40-lts
2024-11-07 22:35:16 +00:00
Alexey Milovidov
dc9e1e047b Fix tests 2024-11-07 23:18:39 +01:00
Mikhail f. Shiryaev
fec3db198b
Merge pull request #71468 from ClickHouse/cache-await
CI UX: slightly improve cache await interface
2024-11-07 22:15:17 +00:00
Konstantin Bogdanov
f71b00c513
Lint 2024-11-07 22:52:27 +01:00
robot-clickhouse
16a670166c Update version_date.tsv and changelogs after v24.3.13.40-lts 2024-11-07 21:48:11 +00:00
Alexey Milovidov
1e87298a1c
Update ClientBaseHelpers.cpp 2024-11-07 22:40:21 +01:00
Alexey Milovidov
e6f58a2b1f
Update src/Client/ClientBaseHelpers.cpp
Co-authored-by: Konstantin Bogdanov <thevar1able@users.noreply.github.com>
2024-11-07 22:40:06 +01:00
Alexey Milovidov
61e73ead45 Merge branch 'master' into implicit_select 2024-11-07 22:38:46 +01:00
Alexey Milovidov
2c31956c63
Merge pull request #71556 from ClickHouse/nouuid
Fix compatibility with refreshable materialized views created by old clickhouse servers
2024-11-07 21:05:19 +00:00
Alexey Milovidov
7eebdb525f Merge branch 'master' into retry-more-error-codes-from-s3 2024-11-07 22:04:26 +01:00
Yakov Olkhovskiy
e6a652ab74
move enable_job_stack_trace change to 24.11 2024-11-07 16:01:02 -05:00
Yakov Olkhovskiy
a027f1bf3c
Revert "Revert "Enable enable_job_stack_trace by default"" 2024-11-07 15:59:11 -05:00
Alexey Milovidov
c8104cb2ee Correct and unify exit codes 2024-11-07 21:31:07 +01:00
Alexey Milovidov
76b6cf96eb Highlight multi-statements in the client 2024-11-07 21:30:31 +01:00
avogar
0ff0c96b00 Remove logging 2024-11-07 20:01:40 +00:00
avogar
cab460d7c3 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-dynamic-sizes 2024-11-07 20:00:54 +00:00
Mikhail f. Shiryaev
8f98f2333f
Make clickhouse local fuse in the repository install RUN 2024-11-07 20:59:04 +01:00
Alexey Milovidov
6943b07ceb
Merge pull request #71596 from ClickHouse/fix-for-no-seek-avoiding-test-in-cache
Fix for `00180_no_seek_avoiding_when_reading_from_cache`
2024-11-07 19:57:28 +00:00
Alexey Milovidov
3525954fa3 Implicit SELECT in clickhouse-local 2024-11-07 20:55:04 +01:00
avogar
1157028e35 Fix getting column sample for not finalized part 2024-11-07 19:53:30 +00:00
Raúl Marín
adcab2a2db
Merge pull request #71619 from ClickHouse/revert-71039-default_enable_job_stack_trace
Revert "Enable enable_job_stack_trace by default"
2024-11-07 19:52:09 +00:00
Raúl Marín
2fa357f374
Revert "Enable enable_job_stack_trace by default" 2024-11-07 20:51:39 +01:00
Mikhail f. Shiryaev
4e53dda580
Use array for conditional mkdir 2024-11-07 20:45:31 +01:00
Robert Schulze
337ba49be0
Merge pull request #71582 from rschu1ze/qc-docs
Clarify query cache docs
2024-11-07 18:48:49 +00:00
Nikolai Kochetov
67540a253a
Merge branch 'master' into enable-merge-filters-optimization 2024-11-07 21:23:12 +03:00
Nikolai Kochetov
0ac6ce56bd Trying to fix short-circuit for FilterStep. 2024-11-07 18:19:26 +00:00
Raúl Marín
4fb38411c1 Only accept regular files 2024-11-07 19:06:36 +01:00
avogar
2ec1c88092 Merge branch 'alter-to-json' of github.com:Avogar/ClickHouse into fix-dynamic-sizes 2024-11-07 18:00:49 +00:00
Pavel Kruglov
0c9e6fca5a
Merge pull request #70442 from Avogar/alter-to-json
Support alter from String to JSON
2024-11-07 17:40:31 +00:00
Pavel Kruglov
095f7ab591
Merge pull request #71388 from Avogar/fix-variant-permute
Fix error Invalid number of rows in Chunk with Variant column
2024-11-07 17:39:18 +00:00
alesapin
45aaebc41a Review fix 2024-11-07 18:24:36 +01:00
Nikolai Kochetov
ec9c06a6bd
Merge pull request #71538 from kitaisreal/analyzer-materialized-view-in-with-cte-fix
Analyzer materialized view IN with CTE fix
2024-11-07 17:07:02 +00:00
Kseniia Sumarokova
2c59fce5b4
Update test.py 2024-11-07 17:44:41 +01:00
kssenii
95d8215491 Fix 2024-11-07 17:40:53 +01:00
alesapin
bfad05ac60 Shrink to fit index granularity array in memory to reduce memory footprint 2024-11-07 17:35:10 +01:00
kssenii
e5fc37bc7e Add alias 2024-11-07 17:27:51 +01:00
Raúl Marín
96b59a2ef6 Avoid port clash in CoordinationTest/0.TestSummingRaft1 2024-11-07 17:07:58 +01:00
Raúl Marín
3f5d5f0f98 Merge remote-tracking branch 'blessed/master' into i71382 2024-11-07 16:59:40 +01:00
Pervakov Grigorii
a01c2e3f8c Keep materialized view security overriden context until end of query 2024-11-07 18:47:48 +03:00
xogoodnow
aaa46a95c2 Declared the new parameter
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-07 18:44:01 +03:30
Vladimir Cherkasov
c8dc8091d0
Merge branch 'master' into vdimir/ignore_nulls_query_tree_elimination 2024-11-07 16:13:12 +01:00
Sema Checherinda
8ef86e71b7
Merge pull request #65279 from cangyin/fix-hashtable-destroyelements
Fix use-after-dtor logic in HashTable destroyElements
2024-11-07 15:10:28 +00:00
Vladimir Cherkasov
1c86967596
Merge branch 'master' into better-log-messages-22 2024-11-07 16:08:51 +01:00
Robert Schulze
de03a5dae7
Fix test which used an obsolete setting 2024-11-07 15:04:53 +00:00
Robert Schulze
5cc42571f3
Revert obsolete settings removal 2024-11-07 14:57:24 +00:00
Christoph Wurm
55e65c7e14 Merge remote-tracking branch 'origin' into reject_invalid_mutation_queries 2024-11-07 14:46:52 +00:00
Yakov Olkhovskiy
331988a0a9
Merge pull request #71039 from ClickHouse/default_enable_job_stack_trace
Enable enable_job_stack_trace by default
2024-11-07 14:33:11 +00:00
Dmitry Novik
506b30fd49
Merge pull request #71425 from ClickHouse/analyzer-resolve-join-tree
[Experiment] Analyzer: Check what happens after if-condition removal
2024-11-07 14:13:39 +00:00
Raúl Marín
06b580777e Style 2024-11-07 15:08:05 +01:00
Raúl Marín
07b480c1e4 Implicitly treat a file argument as --queries-file 2024-11-07 14:44:31 +01:00
Mikhail f. Shiryaev
ccaa66963d
Print a proper message for finished awaiting 2024-11-07 14:44:28 +01:00
Mikhail f. Shiryaev
d43329f254
UX: slightly improve cache await interface 2024-11-07 14:44:27 +01:00
Pavel Kruglov
3efeccde3a
Merge pull request #69731 from Avogar/dynamic-constraints
Don't allow Variant/Dynamic types in ORDER BY/GROUP BY/PARTITION BY/PRIMARY KEY by default
2024-11-07 12:48:27 +00:00
Pavel Kruglov
0702fa259e
Merge branch 'master' into alter-to-json 2024-11-07 13:47:56 +01:00
Pavel Kruglov
e3c716c9c2
Merge pull request #71369 from Avogar/fix-json-suspicions-hints
Check suspicious and experimental types in JSON type hints
2024-11-07 12:47:25 +00:00
Raúl Marín
3722d26212
Merge pull request #71513 from den-crane/patch-77
Fix copy/paste error
2024-11-07 12:46:56 +00:00
avogar
432ca2c30e Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-variant-permute 2024-11-07 12:45:52 +00:00
avogar
ca23e5254c Fix for tmp parts 2024-11-07 12:44:57 +00:00
Robert Schulze
f727a3931b
Clarify query cache docs and remove obsolete setting 2024-11-07 12:41:48 +00:00
Pablo Marcos
d8ff6f868f bitShift: return 0 instead of throwing an exception if overflow 2024-11-07 12:39:10 +00:00
kevinyhzou
3332bce1dc fix doc and comments 2024-11-07 20:38:44 +08:00
Kseniia Sumarokova
fb2efa5f59
Merge pull request #70947 from ClickHouse/imbloo
Make ParquetMetadata say whether bloom filter is present
2024-11-07 12:37:38 +00:00
Daniil Ivanik
7ea3bcdb3c
Merge pull request #71418 from azat/tests/fix-test_quorum_inserts
Fix missing cluster startup for test_quorum_inserts::test_insert_quorum_with_keeper_fail
2024-11-07 12:33:54 +00:00
xogoodnow
acafa37e2d Ran black for style check
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-07 15:53:18 +03:30
Igor Nikonov
3c37c1e6c4 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-07 12:17:24 +00:00
kssenii
552b0fc8d0 Rename a setting 2024-11-07 13:11:33 +01:00
xogoodnow
b97d78e7f4 Third party library must come before local imports (according to isort)
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-07 15:35:17 +03:30
kevinyhzou
a6b08187b3 checkstyle and doc 2024-11-07 20:03:44 +08:00
Mikhail f. Shiryaev
1babb919c3
Follow the DOI review recommendations/requirements 2024-11-07 13:00:16 +01:00
Mikhail f. Shiryaev
ae97149041
Remove /usr/bin for clickhouse/clickhouse-server/clickhouse-keeper 2024-11-07 13:00:15 +01:00
Mikhail f. Shiryaev
b82658a285
Remove processing of CLICKHOUSE_DOCKER_RESTART_ON_EXIT 2024-11-07 13:00:14 +01:00
Mikhail f. Shiryaev
f229fc5b40
Deprecate CLICKHOUSE_UID/CLICKHOUSE_GID docker ENV 2024-11-07 13:00:13 +01:00
xogoodnow
a3bfb57da1 Ran black
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-07 15:27:41 +03:30
Raúl Marín
8659389265
Merge pull request #71168 from bigo-sg/fix_interpolated_quantile
Fix mismatched aggreage function name of quantileExactWeightedInterpolated
2024-11-07 11:49:38 +00:00
Kseniia Sumarokova
27bcb9b808
Merge pull request #71396 from 0xMihalich/patch-1
Fix: ERROR: column "attgenerated" does not exist for old PostgreSQL
2024-11-07 11:44:30 +00:00
Mikhail f. Shiryaev
6310d38bf6
Merge pull request #71505 from ClickHouse/upgrade-docker-srver
Upgrade clickhouse-server and keeper base images
2024-11-07 11:38:28 +00:00
Alexey Milovidov
0094a9df40
Merge pull request #71169 from ClickHouse/close-8687
Close #8687
2024-11-07 11:19:17 +00:00
Robert Schulze
be10aba49a
Minor cleanup 2024-11-07 10:44:03 +00:00
Robert Schulze
cf594010c8
Rename some tests for more consistency 2024-11-07 10:44:01 +00:00
Robert Schulze
e7ad525e00
Re-introduce support for legacy index creation syntax 2024-11-07 10:44:00 +00:00
xogoodnow
c7e2ae208d Merge remote-tracking branch 'origin/json-utc-formatted-log' into json-utc-formatted-log 2024-11-07 14:01:00 +03:30
xogoodnow
27fc62ae6a Changed custom name for consistency with other example
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-07 14:00:43 +03:30
Ali
b3d50d096f
Merge branch 'ClickHouse:master' into json-utc-formatted-log 2024-11-07 14:00:21 +03:30
Ali
146f3b5bef
Merge pull request #3 from xogoodnow/json-utc-formatted-log-tests
Add 'date_time_utc' format to tests
2024-11-07 13:57:25 +03:30
Payam Qorbanpour
9ac9dea447 Add 'date_time_utc' format to tests 2024-11-07 13:55:03 +03:30
Mikhail Artemenko
b0393274f7
Merge pull request #71151 from ClickHouse/issues/71020/staleness
WITH FILL STALENESS extension
2024-11-07 10:12:58 +00:00
Maksim Kita
042e82c6a9 Fix tests 2024-11-07 13:10:51 +03:00
xogoodnow
25f73dfb55 Added "date_time_utc" parameter to config file
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-07 13:37:40 +03:30
kevinyhzou
1c74206bf2 add parseDateTime64 functions 2024-11-07 18:00:14 +08:00
cangyin
8fb52b72b5 Fix use-after-dtor logic in hashtable destroyElements 2024-11-07 11:00:12 +01:00
xogoodnow
174550e1bf Added "date_time_utc"
Signed-off-by: xogoodnow <xo4ever9999@gmail.com>
2024-11-07 13:28:10 +03:30
Robert Schulze
5f5b1ebe26
Merge pull request #71457 from rschu1ze/fix-insert-assert
Fix assert during insert into vector similarity index in presence of other skipping indexes
2024-11-07 09:30:56 +00:00
Vladimir Cherkasov
54dd46f4c2
Merge pull request #71541 from Algunenano/udf_constraint
Avoid crash when using a UDF in a constraint
2024-11-07 09:26:22 +00:00
Alexey Milovidov
33913bc4b2
Merge pull request #71530 from ClickHouse/consistent-aarch64-vars
We use `aarch64` everywhere in code, so the vars should reflect it
2024-11-07 09:05:59 +00:00
Yakov Olkhovskiy
abcd741e25 Merge branch 'master' into default_enable_job_stack_trace 2024-11-07 04:12:05 +00:00
李扬
2cf8f54c5b
Merge branch 'ClickHouse:master' into fix_uninitialized_orc_data 2024-11-07 09:13:26 +08:00
李扬
0ae66a84a7
Merge branch 'ClickHouse:master' into fix_interpolated_quantile 2024-11-07 09:12:53 +08:00
Michael Kolupaev
29aed6a586 Fix compatibility with refreshable materialized views created by old clickhouse servers 2024-11-06 23:39:01 +00:00
Yakov Olkhovskiy
170b787232 Merge branch 'master' into default_enable_job_stack_trace 2024-11-06 22:36:58 +00:00
Alexey Milovidov
f1bfd6c66e Merge branch 'close-8687' of github.com:ClickHouse/ClickHouse into close-8687 2024-11-06 23:28:20 +01:00
Alexey Milovidov
07c23a3dbe Merge branch 'master' into close-8687 2024-11-06 23:28:05 +01:00
Alexey Milovidov
304b9190f3
Merge pull request #71320 from Avogar/tuple-to-json
Implement simple CAST from Map/Tuple/Object to new JSON through serialization/deserialization from JSON string
2024-11-06 22:27:18 +00:00
Alexey Milovidov
6766be4f99
Merge pull request #71478 from ClickHouse/docs-embeddedrocksdb-cloud
[Docs] Add cloud not supported badge for EmbeddedRocksDB engine
2024-11-06 22:24:48 +00:00
Alexey Milovidov
5d367d4ae4
Merge pull request #71494 from Algunenano/sort_cursor_crash
Prevent crash in SortCursor with 0 columns
2024-11-06 22:24:22 +00:00
Alexey Milovidov
8ff7118e6b
Merge pull request #71504 from ilejn/fix_test_drop_complex_columns
Fix flaky test_drop_complex_columns
2024-11-06 22:22:47 +00:00
Alexey Milovidov
b29c6e7239
Merge pull request #71523 from amosbird/help-62944
Allow specifying cmdline flags in integration test
2024-11-06 22:22:06 +00:00
Raúl Marín
024b9ce996
Merge pull request #71535 from Algunenano/test_system_functions
Add test to check that accessing system.functions does not populate query_log used_functions
2024-11-06 21:59:34 +00:00
Shichao Jin
f5033308fe
Merge branch 'master' into LessReadInOrder 2024-11-06 16:38:12 -05:00
Mikhail f. Shiryaev
157f745136
Write a simple troubleshooting for an old docker and clickhouse-server 2024-11-06 22:09:12 +01:00
Mikhail f. Shiryaev
26f0ba2c4c
Update compatibility section for clickhouse-server docker image 2024-11-06 22:02:09 +01:00
Pablo Marcos
9cdd56abbc Reduce the general critical section for query_metric_log
- Use a separate mutex for each query to reduce the contention
period for queries_mutex.

- Refactor to use std::mutex instead of std::recursive_mutex
for queries_mutex.

- In case we're running late to schedule the next task, schedule
it immediately.

- Fix LockGuard because unlocking twice is undefined behavior.
2024-11-06 20:52:54 +00:00
Robert Schulze
c558407941
Remove duplicate test (same as 02354_vector_search_bugs_multiple_indexes.sql) 2024-11-06 19:53:01 +00:00
Robert Schulze
c052be0192
Merge remote-tracking branch 'ClickHouse/master' into fix-insert-assert 2024-11-06 19:45:11 +00:00
Dmitry Novik
7493900464
Merge pull request #71509 from joelynch/joelynch/grants-docs
Fix documentation for system.grants.is_partial_revoke
2024-11-06 19:34:25 +00:00
Raúl Marín
dd5061a4d3
Merge pull request #71527 from ClickHouse/revert-68682-vdimir/join_select_inner_table
Revert "Selection of hash join inner table"
2024-11-06 19:24:44 +00:00
Raúl Marín
0011bc5e07
Merge pull request #71503 from ClickHouse/docs-prometheus-cloud
[Docs] Update note about Prometheus integration and ClickHouse Cloud
2024-11-06 18:35:33 +00:00
Raúl Marín
de21dde4cf Avoid crash when using UDF in a constraint 2024-11-06 19:26:39 +01:00
Robert Schulze
070bfc81ee
Merge pull request #71525 from rschu1ze/non-experimental-analyzer
Minor: Remove "experimental" mention of analyzer
2024-11-06 17:49:12 +00:00
Igor Nikonov
70a01f45ad Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-06 17:48:16 +00:00
Robert Schulze
ea3f9e5821
Add missing reference file 2024-11-06 17:48:04 +00:00
Nikolai Kochetov
4ad8273e5f Enable merge filters optimization. 2024-11-06 17:31:24 +00:00
Maksim Kita
530c04413e Analyzer materialized view IN with CTE fix 2024-11-06 19:59:41 +03:00
Raúl Marín
e8a8a4f62e Add test to check that accessing system.functions does not populate query_log used_functions 2024-11-06 17:34:20 +01:00
alesapin
a0013e0a96
Merge pull request #71524 from ClickHouse/add_metrics_for_merge_selector
Add ProfileEvents for merge selector timings
2024-11-06 16:15:23 +00:00
divanik
8bb656ddec Add context manager for partition manager 2024-11-06 15:55:41 +00:00
robot-clickhouse
52dfad190d Automatic style fix 2024-11-06 15:47:07 +00:00
Sema Checherinda
df632b6f1e clean up 2024-11-06 16:44:52 +01:00
Igor Nikonov
c1345d38c8 Fix flakiness in 03254_pr_join_on_dups 2024-11-06 15:44:22 +00:00
Mikhail f. Shiryaev
7b1de3fcf7
We use aarch64 everywhere in code, so the vars should reflect it 2024-11-06 16:40:25 +01:00
Mikhail f. Shiryaev
2903227143
Remove strange wrong named dockerfile 2024-11-06 16:32:13 +01:00
Mikhail f. Shiryaev
d67b62c222
Upgrade clickhouse-server and keeper base images 2024-11-06 16:32:12 +01:00
Raúl Marín
4e30cf7e33 Cleanup SettingsChangesHistory for revert 2024-11-06 16:30:16 +01:00
Raúl Marín
12ab488453
Revert "Selection of hash join inner table" 2024-11-06 16:20:57 +01:00
avogar
020b69647a Fix counting column size in wide part for Dynamid and JSON types 2024-11-06 15:15:29 +00:00
Robert Schulze
15337692e6
Minor: Remove "experimental" mention of analyzer 2024-11-06 15:10:10 +00:00
alesapin
8fc61fec44 Merge branch 'add_metrics_for_merge_selector' of github.com:ClickHouse/ClickHouse into add_metrics_for_merge_selector 2024-11-06 16:00:40 +01:00
alesapin
33bd082149 Followup 2024-11-06 16:00:25 +01:00
divanik
3538886a2b Merge branch 'master' of github.com:ClickHouse/ClickHouse into tests/fix-test_quorum_inserts 2024-11-06 15:00:20 +00:00
Ilya Golshtein
f4c0254254 fix_test_drop_complex_columns: flaky check for test_drop_after_fetch 2024-11-06 14:52:55 +00:00
Mikhail Artemenko
69dcd96bd3 Merge branch 'master' into issues/71020/staleness 2024-11-06 14:43:38 +00:00
Dmitry Novik
7795d43055 Analyzer: Check what happens after if-condition removal 2024-11-06 15:03:51 +01:00
Alexander Gololobov
afb92f04e6
Added ms 2024-11-06 14:56:30 +01:00
Kseniia Sumarokova
1756fe28ee
Merge pull request #71348 from ClickHouse/filecache-more-assertions
fs cache: add assertions
2024-11-06 13:54:28 +00:00
alesapin
4e3bde2460 Add ProfileEvents for merge selector timings 2024-11-06 14:52:59 +01:00
Robert Schulze
71a0e7f07f
Split tests 2024-11-06 13:45:28 +00:00
Amos Bird
d270885bfa
Allow specifying cmdline flags in integration test 2024-11-06 21:37:47 +08:00
Sema Checherinda
338af374d8 remove the method remove in favor of the method removeIfExists 2024-11-06 14:35:24 +01:00
Pavel Kruglov
e5b6a3c1fe
Update 03261_tuple_map_object_to_json_cast.sql 2024-11-06 14:33:25 +01:00
Alexey Milovidov
0a66c40a00
Merge pull request #71510 from ClickHouse/move-bitshift-to-backward-incompatible-in-changelog
Move bitShift function changelog entries to backward incompatible
2024-11-06 13:15:11 +00:00
Denny Crane
533009b914
Update AlterCommands.cpp 2024-11-06 08:57:32 -04:00
Pablo Marcos
9ee22533a0
Move bitShift function changelog entries to backward incompatible
Move bitShift function changelog entries to backward incompatible
2024-11-06 13:46:30 +01:00
Joe Lynch
7c6472a090
Fix documentation for system.grants.is_partial_revoke 2024-11-06 13:34:39 +01:00
kevinyhzou
699b9d4026 fix comments 2024-11-06 20:20:44 +08:00
Nikolai Kochetov
b1eff04e96
Merge pull request #71476 from ClickHouse/fix-old-analyzer-const-expr-regression
Fix constants in WHERE expression which could apparently contain Join.
2024-11-06 12:05:45 +00:00
Robert Schulze
f0bb69f126
Simplify more 2024-11-06 11:46:49 +00:00
Igor Nikonov
9c1be76c14 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-06 11:29:27 +00:00
maxvostrikov
068b4fe8cf squash! Missing tests in several tests in 24.10 Added corner cases for tests for: to_utc_timestamp and from_utc_timestamp (more timezones, spetial timezones, epoch corners does not look right, raising a bug over that) arrayUnion (empty and big arrays) quantilesExactWeightedInterpolated (more data types) 2024-11-06 12:16:59 +01:00
Mikhail Artemenko
3d7c560a25 Merge branch 'master' into issues/71020/staleness 2024-11-06 11:16:42 +00:00
Nikita Taranov
bac948ec0e
Merge pull request #71224 from ClickHouse/fix_parallel_replicas_complex_subqueries
Fix `WITH TOTALS` in subquery with parallel replicas
2024-11-06 11:15:45 +00:00
0xMihalich
565c3b8cd4
Merge branch 'ClickHouse:master' into patch-1 2024-11-06 21:14:40 +10:00
Anton Popov
cbc4659ed5
Merge pull request #71474 from CurtizJ/fix-memory-usage-delayed-streams
Fix memory usage in inserts with delayed streams
2024-11-06 10:41:03 +00:00
Vladimir Cherkasov
236837525b
Merge pull request #71365 from ClickHouse/vdimir/debugtooslow
More info in TOO_SLOW exception
2024-11-06 10:12:11 +00:00
Kseniia Sumarokova
b38dc1d8ca
Update FileCache.cpp 2024-11-06 11:05:43 +01:00
Ilya Golshtein
918ad5c4d5 fix_test_drop_complex_columns: tests passed 2024-11-06 09:42:35 +00:00
Alexander Gololobov
15cbe47032
Merge pull request #71497 from ClickHouse/expose_base_merge_selector
Expose base setting for merge selector
2024-11-06 09:27:45 +00:00
taiyang-li
6761fccbf3 fix orc date32 overflow 2024-11-06 17:10:00 +08:00
Robert Schulze
4f8099d7aa
Simplify the code 2024-11-06 08:52:33 +00:00
taiyang-li
590029a33b fix orc date32 overflow 2024-11-06 16:38:09 +08:00
justindeguzman
0c1aa03cb1 [Docs] Update note about Prometheus integration and ClickHouse Cloud 2024-11-06 00:05:55 -08:00
taiyang-li
ef0be4a01c fix typo 2024-11-06 15:06:00 +08:00
taiyang-li
127f324822 add uts 2024-11-06 15:03:41 +08:00
nauu
6a8df5ea89 support the endpoint of oss accelerator 2024-11-06 14:57:14 +08:00
0xMihalich
141d4932c5
Merge branch 'ClickHouse:master' into patch-1 2024-11-06 15:44:15 +10:00
taiyang-li
c23dfa3431 fix uninitialized orc data 2024-11-06 12:33:26 +08:00
Michael Kolupaev
45bdc4d4de Update tests 2024-11-06 01:12:07 +00:00
李扬
88cf6efb43
Merge branch 'ClickHouse:master' into short_circut_func 2024-11-06 08:45:12 +08:00
alesapin
24c5ef9a05 Expose base setting for merge selector 2024-11-05 23:08:15 +01:00
Nikita Taranov
9931b61d6f fix test 2024-11-05 20:56:04 +01:00
Raúl Marín
d7da086a2e Fix tidy 2024-11-05 20:50:05 +01:00
Raúl Marín
9ec0dda6ee Prevent crash in SortCursor with 0 columns 2024-11-05 20:40:32 +01:00
Igor Nikonov
a237cc82fb Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-05 19:11:07 +00:00
Mikhail Artemenko
27efa29684 update docs 2024-11-05 18:04:59 +00:00
Vladimir Cherkasov
54a1b1c573
Merge pull request #71426 from ClickHouse/vdimir/fix_mongodb_argumetns_crash
Fix crash in mongodb table function
2024-11-05 17:56:42 +00:00
justindeguzman
349010012e [Docs] Add cloud not supported badge for EmbeddedRocksDB engine 2024-11-05 09:41:01 -08:00
Igor Nikonov
98ee089331 Cleanup 2024-11-05 17:31:47 +00:00
Nikolai Kochetov
76683d021d Fix constants in WHERE expression which could apparently contain Join. 2024-11-05 17:22:08 +00:00
Igor Nikonov
6abe8e7eb6
Merge pull request #70171 from ClickHouse/pr-enable-local-plan
Parallel replicas: use local plan for local replica by default
2024-11-05 17:21:39 +00:00
divanik
0687f7a83f Resolve issue 2024-11-05 17:09:03 +00:00
divanik
27153bfc27 Resolve issues 2024-11-05 16:58:21 +00:00
Peter Nguyen
19fe60157f Merge branch 'master' into alias_any_respect_nulls 2024-11-05 08:44:14 -08:00
Daniil Ivanik
2d9d3b5a08
Merge pull request #71012 from ClickHouse/divanik/data_lake_refactoring2
Refactor DataLakeStorage
2024-11-05 16:43:15 +00:00
divanik
3eedc74c59 Reformatted because of style check 2024-11-05 16:25:58 +00:00
divanik
25e889e1fb Merged uuids with table names 2024-11-05 16:15:04 +00:00
divanik
6ecc673f7d Fix quorum inserts tests 2024-11-05 16:02:40 +00:00
Vladimir Cherkasov
6c63587f77 More info in TOO_SLOW exception 2024-11-05 16:41:10 +01:00
Anton Popov
c16e1f021b fix memory usage in inserts with delayed streams 2024-11-05 14:59:09 +00:00
Robert Schulze
1de0d2f46c
Merge pull request #69387 from rschu1ze/enable-simsimd
USearch: Enable SimSIMD backend + enable dynamic dispatch
2024-11-05 14:30:32 +00:00
Igor Nikonov
bd7df8292c Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-05 14:15:17 +00:00
Nikita Taranov
8e1d85b0b8 new setting 2024-11-05 15:07:18 +01:00
vdimir
5152984bb1
upd src/TableFunctions/TableFunctionMongoDB.h 2024-11-05 13:52:14 +00:00
maxvostrikov
ead7630d04 Missing tests in several tests in 24.10
Added corner cases for tests for:
to_utc_timestamp and from_utc_timestamp (more timezones, spetial timezones, epoch corners does not look right, raising a bug over that)
arrayUnion (empty and big arrays)
quantilesExactWeightedInterpolated (more data types)
2024-11-05 14:28:28 +01:00
Igor Nikonov
8b1ea5425d
Merge branch 'master' into pr-enable-local-plan 2024-11-05 14:15:59 +01:00
Nikita Taranov
d5b1b81197 fix perf test 2024-11-05 14:01:19 +01:00
Nikita Taranov
5b5652a2a6 smaller value 2024-11-05 14:00:49 +01:00
Kseniia Sumarokova
d7886c8d46
Merge branch 'master' into filecache-more-assertions 2024-11-05 13:39:48 +01:00
kssenii
df16fedbba Merge remote-tracking branch 'origin/filecache-more-assertions' into filecache-more-assertions 2024-11-05 13:37:35 +01:00
kssenii
d7977f0b91 More correct assertion 2024-11-05 13:36:27 +01:00
vdimir
bbe28d45bf
fix 2024-11-05 12:33:25 +00:00
Max Kainov
e198b20509 CI: Stateless Tests with praktika 2024-11-05 12:29:30 +00:00
kssenii
ef28dbe7d9 Merge remote-tracking branch 'origin/master' into filecache-more-assertions 2024-11-05 12:42:23 +01:00
Raúl Marín
996773b205 Test with both analyzers 2024-11-05 12:39:36 +01:00
Raúl Marín
097fb78a6e Merge remote-tracking branch 'blessed/master' into i71382 2024-11-05 12:36:37 +01:00
Raúl Marín
8c2d1ec7f8 Allow ExecuteScalarSubqueriesVisitor on ARRAY JOIN 2024-11-05 12:36:35 +01:00
Robert Schulze
0cc8626279
Fix assert during insert into vector similarity index in presence of other skipping indexes 2024-11-05 11:34:47 +00:00
Kseniia Sumarokova
d04cd085ca
Merge pull request #70806 from ClickHouse/disable-fs-cache-background-download-for-metadata-files
Allow to disable background cache download for loading metadata files
2024-11-05 11:22:13 +00:00
Kseniia Sumarokova
8615526f20
Merge pull request #71308 from MikhailBurdukov/fix_named_collection_unescaping
Added missing unescaping in named collections names.
2024-11-05 10:51:35 +00:00
Robert Schulze
087a886bc9
Update src/Storages/MergeTree/MergeTreeIndexVectorSimilarity.cpp
Co-authored-by: Nikita Taranov <nickita.taranov@gmail.com>
2024-11-05 11:18:21 +01:00
Robert Schulze
1abfa41b89
Update CMakeLists.txt 2024-11-05 11:18:11 +01:00
Max Kainov
1f253c7b3a
Merge pull request #71341 from ClickHouse/ci_remove_old_release_script
CI: Remove deprecated release script
2024-11-05 10:03:07 +00:00
robot-clickhouse
bdd18b35b2
Merge pull request #71428 from ClickHouse/auto/v24.8.6.70-lts
Update version_date.tsv and changelog after v24.8.6.70-lts
2024-11-05 09:18:18 +00:00
Max Kainov
3491c0c0e8 CI: Remove deprecated release script 2024-11-05 10:11:40 +01:00
Antonio Andelic
a9f88fae8e
Merge pull request #71384 from snar/memory-worker-non-linux
memory_worker shall be started on non-Linux OS too
2024-11-05 08:11:06 +00:00
Robert Schulze
f0537200f4
Merge pull request #71405 from rschu1ze/demote-log-level-for-auth-failure
Demote log level for failed authentication
2024-11-05 06:53:38 +00:00
Yakov Olkhovskiy
d3e2d9d820
Merge pull request #70112 from ClickHouse/impl-libfuzzer-3
CI: enable libfuzzer
2024-11-05 05:44:17 +00:00
Yakov Olkhovskiy
a35cc85a68 remove irrelevant changes 2024-11-05 04:07:09 +00:00
Yakov Olkhovskiy
f08379fa18 attempt to fix irrelevant test 2024-11-05 01:58:23 +00:00
李扬
3d78c499a4
Merge branch 'ClickHouse:master' into short_circut_func 2024-11-05 09:14:30 +08:00
Alexey Milovidov
b313e2c462
Merge pull request #71343 from ClickHouse/auto/v24.10.1.2812-stable
Update version_date.tsv and changelog after v24.10.1.2812-stable
2024-11-05 01:43:51 +01:00
jsc0218
80a3e3c512 Merge branch 'LessReadInOrder' of github.com:jsc0218/ClickHouse into LessReadInOrder 2024-11-05 00:41:21 +00:00
jsc0218
ab4185027c Merge remote-tracking branch 'origin/master' into LessReadInOrder 2024-11-05 00:02:09 +00:00
Christoph Wurm
a03aa7bd65 Merge remote-tracking branch 'origin' into reject_invalid_mutation_queries 2024-11-04 23:44:37 +00:00
Igor Nikonov
5fbced454d Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-04 22:45:58 +00:00
Igor Nikonov
8c5ab63345 Cleanup 2024-11-04 22:45:40 +00:00
Raúl Marín
19422e75b0 Style 2024-11-04 20:24:06 +01:00
Raúl Marín
389fdd80d3 Add test for crasher 2024-11-04 20:15:29 +01:00
Raúl Marín
35a0d08a32 RewriteArrayExistsFunctionVisitor: Assert proper child on join expression 2024-11-04 20:12:34 +01:00
Raúl Marín
b4a3f6d370 Make sure to update table_join children properly 2024-11-04 20:11:33 +01:00
Raúl Marín
157e1695d5 Fix ExecuteScalarSubqueriesMatcher visiting join elements 2024-11-04 20:02:57 +01:00
Igor Nikonov
aaeb623db9
Merge branch 'master' into tests/fix-test_quorum_inserts 2024-11-04 19:50:44 +01:00
MikhailBurdukov
c1ce74f52f
Update tests/integration/test_named_collections/test.py
Co-authored-by: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com>
2024-11-04 21:40:59 +03:00
Igor Nikonov
a6b55563c7 Fix FULL joins 2024-11-04 18:32:05 +00:00
Christoph Wurm
64fbc9eb8d Style 2024-11-04 18:06:08 +00:00
Christoph Wurm
876158672c Fix integration test: Sync all drop table calls 2024-11-04 17:53:48 +00:00
Robert Schulze
a612e9248c
Update TCPHandler.cpp 2024-11-04 18:26:02 +01:00
Robert Schulze
de751c7e4d
Update AccessControl.cpp 2024-11-04 18:25:27 +01:00
robot-clickhouse
6b4d44be28 Update version_date.tsv and changelogs after v24.8.6.70-lts 2024-11-04 16:42:06 +00:00
Nikita Taranov
24017bb7ad add parallel_replicas_prefer_local_join 2024-11-04 17:31:39 +01:00
vdimir
929da1411e
Fix crash in mongodb table function 2024-11-04 16:06:20 +00:00
Kseniia Sumarokova
1d888bc1eb
Fix wrong change 2024-11-04 16:40:26 +01:00
Christoph Wurm
47b1b2c158 Try fix integration test - second attempt 2024-11-04 14:51:43 +00:00
Igor Nikonov
361031f9a3 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-04 14:33:25 +00:00
Igor Nikonov
935a29485c Fix logs 2024-11-04 14:32:54 +00:00
Yakov Olkhovskiy
097b45bf5a small refactoring 2024-11-04 13:56:40 +00:00
Nikita Taranov
c6384291e1 small fix 2024-11-04 14:31:05 +01:00
Nikita Taranov
2892aa11e5 squash follow up 2024-11-04 14:30:37 +01:00
Azat Khuzhin
24a7e0f4ee Fix missing cluster startup for test_quorum_inserts::test_insert_quorum_with_keeper_fail
def test_insert_quorum_with_keeper_loss_connection():
>       zero.query(
            "DROP TABLE IF EXISTS test_insert_quorum_with_keeper_fail ON CLUSTER cluster"
        )
    def query(
>       return self.client.query(
E       AttributeError: 'NoneType' object has no attribute 'query'

CI: https://s3.amazonaws.com/clickhouse-test-reports/71406/8b3ce129456a1f85839a48538780639e2e3c3020/integration_tests__asan__old_analyzer__[6_6]//home/ubuntu/actions-runner/_work/_temp/test/output_dir/integration_run_parallel3_0.log
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-11-04 13:44:55 +01:00
Robert Schulze
c3471ef20d
Update AccessControl.cpp 2024-11-04 13:33:34 +01:00
divanik
a37c1134b9 Resolve issues 2024-11-04 12:32:14 +00:00
divanik
5953af6a53 Merge branch 'master' of github.com:ClickHouse/ClickHouse into divanik/data_lake_refactoring2 2024-11-04 12:30:36 +00:00
Kseniia Sumarokova
9b20146d4b
Merge branch 'master' into disable-fs-cache-background-download-for-metadata-files 2024-11-04 13:21:58 +01:00
Christoph Wurm
c7f9704058 Try fix integration test 2024-11-04 09:45:26 +00:00
Robert Schulze
12c21dc7df
Minor fixups 2024-11-04 09:06:14 +00:00
robot-clickhouse
94c8e6e6c2 Automatic style fix 2024-11-04 05:31:26 +00:00
Yakov Olkhovskiy
a6c98a4a7f take some changes from private 2024-11-04 05:17:46 +00:00
李扬
755e02f905
Merge branch 'master' into short_circut_func 2024-11-04 11:54:40 +08:00
Yakov Olkhovskiy
e2d64ea302 fix style 2024-11-04 03:37:46 +00:00
Yakov Olkhovskiy
5aba66e50a adjust CI timeout, use TIMEOUT variable for setting fuzzers timeout 2024-11-04 03:13:42 +00:00
Yakov Olkhovskiy
a9f6428aec Merge branch 'master' into default_enable_job_stack_trace 2024-11-04 00:44:24 +00:00
Robert Schulze
7f1ccc30c9
Try to suppress msan warnings 2024-11-03 21:19:27 +00:00
Robert Schulze
27049f2cb5
Demote log level for failed authentication 2024-11-03 19:57:31 +00:00
Peter Nguyen
8af8488e46
Merge branch 'master' into alias_any_respect_nulls 2024-11-03 09:07:20 -08:00
Peter Nguyen
44130d6765 Add small note in docs for the alias 2024-11-03 08:59:56 -08:00
Peter Nguyen
74fd7fa01d Add camelCase alias for anyRespectNulls and anyLastRespectNulls 2024-11-03 08:59:33 -08:00
Robert Schulze
27241b484f
Fix linker warning 2024-11-03 16:00:33 +00:00
Robert Schulze
a801ece280
Fix test 2024-11-03 15:10:26 +00:00
Robert Schulze
71e7f7c466
Merge remote-tracking branch 'ClickHouse/master' into enable-simsimd 2024-11-03 11:16:23 +00:00
Nikita Taranov
4e8a96e9c1 squash small blocks before join transforms 2024-11-03 11:25:26 +01:00
Christoph Wurm
c5a46df840 Merge remote-tracking branch 'origin' into reject_invalid_mutation_queries 2024-11-03 09:43:54 +00:00
Igor Nikonov
1d83bb2dda Update settings changes history 2024-11-03 07:39:38 +00:00
Igor Nikonov
9583357662
Merge branch 'master' into fix_parallel_replicas_complex_subqueries 2024-11-02 23:06:44 +01:00
Igor Nikonov
2530fd233f Added 03261_pr_semi_anti_join 2024-11-02 21:36:02 +00:00
Igor Nikonov
389e917dde Merge remote-tracking branch 'origin/master' into pr-enable-local-plan 2024-11-02 19:51:03 +00:00
Igor Nikonov
64b405254c Fix 2024-11-02 19:50:45 +00:00
Igor Nikonov
ed2da98474 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-02 19:45:49 +00:00
Igor Nikonov
1e3f08ab3e Only with analyzer 2024-11-02 19:44:03 +00:00
0xMihalich
a4e576924b
Fix: ERROR: column "attgenerated" does not exist for old PostgreSQL databases
Restore support for GreenPlum and older versions of PostgreSQL without affecting existing functionality.
2024-11-02 18:48:57 +10:00
Shichao Jin
1563fa920e
Merge branch 'master' into LessReadInOrder 2024-11-01 20:25:11 -04:00
Igor Nikonov
6d5c707d2c Cleanup 2024-11-01 21:32:07 +00:00
Robert Schulze
3a042c0804
Enable dynamic dispatch in SimSIMD 2024-11-01 20:08:51 +00:00
Robert Schulze
9d0f256dfe
Enable SimSIMD backend in Usearch 2024-11-01 20:08:44 +00:00
avogar
2cc2f31d9a Fix error Invalid number of rows in Chunk with Variant column 2024-11-01 18:18:12 +00:00
vdimir
60fa4be570
Merge branch 'master' into vdimir/tmp_data_refactoring 2024-11-01 18:17:14 +00:00
vdimir
38a3c67075
revert unnecessary changes 2024-11-01 18:17:08 +00:00
Igor Nikonov
7315ad4820 Polishing 2024-11-01 17:55:49 +00:00
Igor Nikonov
18e1c3762e Merge remote-tracking branch 'origin/master' into pr-enable-local-plan 2024-11-01 17:53:45 +00:00
Igor Nikonov
bbde6ba512 update test 2024-11-01 17:53:32 +00:00
Pavel Kruglov
22e48f6852
Update 03261_tuple_map_object_to_json_cast.sql 2024-11-01 18:16:16 +01:00
avogar
7e476b62d2 Fix tests 2024-11-01 17:09:00 +00:00
Michael Stetsyuk
52fe2f18b0 rm metadata_version znode creation from restarting thread 2024-11-01 16:42:01 +00:00
Alexandre Snarskii
3fb4836f63 memory_worker shall be started on non-Linux OS too 2024-11-01 19:21:54 +03:00
Christoph Wurm
67b773dcdd Fix style 2024-11-01 16:01:17 +00:00
Igor Nikonov
ac0902b088 Fix 2024-11-01 15:57:44 +00:00
Christoph Wurm
8f86168c65 Fix test 2024-11-01 14:53:06 +00:00
Igor Nikonov
31f7615088 Fix 2024-11-01 14:52:42 +00:00
Igor Nikonov
268daafb16
Merge branch 'master' into pr-enable-local-plan 2024-11-01 15:33:27 +01:00
avogar
47ddd7fb6b Check suspicious and experimental types in JSON type hints 2024-11-01 14:33:03 +00:00
Pavel Kruglov
2bafaa2fc6
Update 03261_tuple_map_object_to_json_cast.sql 2024-11-01 14:08:45 +01:00
Igor Nikonov
77bd0b2903 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-11-01 13:07:00 +00:00
Igor Nikonov
752dfead2c Only RIGHT JOINs test 2024-11-01 13:06:29 +00:00
kssenii
e83cff7360 Fix typo 2024-11-01 12:47:03 +01:00
avogar
ce12f652c7 Fix test flakiness 2024-11-01 11:25:21 +00:00
Christoph Wurm
9252681962 Merge remote-tracking branch 'origin' into reject_invalid_mutation_queries 2024-11-01 11:13:46 +00:00
kssenii
d0394719c6 More assertions 2024-11-01 12:11:07 +01:00
Christoph Wurm
7691b7dd44 Fix test 2024-11-01 11:06:49 +00:00
Pavel Kruglov
4d3dba21cd
Merge branch 'master' into dynamic-constraints 2024-11-01 12:06:36 +01:00
Christoph Wurm
9015454b37 Add setting 2024-11-01 11:06:21 +00:00
Igor Nikonov
b9f70f4bf3 Merge remote-tracking branch 'origin/master' into pr-enable-local-plan 2024-11-01 10:09:28 +00:00
robot-clickhouse
a50bc3bac1 Update version_date.tsv and changelogs after v24.10.1.2812-stable 2024-11-01 08:50:54 +00:00
MikhailBurdukov
e851e8f3e4 Restart CI 2024-11-01 08:29:12 +00:00
Michael Kolupaev
a77caf4214 Exempt refreshable materialized views from ignore_empty_sql_security_in_create_view_query 2024-11-01 03:42:18 +00:00
taiyang-li
b9232c2006 add uts 2024-11-01 10:09:54 +08:00
jsc0218
2b9155c1b1 Merge remote-tracking branch 'origin/master' into LessReadInOrder 2024-11-01 00:32:35 +00:00
Igor Nikonov
6a41494d44 Merge remote-tracking branch 'origin/master' into pr-enable-local-plan 2024-10-31 19:33:03 +00:00
Nikita Taranov
fce3a0463b fix perf test 2024-10-31 20:30:05 +01:00
Nikita Taranov
c34de3cda8 fix tidy 2024-10-31 20:00:41 +01:00
jsc0218
77298ef479 add setting 2024-10-31 18:23:06 +00:00
kssenii
ca389d0d71 Move settings to cloud level 2024-10-31 18:43:56 +01:00
avogar
9021aeaaff Add docs 2024-10-31 16:57:51 +00:00
Mikhail Artemenko
1000ef0e02 some improves 2024-10-31 16:39:31 +00:00
Mikhail Artemenko
83f434dffb fix simple path 2024-10-31 16:25:17 +00:00
avogar
542dac1815 Implement simple CAST from Map/Tuple/Object to new JSON through serialization/deserialization from JSON string 2024-10-31 16:24:11 +00:00
Igor Nikonov
7d5ebc89ed
Merge branch 'master' into pr-enable-local-plan 2024-10-31 15:41:11 +01:00
jsc0218
fa5010ba18 fix test 2024-10-31 14:20:47 +00:00
MikhailBurdukov
936d6b2251 Fix unescaping in named collections 2024-10-31 14:05:33 +00:00
Pavel Kruglov
1fd66d0472
Update SerializationObject.cpp 2024-10-31 14:58:27 +01:00
avogar
353fccbeca Merge branch 'master' of github.com:ClickHouse/ClickHouse into dynamic-constraints 2024-10-31 13:54:38 +00:00
Nikita Taranov
b04b332d87 support max_joined_block_rows 2024-10-31 14:48:27 +01:00
kssenii
f9f6b31799 Merge remote-tracking branch 'origin/master' into disable-fs-cache-background-download-for-metadata-files 2024-10-31 13:53:46 +01:00
kssenii
1563689c03 Transfer changes from sync 2024-10-31 13:31:54 +01:00
Igor Nikonov
e1331977b5 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-10-31 12:27:21 +00:00
Igor Nikonov
0808d7f0fb Fix FULL JOINs again 2024-10-31 12:26:46 +00:00
Christoph Wurm
b229fb1664 Check if the mutation query is valid. 2024-10-31 12:04:24 +00:00
jsc0218
4e2693bb46 add test 2024-10-31 02:01:23 +00:00
Nikita Taranov
fc1fd46686 fix test 2024-10-30 23:36:15 +01:00
Igor Nikonov
8245e3d7ef Fix 2024-10-30 21:23:29 +00:00
Alexey Milovidov
0cfbe95ca6
Update 03258_multiple_array_joins.sql 2024-10-30 21:20:11 +01:00
Mikhail Artemenko
e50176c62f improve test 2024-10-30 17:29:08 +00:00
Mikhail Artemenko
10088a0947 extend fuzzer dict with staleness 2024-10-30 17:26:31 +00:00
Mikhail Artemenko
a99428fcd9 add errors test 2024-10-30 17:25:06 +00:00
Mikhail Artemenko
c8b94a3c61 fix empty stream filling 2024-10-30 17:21:29 +00:00
Mikhail Artemenko
b6bd776355 cleanup 2024-10-30 17:09:35 +00:00
Mikhail Artemenko
82783fe020 disable logs 2024-10-30 16:41:38 +00:00
Mikhail Artemenko
5b4d55dd3f move logs under flag 2024-10-30 16:41:02 +00:00
Mikhail Artemenko
ab5738b9f1 merge constraints 2024-10-30 16:11:40 +00:00
Mikhail Artemenko
7af2e822e7 cleanup 2024-10-30 15:22:45 +00:00
Mikhail Artemenko
2cda4dd901 cleanup 2024-10-30 14:46:56 +00:00
Mikhail Artemenko
e5fe7a0f52 add more tests 2024-10-30 14:35:29 +00:00
Mikhail Artemenko
433523c6f2 update test 2024-10-30 13:49:42 +00:00
Mikhail Artemenko
b9829c703f change constraints check 2024-10-30 13:44:59 +00:00
divanik
0840f7854c Fix ifdefs in ObjectStorageObject table 2024-10-30 13:40:27 +00:00
Nikita Taranov
e76f66d865 fix typo 2024-10-30 13:58:33 +01:00
Nikita Taranov
98f358baa3 add test 2024-10-30 13:42:27 +01:00
Igor Nikonov
b724f2c331 Fix FULL joins 2024-10-30 12:24:56 +00:00
Mikhail Artemenko
0dcb2b9c2c try another approach 2024-10-30 12:24:39 +00:00
Nikita Taranov
5e2355b123 better 2024-10-30 13:01:20 +01:00
divanik
e7fe8fed22 Added flag for parquet files 2024-10-30 11:13:03 +00:00
Nikolai Kochetov
e3890a9de1 Disable virtual row better. 2024-10-30 11:12:21 +00:00
Igor Nikonov
6004cb8ff4 Remove current_table_chosen_for_reading_with_parallel_replicas flag 2024-10-30 11:08:21 +00:00
divanik
ba9587c728 Removed trash 2024-10-30 10:34:12 +00:00
divanik
425b3bdea1 Merge branch 'master' of github.com:ClickHouse/ClickHouse into divanik/data_lake_refactoring2 2024-10-30 10:01:07 +00:00
Amos Bird
bd9cfaecea
No need to create tmp files 2024-10-30 14:35:06 +08:00
taiyang-li
838b8cb7a9 solve conflict 2024-10-30 10:05:35 +08:00
Amos Bird
10ee24d9a0
Fix multiple codecs and add test 2024-10-30 09:42:04 +08:00
Amos Bird
c5d6acf5e3
Fix 2024-10-30 09:00:18 +08:00
Igor Nikonov
6d47ef8f22 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-10-30 00:03:16 +00:00
Igor Nikonov
bebef8d0d9 Fix right joins again 2024-10-29 23:58:39 +00:00
Nikita Taranov
d9f427deba stash 2024-10-29 23:33:45 +01:00
Nikita Taranov
1ad1d372b2 stash 2024-10-29 23:08:56 +01:00
Nikita Taranov
41bd99510a stash 2024-10-29 23:08:51 +01:00
Nikita Taranov
bb9355b3d3 stash 2024-10-29 22:52:36 +01:00
Pavel Kruglov
dd52d52117
Merge branch 'master' into dynamic-constraints 2024-10-29 19:45:13 +01:00
Pavel Kruglov
76a54e0654
Update settings.md 2024-10-29 19:44:00 +01:00
Pavel Kruglov
170a24a418
Update SettingsChangesHistory.cpp 2024-10-29 19:43:13 +01:00
Pavel Kruglov
33d9869270
Update settings.md 2024-10-29 19:42:43 +01:00
Pavel Kruglov
42970cf597
Merge branch 'master' into alter-to-json 2024-10-29 19:39:48 +01:00
divanik
98c9afda2e Remove build ifdef issue 2024-10-29 17:25:13 +00:00
divanik
9b435388de Remove useless stuff 2024-10-29 17:20:53 +00:00
divanik
318fbe884a Merge branch 'master' into divanik/data_lake_refactoring2 2024-10-29 17:12:08 +00:00
divanik
cb12461f2a Merge branch 'divanik/data_lake_refactoring2' of github.com:ClickHouse/ClickHouse into divanik/data_lake_refactoring2 2024-10-29 17:03:21 +00:00
divanik
7d2fc48b6d Fixed restart broken 2024-10-29 17:02:43 +00:00
robot-clickhouse
9425b19f84 Automatic style fix 2024-10-29 15:26:44 +00:00
divanik
886603d625 Fixed some bugs 2024-10-29 15:18:05 +00:00
vdimir
52d9b205ea
Merge branch 'master' into vdimir/tmp_data_refactoring 2024-10-29 15:12:51 +00:00
vdimir
66f750ea6f
remove debug logs 2024-10-29 15:12:03 +00:00
divanik
a54df54405 Add changes 2024-10-29 15:04:30 +00:00
Igor Nikonov
0fda9bf238 Fix 03080_incorrect_join_with_merge.sql 2024-10-29 14:38:57 +00:00
divanik
b81e024c70 Debug prints 2024-10-29 13:54:22 +00:00
Amos Bird
04f68594dc
Print method in clickhouse-compressor --stat. 2024-10-29 21:36:43 +08:00
Kirill
cd31aefb96
Merge branch 'master' into table-limit 2024-10-29 16:28:27 +03:00
Кирилл Гарбар
772209e6c0 Test other replica and cleanup 2024-10-29 16:23:55 +03:00
Igor Nikonov
05c9ba1215 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-10-29 12:18:02 +00:00
Igor Nikonov
c7fce84729 Cleanup 2024-10-29 12:17:46 +00:00
taiyang-li
8aefca5f1c fix style 2024-10-29 18:38:04 +08:00
李扬
55ba1b96c2
Update src/Core/Settings.cpp
Co-authored-by: Pavel Kruglov <48961922+Avogar@users.noreply.github.com>
2024-10-29 18:13:58 +08:00
李扬
a71481de8f
Update src/Core/SettingsChangesHistory.cpp
Co-authored-by: Pavel Kruglov <48961922+Avogar@users.noreply.github.com>
2024-10-29 18:13:31 +08:00
李扬
8e9c8a6670
Update src/Core/Settings.cpp
Co-authored-by: Pavel Kruglov <48961922+Avogar@users.noreply.github.com>
2024-10-29 18:13:17 +08:00
divanik
af7aa7de56 Fix some bugs 2024-10-29 10:03:02 +00:00
Igor Nikonov
e2c2e67c7b Fix 2024-10-29 10:02:24 +00:00
Кирилл Гарбар
19c95b2f0e Test dictionaries 2024-10-29 11:44:50 +03:00
Кирилл Гарбар
aaba95ca8c Simplify and fix limit check 2024-10-29 11:41:37 +03:00
李扬
fa78f2db20
Merge branch 'ClickHouse:master' into short_circut_func 2024-10-29 14:13:26 +08:00
Alexey Milovidov
190703b603 Close #8687 2024-10-29 05:32:52 +01:00
taiyang-li
219cc4e5d2 fix mismatched aggreage function name of quantileExactWeightedInterpolated 2024-10-29 12:15:13 +08:00
Alexey Milovidov
617775a704 Merge branch 'master' into retry-more-error-codes-from-s3 2024-10-29 05:00:14 +01:00
Alexey Milovidov
52482a2880 Merge branch 'master' into retry-more-error-codes-from-s3 2024-10-29 02:55:06 +01:00
taiyang-li
9616167325 change as request 2024-10-29 09:45:09 +08:00
Igor Nikonov
3607493881 Merge remote-tracking branch 'origin/master' into pr-right-joins 2024-10-28 23:37:44 +00:00
Igor Nikonov
dc976c48d2 Test 2024-10-28 23:36:57 +00:00
Igor Nikonov
b03a296542 Fix right join - disabling PR lead to dup result 2024-10-28 23:25:38 +00:00
Mikhail Artemenko
6772d3fe66 little improvement 2024-10-28 22:08:38 +00:00
Mikhail Artemenko
f905c804f5 fix calibration jump 2024-10-28 19:58:53 +00:00
Mikhail Artemenko
64d038c440 cleanup 2024-10-28 18:23:19 +00:00
Mikhail Artemenko
60f0efa676 remove debug log 2024-10-28 18:08:25 +00:00
Mikhail Artemenko
83844841b4 fix test timezone 2024-10-28 18:04:00 +00:00
Mikhail Artemenko
4c9d865e75 disable debug logs 2024-10-28 17:45:27 +00:00
Mikhail Artemenko
fc33593ff0 fix style 2024-10-28 17:45:02 +00:00
Mikhail Artemenko
9760d39efe allow negative staleness for descending order 2024-10-28 17:43:15 +00:00
Mikhail Artemenko
37f691bf9d add test 2024-10-28 17:42:52 +00:00
Mikhail Artemenko
2d7de40ba7 fix sparse tables 2024-10-28 17:24:03 +00:00
Mikhail Artemenko
ce7acf162f Merge branch 'master' into issues/71020/staleness 2024-10-28 16:40:04 +00:00
Кирилл Гарбар
2c3363e40e Hard limit on replicated tables, dicts, views 2024-10-28 19:00:37 +03:00
Mikhail Artemenko
de046be699 change mul to scale 2024-10-28 15:13:33 +00:00
Max Kainov
aeffae571c CI: Functional Tests with praktika 2024-10-28 15:50:53 +01:00
Yakov Olkhovskiy
91d9878eb5
Merge branch 'master' into default_enable_job_stack_trace 2024-10-28 10:14:49 -04:00
Yakov Olkhovskiy
8f9d577c45
add enable_job_stack_trace to change history 2024-10-28 10:12:59 -04:00
Nikolai Kochetov
b1c46db1b9 Merge branch 'master' into LessReadInOrder 2024-10-28 14:04:08 +00:00
Mikhail Artemenko
7ff2d5c981 add baseline 2024-10-28 14:01:37 +00:00
divanik
07508cb381 Handle some problems with tests 2024-10-28 11:47:01 +00:00
Igor Nikonov
158cce8019 Merge remote-tracking branch 'origin/master' into pr-enable-local-plan 2024-10-28 11:10:07 +00:00
Alexey Milovidov
29df81ff12 Merge branch 'master' into retry-more-error-codes-from-s3 2024-10-28 06:35:15 +01:00
Alexey Milovidov
d376f125b0 Merge branch 'master' into better-log-messages-22 2024-10-28 06:34:44 +01:00
Alexey Milovidov
8807fe3bb5 Better log messages 2024-10-28 00:57:13 +01:00
Alexey Milovidov
c58afb753c Retry more errors from S3 2024-10-27 00:29:36 +02:00
Igor Nikonov
c952d9d815 Right JOIN with parallel replicas 2024-10-25 20:55:51 +00:00
Mikhail Artemenko
a7b23292f9 add staleness to sql 2024-10-25 17:58:43 +00:00
divanik
ca040906c3 Fix some ifdef issues 2024-10-25 13:37:12 +00:00
Nikita Taranov
5f93afede5 stash 2024-10-25 13:20:00 +01:00
Nikita Taranov
292800eb0a stash 2024-10-25 13:01:18 +01:00
vdimir
d1cbc4d86b
Merge remote-tracking branch 'origin/vdimir/tmp_data_refactoring' into vdimir/tmp_data_refactoring 2024-10-25 11:13:06 +00:00
vdimir
54b9395384
fix typo 2024-10-25 11:11:19 +00:00
vdimir
084f878fb1
log 2024-10-25 11:10:33 +00:00
divanik
31490438d9 Corrected smoe ifdef issues 2024-10-25 11:09:03 +00:00
vdimir
349af95cd1
fix data race 2024-10-25 10:45:32 +00:00
Michael Kolupaev
45e23584f4 Comment 2024-10-25 09:15:53 +00:00
Michael Kolupaev
3da0b2573a Better fix 2024-10-25 09:12:52 +00:00
李扬
04099b1f9d
Merge branch 'master' into short_circut_func 2024-10-25 16:57:28 +08:00
Vladimir Cherkasov
2bbf1de494
Merge branch 'master' into vdimir/tmp_data_refactoring 2024-10-25 10:46:53 +02:00
Vladimir Cherkasov
23efac5195
Merge branch 'master' into vdimir/ignore_nulls_query_tree_elimination 2024-10-25 10:42:58 +02:00
Michael Kolupaev
9cf7247bcc Also fix 'Input initializer is not set' in another query 2024-10-25 08:24:30 +00:00
Michael Kolupaev
e19bf218f6 Fix 'Unknown executor' when reading from stdin in clickhouse local 2024-10-25 06:43:08 +00:00
Yakov Olkhovskiy
8a0c6897f8
enable enable_job_stack_trace by default 2024-10-24 16:21:58 -04:00
Nikita Taranov
c2abeca568 stash 2024-10-24 19:35:17 +01:00
Nikita Taranov
d848a3b2bb stash 2024-10-24 19:31:13 +01:00
divanik
1b6979c5cd Correct ifdefs 2024-10-24 15:28:57 +00:00
divanik
a3f0d27d23 Resolve some issues 2024-10-24 13:56:26 +00:00
divanik
a228e4fa89 Fix issues with tests 2024-10-24 13:28:32 +00:00
Nikita Taranov
b04e7abd2e stash 2024-10-24 14:18:33 +01:00
divanik
860fcbdbef Resolved conflicts 2024-10-24 10:31:55 +00:00
Yakov Olkhovskiy
efd8ea7757 set uid gid 2024-10-24 03:59:03 +00:00
Yakov Olkhovskiy
77c2b9e5fc create clickhouse data dir 2024-10-23 22:44:10 +00:00
Yakov Olkhovskiy
f93ac138f1 chown clickhouse data path to root 2024-10-23 22:21:37 +00:00
robot-clickhouse
4c9743ca42 Automatic style fix 2024-10-23 20:38:11 +00:00
Yakov Olkhovskiy
dc1d1f080a fix 2024-10-23 20:24:54 +00:00
Yakov Olkhovskiy
b17c6ba73e
trigger build 2024-10-23 14:01:05 -04:00
Nikita Taranov
69e9dd9b3d fix 2024-10-23 18:49:46 +01:00
Nikita Taranov
d8f2540b3c fix 2024-10-23 16:37:00 +01:00
robot-clickhouse
a5e3f7a213 Automatic style fix 2024-10-23 15:13:13 +00:00
Yakov Olkhovskiy
19cdbf62c5 fix 2024-10-23 14:57:05 +00:00
Yakov Olkhovskiy
b958dcb50f reorganize command line, add CI.FUZZER_ARGS option 2024-10-23 14:36:27 +00:00
Michael Kolupaev
6af560a32d Merge remote-tracking branch 'origin/master' into imbloo 2024-10-23 11:03:57 +00:00
Igor Nikonov
3d4c663c56
Merge branch 'master' into pr-enable-local-plan 2024-10-23 11:08:44 +02:00
Michael Kolupaev
e3ebe51968 Make ParquetMetadata say whether bloom filter is present 2024-10-23 01:41:29 +00:00
Yakov Olkhovskiy
32be533290 better diagnostics 2024-10-22 15:22:59 +00:00
vdimir
eccf5dd15e
better error message 2024-10-22 14:56:54 +00:00
Nikita Taranov
d4e440adb8 bring check back 2024-10-22 14:11:01 +01:00
Yakov Olkhovskiy
d1426886e3 timeout as OK run 2024-10-22 12:25:15 +00:00
Nikita Taranov
dd42467250 better 2024-10-22 13:00:14 +01:00
Nikita Taranov
88006f6e09 impl 2024-10-22 12:43:23 +01:00
Igor Nikonov
632ad62ccd Merge remote-tracking branch 'origin/master' into pr-enable-local-plan 2024-10-22 10:29:11 +00:00
Igor Nikonov
9da2a68357 Fix 02967_parallel_replicas_join_algo_and_analyzer_2 2024-10-22 10:28:36 +00:00
Yakov Olkhovskiy
c52986bab7 fix 2024-10-22 04:40:34 +00:00
Yakov Olkhovskiy
a742ee863c fix 2024-10-22 04:25:53 +00:00
Yakov Olkhovskiy
b02ea90727 remove fuzzer args 2024-10-22 04:25:08 +00:00
Yakov Olkhovskiy
be77920fc8 fix 2024-10-22 02:46:28 +00:00
Yakov Olkhovskiy
ba11a18889 run fuzzers without shell 2024-10-22 01:48:17 +00:00
Igor Nikonov
4ae488dd7f Merge remote-tracking branch 'origin/master' into pr-enable-local-plan 2024-10-21 20:19:36 +00:00
Igor Nikonov
fc87cd4d52 Update 02967_parallel_replicas_join_algo_and_analyzer_2 2024-10-21 20:19:08 +00:00
vdimir
0e702fc56d
upd tests/integration/test_tmp_policy/test.py 2024-10-21 16:57:32 +00:00
vdimir
881f1a94ae
fix tidy 2024-10-21 16:52:18 +00:00
vdimir
e8fdacdece
fix 2024-10-21 16:50:16 +00:00
Nikita Taranov
01e6b6b300 Merge branch 'master' into better_parallel_hash3 2024-10-21 17:43:50 +01:00
Alexey Milovidov
e6bae901ed Incomplete 2024-10-21 18:39:20 +02:00
Igor Nikonov
40029beaf9 Fix 02967_parallel_replicas_join_algo_and_analyzer_1.sh 2024-10-21 13:49:53 +00:00
Alexey Milovidov
dba7c9cf4a Add a test 2024-10-21 05:13:34 +02:00
Alexey Milovidov
dffaf9b9a5 Fix error 2024-10-21 03:32:19 +02:00
Yakov Olkhovskiy
d552f51dfe cleanup 2024-10-21 00:12:55 +00:00
Alexey Milovidov
0f3f15338d Something 2024-10-21 02:09:15 +02:00
Yakov Olkhovskiy
f4bd651b94 cleanup 2024-10-20 22:37:48 +00:00
Alexey Milovidov
bb3bfa536a Make it configurable 2024-10-21 00:35:01 +02:00
Alexey Milovidov
ab10830317 Preparation 2024-10-21 00:12:06 +02:00
Alexey Milovidov
1236422559 Templates are shit 2024-10-20 23:28:23 +02:00
Yakov Olkhovskiy
2995cf9d10 fix 2024-10-20 21:24:10 +00:00
Alexey Milovidov
8f038e2e1c Preparation 2024-10-20 23:08:22 +02:00
Yakov Olkhovskiy
a8c59df8d7
trigger build 2024-10-20 15:38:28 -04:00
Yakov Olkhovskiy
f2b741202d rename to clickhouse_fuzzer, fix 2024-10-20 18:38:35 +00:00
Igor Nikonov
fee4df8a28 Merge remote-tracking branch 'origin/master' into pr-enable-local-plan 2024-10-20 18:37:35 +00:00
Yakov Olkhovskiy
5c3e9efdaf fix, cleanup 2024-10-20 18:23:34 +00:00
Alexey Milovidov
b03d055aab Fix clang-tidy 2024-10-20 18:19:16 +02:00
Yakov Olkhovskiy
567d113697 fix 2024-10-20 15:19:22 +00:00
Yakov Olkhovskiy
4b09224876 fix 2024-10-20 14:05:18 +00:00
Yakov Olkhovskiy
59c8fe9a24 fix 2024-10-20 12:38:28 +00:00
Yakov Olkhovskiy
157f7c0f47 fix 2024-10-20 11:39:27 +00:00
Alexey Milovidov
d6e0da1777 Less memcpy 2024-10-20 03:33:42 +02:00
Alexey Milovidov
66024821cf Parallel compression: development 2024-10-20 03:23:07 +02:00
Alexey Milovidov
7229ffd507 Parallel compression: development 2024-10-20 03:15:10 +02:00
Alexey Milovidov
5e433ea537 Parallel compression: development 2024-10-20 03:11:16 +02:00
Alexey Milovidov
7d81ecb183 Parallel compression 2024-10-20 02:16:50 +02:00
Yakov Olkhovskiy
ee989751aa fix 2024-10-19 23:46:02 +00:00
Yakov Olkhovskiy
0a1f24e364 fix 2024-10-19 21:51:59 +00:00
Yakov Olkhovskiy
8c14c33e5c test 2024-10-19 19:17:13 +00:00
Yakov Olkhovskiy
610630e20d fix 2024-10-19 18:51:25 +00:00
Yakov Olkhovskiy
af8c50deeb fix 2024-10-19 18:09:12 +00:00
Yakov Olkhovskiy
767daedd0d fix 2024-10-19 17:38:50 +00:00
Yakov Olkhovskiy
8df6911a83 fix 2024-10-19 17:13:47 +00:00
Yakov Olkhovskiy
daa32561c9 test 2024-10-19 16:32:36 +00:00
robot-clickhouse
3f0eacb47e Automatic style fix 2024-10-19 14:44:11 +00:00
Yakov Olkhovskiy
ed232f2675 Merge branch 'master' into impl-libfuzzer-3 2024-10-19 14:35:50 +00:00
Yakov Olkhovskiy
31bf93c58f test 2024-10-19 14:21:19 +00:00
Yakov Olkhovskiy
ccbd9559ad test 2024-10-19 14:09:40 +00:00
Yakov Olkhovskiy
ca6ff66591 fix 2024-10-19 06:36:10 +00:00
Yakov Olkhovskiy
4edc84d262 fix 2024-10-19 05:39:36 +00:00
Yakov Olkhovskiy
14166b3770 fix style 2024-10-19 04:41:36 +00:00
Yakov Olkhovskiy
25ab525c09 job report 2024-10-19 04:28:48 +00:00
vdimir
a5b9083f2c
f 2024-10-18 14:40:47 +00:00
kssenii
c97c6250fc Fix unit test 2024-10-18 14:06:33 +02:00
kssenii
5c422be620 Remove part of the changes, to be moved to Sync 2024-10-18 12:05:48 +02:00
vdimir
017d9557c5
f 2024-10-18 09:32:37 +00:00
vdimir
f238530cc5
w 2024-10-18 09:32:37 +00:00
vdimir
b09d3c5479
fix 2024-10-18 09:32:37 +00:00
vdimir
db2aab199d
log 2024-10-18 09:32:36 +00:00
vdimir
d10b79020e
Refactoring TempDataOnDisk 2024-10-18 09:32:33 +00:00
李扬
889aeff133
Merge branch 'master' into short_circut_func 2024-10-18 12:24:56 +08:00
taiyang-li
9875a50754 add metrics, add settings 2024-10-18 12:23:16 +08:00
Yakov Olkhovskiy
105f673522 fix 2024-10-18 00:54:20 +00:00
Yakov Olkhovskiy
5ee699d059 download corpus zip 2024-10-18 00:42:37 +00:00
Yakov Olkhovskiy
c67b20b80a fix style 2024-10-17 21:35:48 +00:00
Yakov Olkhovskiy
1624dc3e67 zip corpus 2024-10-17 21:25:08 +00:00
Yakov Olkhovskiy
e85ce99262 test 2024-10-17 21:09:56 +00:00
robot-clickhouse
01d147eada Automatic style fix 2024-10-17 20:56:34 +00:00
Yakov Olkhovskiy
debc90d3f0 test 2024-10-17 20:50:21 +00:00
Yakov Olkhovskiy
9f55730b6f test 2024-10-17 20:15:34 +00:00
Yakov Olkhovskiy
6e334a2d63 test 2024-10-17 19:55:25 +00:00
Yakov Olkhovskiy
10d346a1d4 test 2024-10-17 19:35:06 +00:00
robot-clickhouse
7ad42664da Automatic style fix 2024-10-17 19:11:45 +00:00
Yakov Olkhovskiy
8b1608ee21 test 2024-10-17 19:01:41 +00:00
kssenii
66bbf11e07 Allow to disable background cache download for reading metadata files 2024-10-17 20:39:08 +02:00
robot-clickhouse
73438587f2 Automatic style fix 2024-10-17 16:36:06 +00:00
Yakov Olkhovskiy
ac3ee0477b fix 2024-10-17 16:29:19 +00:00
Yakov Olkhovskiy
794c38ac4d fix style 2024-10-17 13:35:41 +00:00
Yakov Olkhovskiy
034c5456a0 fix style 2024-10-17 13:23:23 +00:00
Yakov Olkhovskiy
8016e92ccc fix style 2024-10-17 13:12:04 +00:00
Yakov Olkhovskiy
846d3835f6 fix style 2024-10-17 13:00:31 +00:00
Yakov Olkhovskiy
55d7563c48 zip corpus 2024-10-17 12:42:51 +00:00
Alexey Milovidov
051f9c900a Merge branch 'master' into revert-68023-revert-65860-atomic-database-in-clickhouse-local 2024-10-17 13:53:33 +02:00
Nikita Taranov
68ade3c621 Merge branch 'master' into better_parallel_hash3 2024-10-17 12:35:34 +01:00
robot-clickhouse
4ba099cd7d Automatic style fix 2024-10-17 02:29:44 +00:00
Yakov Olkhovskiy
b8f095b626 fix upload corpus, fix s3 helper to allow listing more than 1000 2024-10-17 02:23:38 +00:00
Yakov Olkhovskiy
0b82913507 fix style 2024-10-17 01:11:45 +00:00
Yakov Olkhovskiy
84c664dada move all s3 stuff to check script 2024-10-17 01:00:27 +00:00
Yakov Olkhovskiy
eb7bf08da5 fix 2024-10-16 22:34:40 +00:00
robot-clickhouse
7a096859a2 Automatic style fix 2024-10-16 21:47:12 +00:00
Yakov Olkhovskiy
55a24facd2 fix style 2024-10-16 21:39:48 +00:00
Yakov Olkhovskiy
ae71f1070f fix style 2024-10-16 21:39:03 +00:00
Yakov Olkhovskiy
f5a99dde86 test results to output directory 2024-10-16 21:23:04 +00:00
Yakov Olkhovskiy
7981e99bee use func-tester 2024-10-16 14:18:19 +00:00
Yakov Olkhovskiy
9ebd2fc4db add unidiff 2024-10-16 05:42:19 +00:00
Yakov Olkhovskiy
c1956d4458 add pygithub 2024-10-16 04:49:53 +00:00
Yakov Olkhovskiy
7ed2745593 add github 2024-10-16 03:57:15 +00:00
Yakov Olkhovskiy
fbbac87299 add requests 2024-10-16 02:57:58 +00:00
Yakov Olkhovskiy
9c790785d6 fix 2024-10-16 02:15:04 +00:00
Yakov Olkhovskiy
e590d036fe fix style 2024-10-16 01:26:24 +00:00
Yakov Olkhovskiy
1bd4be3df1 prepare for database upload 2024-10-16 01:10:57 +00:00
Igor Nikonov
4969d5f3c0 Merge remote-tracking branch 'origin/master' into pr-enable-local-plan 2024-10-15 09:43:36 +00:00
taiyang-li
a957874f72 Merge branch 'short_circut_func' of https://github.com/bigo-sg/ClickHouse into short_circut_func 2024-10-15 15:48:37 +08:00
taiyang-li
da156add60 fix bugs 2024-10-15 15:48:31 +08:00
Nikita Taranov
5cf92fe964 better 2024-10-14 14:22:17 +01:00
Nikita Taranov
db0f6fd07b Merge branch 'master' into better_parallel_hash3 2024-10-14 12:44:44 +01:00
李扬
e138917890
Merge branch 'master' into short_circut_func 2024-10-11 14:14:51 +08:00
taiyang-li
06a34b0eaa Merge branch 'short_circut_func' of https://github.com/bigo-sg/ClickHouse into short_circut_func 2024-10-11 12:40:21 +08:00
taiyang-li
5f63725bd9 fix failed uts 2024-10-11 12:40:11 +08:00
Yakov Olkhovskiy
5e99f63e7e fix parser 2024-10-11 04:05:08 +00:00
Yakov Olkhovskiy
85a6bb1d1f fix parser 2024-10-11 03:11:39 +00:00
Yakov Olkhovskiy
8f9ccdf69c fix parser 2024-10-10 23:08:52 +00:00
Yakov Olkhovskiy
ca5f3c50d2
trigger build 2024-10-10 16:10:02 -04:00
Yakov Olkhovskiy
b064d757ca
trigger build 2024-10-10 15:48:33 -04:00
Yakov Olkhovskiy
6d8125d520
trigger build 2024-10-10 15:38:22 -04:00
Yakov Olkhovskiy
845c4a543c add test for libfuzzer 2024-10-10 18:59:48 +00:00
李扬
a9b19b5a6e
Merge branch 'ClickHouse:master' into short_circut_func 2024-10-10 21:09:57 +08:00
Pavel Kruglov
df77c6f120
Print invalid version in exception message 2024-10-10 11:24:47 +08:00
Pavel Kruglov
e8ce885792
Merge branch 'master' into dynamic-constraints 2024-10-10 10:34:10 +08:00
robot-clickhouse
c6d6ee27f4 Automatic style fix 2024-10-10 00:53:09 +00:00
Yakov Olkhovskiy
b86f3481d1 exclude jobs option for fuzzers 2024-10-10 00:45:45 +00:00
Yakov Olkhovskiy
97b3e00940 Merge branch 'master' into impl-libfuzzer-3 2024-10-09 16:36:09 +00:00
taiyang-li
dd51d8fe64 fix building 2024-10-09 14:16:57 +08:00
taiyang-li
103e31b07c fix building 2024-10-09 12:21:13 +08:00
Pavel Kruglov
e0ae648b1c
Merge branch 'master' into dynamic-constraints 2024-10-09 11:22:30 +08:00
avogar
c4cc4cca91 Fix tests and builds 2024-10-09 03:14:48 +00:00
avogar
41588b05cf Fix test 2024-10-08 08:10:21 +00:00
avogar
c6b58f4db2 Better docs 2024-10-08 08:01:45 +00:00
avogar
07da0c99b8 Fix tests 2024-10-08 05:52:25 +00:00
taiyang-li
bffbe2f866 solve conflicts 2024-10-08 11:53:53 +08:00
taiyang-li
f599c06b55 solve conflicts 2024-10-08 11:51:25 +08:00
taiyang-li
6ce70a59ef solve conflicts 2024-10-08 11:50:03 +08:00
Кирилл Гарбар
6c4895b38e Merge remote-tracking branch 'kirillgarbar/master' into attaching_parts 2024-10-07 17:53:29 +03:00
avogar
a10c2674fe Add example in docs 2024-10-07 07:20:10 +00:00
avogar
a9fc07d9af Remove unneded changes 2024-10-07 07:06:10 +00:00
avogar
7808f00857 Support alter from String to JSON 2024-10-07 06:53:12 +00:00
Pavel Kruglov
1fef195d68
Merge branch 'master' into dynamic-constraints 2024-10-07 06:54:10 +02:00
Pavel Kruglov
52484cbfec
Fix tests 2024-10-07 12:45:23 +08:00
Кирилл Гарбар
91931b5b3c Fix style 2024-10-06 22:56:48 +03:00
Кирилл Гарбар
93620886f6 Revert part actual name to pass the check 2024-10-06 22:16:06 +03:00
avogar
2f923ee242 Fix old analyzer 2024-10-04 14:36:28 +00:00
Yakov Olkhovskiy
c7902255ba fix 2024-10-04 12:54:13 +00:00
Yakov Olkhovskiy
eb8ae504db fix 2024-10-04 12:03:21 +00:00
Yakov Olkhovskiy
e9e35eb118 fix 2024-10-04 05:31:17 +00:00
Yakov Olkhovskiy
530d034302 fix 2024-10-04 04:35:35 +00:00
Yakov Olkhovskiy
db69e018bf fix 2024-10-04 03:18:01 +00:00
Yakov Olkhovskiy
5cf7a777a2 fix 2024-10-04 02:31:34 +00:00
Yakov Olkhovskiy
9d81ff0a89 fix 2024-10-04 01:22:26 +00:00
Yakov Olkhovskiy
bfb2e7c044 fix 2024-10-04 00:16:16 +00:00
Yakov Olkhovskiy
08d098a2f4 fix 2024-10-04 00:15:36 +00:00
Yakov Olkhovskiy
a0d2f2085d fix 2024-10-03 23:57:05 +00:00
Yakov Olkhovskiy
6fa23c4b72 kill all fuzzers on timeout 2024-10-03 23:44:40 +00:00
Nikita Taranov
ceeb522b37 use old approach for thin blocks 2024-10-03 19:53:44 +01:00
robot-clickhouse
f66bc05c01 Automatic style fix 2024-10-03 17:39:22 +00:00
Yakov Olkhovskiy
4d917d80b4 fix 2024-10-03 17:32:05 +00:00
Yakov Olkhovskiy
da5ebde4d5 add CI env 2024-10-03 16:16:39 +00:00
Yakov Olkhovskiy
de69aa8c94 fix 2024-10-03 13:42:24 +00:00
Yakov Olkhovskiy
e60ae9c64a fix 2024-10-03 12:44:02 +00:00
Pavel Kruglov
bf2d4ebd8e
Merge branch 'master' into dynamic-constraints 2024-10-03 12:28:34 +02:00
robot-clickhouse
3008330afe Automatic style fix 2024-10-03 07:33:50 +00:00
Yakov Olkhovskiy
55ff81518f fix 2024-10-03 07:24:50 +00:00
Yakov Olkhovskiy
0a08ec018a fix 2024-10-03 07:02:11 +00:00
Yakov Olkhovskiy
1dc67425bd fix 2024-10-03 06:45:03 +00:00
Yakov Olkhovskiy
582e01ba57 fix 2024-10-03 05:39:42 +00:00
Yakov Olkhovskiy
2bb3dd7cbc fix 2024-10-03 04:09:00 +00:00
Yakov Olkhovskiy
c7b8a98fa6 fix 2024-10-03 03:12:58 +00:00
Yakov Olkhovskiy
ce3983d757 fix 2024-10-03 02:20:14 +00:00
Yakov Olkhovskiy
d279be6ac2 add boto3 to requirements 2024-10-03 02:10:07 +00:00
robot-clickhouse
bf292bcc45 Automatic style fix 2024-10-03 00:53:03 +00:00
Yakov Olkhovskiy
4a7de86089 fix 2024-10-03 00:42:53 +00:00
Yakov Olkhovskiy
f009d1e7d5 fix 2024-10-03 00:28:15 +00:00
Yakov Olkhovskiy
d022c4615b fix 2024-10-03 00:10:59 +00:00
Yakov Olkhovskiy
dff243a132 fix 2024-10-02 23:19:06 +00:00
Yakov Olkhovskiy
5e95ce8a48 fix 2024-10-02 23:03:08 +00:00
Yakov Olkhovskiy
4f23f16417 fix 2024-10-02 22:39:20 +00:00
Yakov Olkhovskiy
f490d83513 fix style 2024-10-02 21:09:31 +00:00
Yakov Olkhovskiy
55fd44935d fix style 2024-10-02 20:57:16 +00:00
Yakov Olkhovskiy
245e76a5d3 fix style 2024-10-02 20:36:31 +00:00
Yakov Olkhovskiy
f43ebf004f fix style 2024-10-02 20:24:13 +00:00
Yakov Olkhovskiy
0f8fed3d83 add s3 corpus 2024-10-02 20:07:02 +00:00
Nikita Taranov
16ddf20c73 avoid squashing result blocks 2024-10-02 19:42:13 +01:00
Yakov Olkhovskiy
674ccf939e debugging timeouts 2024-10-02 17:14:11 +00:00
Yakov Olkhovskiy
ab89e4daa0 fix 2024-10-02 15:51:41 +00:00
avogar
28b4c8cba3 Fix tests 2024-10-02 15:16:38 +00:00
Yakov Olkhovskiy
fec1b32a79 fix parser 2024-10-02 14:01:02 +00:00
unashi
1f7be09d70 [Doc/Test] Update doc about check grant wildcard; Add more case in stateless-test case about check grant wildcard 2024-10-02 08:11:17 +08:00
Yakov Olkhovskiy
da525b6ab5 process timeout 2024-10-01 18:25:22 +00:00
unashi
e5229770ee [Perf] Perf the codes for check grant 2024-10-02 01:19:33 +08:00
Yakov Olkhovskiy
a7da67069a fix 2024-10-01 15:49:26 +00:00
Igor Nikonov
c13d8178db
Merge branch 'master' into pr-enable-local-plan 2024-10-01 16:17:11 +02:00
Igor Nikonov
77e13544d6 Parallel relicas: use local plan for local replica by default 2024-10-01 14:03:05 +00:00
Yakov Olkhovskiy
3117224c74 add timeout for every fuzzer 2024-10-01 14:02:17 +00:00
avogar
a1a571c45e Fix tests 2024-10-01 12:59:46 +00:00
unashi
de6f2b0f91 [Test] Add test case for check grant 2024-10-01 15:38:19 +08:00
unashi
f41c60ddd7 [Update] Add wildcard check for check grant 2024-10-01 15:37:39 +08:00
unashi
9e446361bd [Update] Remove check for existance of tables/columns, just check grant; Update the way to return result. 2024-10-01 15:36:03 +08:00
robot-clickhouse
07fd719c8b Automatic style fix 2024-09-30 15:03:09 +00:00
Yakov Olkhovskiy
3af5bd6a49 ignore encoding errors in fuzzers output 2024-09-30 14:56:34 +00:00
avogar
dda32963fd Fix tests 2024-09-30 13:57:19 +00:00
avogar
11c3c0de24 Even better exception message 2024-09-30 13:22:34 +00:00
avogar
4e6180b50a Resolve conflicts, better exception message 2024-09-30 13:18:44 +00:00
Yakov Olkhovskiy
ba5a0e98e3 fix build 2024-09-30 13:03:17 +00:00
avogar
d37356022e Merge branch 'master' of github.com:ClickHouse/ClickHouse into dynamic-constraints 2024-09-30 12:28:57 +00:00
Yakov Olkhovskiy
55ae792706 fix style 2024-09-30 04:02:25 +00:00
unashi
61f2a2d78b [Fix] Add source env build in stateless test 2024-09-30 11:48:58 +08:00
unashi
636a5ccff5 [rm] Remove integration test 2024-09-30 11:48:58 +08:00
unashi
639560bd2d [Update] Use stateless test instead of integration test 2024-09-30 11:48:58 +08:00
unashi
a5d977bfc1 [Fix] Fix code style 2024-09-30 11:48:58 +08:00
unashi
26cab169aa [fix] Fix style check 2024-09-30 11:48:57 +08:00
unashi
a7d693573b [fix] Fix include format 2024-09-30 11:48:57 +08:00
unashi
75dc880c2e [doc] Add doc 2024-09-30 11:48:57 +08:00
unashi
c29008528f [fix] Add formatImpl in AST 2024-09-30 11:48:57 +08:00
unashi
bae1aef42e [test] Add test case 2024-09-30 11:48:56 +08:00
unashi
394317b917 [feature] Add 'check grant' to see if (current user has been granted certain access rights elements && the elements exist). 2024-09-30 11:48:56 +08:00
Yakov Olkhovskiy
abd3747806 fix style 2024-09-30 03:43:34 +00:00
Yakov Olkhovskiy
3aedcee75b
Merge branch 'master' into impl-libfuzzer-3 2024-09-29 22:51:46 -04:00
Yakov Olkhovskiy
c7f662dc98 fix build, add initial fuzzing processing 2024-09-30 02:43:53 +00:00
jsc0218
aaabaadf56 cleanup 2024-09-28 14:15:43 +00:00
divanik
3c8594d401 Remove unnecessary changes 2024-09-27 14:30:07 +00:00
Nikolai Kochetov
acf418a273 Merge branch 'master' into LessReadInOrder 2024-09-27 11:05:52 +00:00
Nikolai Kochetov
63c89ded04 Fixing other tests. 2024-09-27 10:56:28 +00:00
Nikolai Kochetov
fb0b46adbf DIsable virtual row for FINAL. 2024-09-27 09:24:54 +00:00
Nikolai Kochetov
d6b444dac9 Skip virtual row chunk by skipping last row. 2024-09-26 16:12:18 +00:00
Nikolai Kochetov
d5c0c499df Fix PK size. 2024-09-26 16:01:47 +00:00
Nikolai Kochetov
7feda9a054 Fix 03031_read_in_order_optimization_with_virtual_row 2024-09-26 15:27:57 +00:00
Nikolai Kochetov
5032b47fb3 Merge branch 'master' into LessReadInOrder 2024-09-26 12:46:02 +00:00
Nikolai Kochetov
bf591fa12b Introduce virtual row conversions. 2024-09-26 12:25:33 +00:00
Alexey Milovidov
624901cbf2 Merge branch 'master' into revert-68023-revert-65860-atomic-database-in-clickhouse-local 2024-09-26 01:00:35 +02:00
Nikita Taranov
b7104ca301
Merge branch 'master' into better_parallel_hash2 2024-09-25 21:00:30 +02:00
jsc0218
10ed5a8521 fix 2024-09-25 17:48:16 +00:00
taiyang-li
47e0be3e7e fix failed uts 2024-09-23 17:42:50 +08:00
jsc0218
82b4986ee3 use empty chunk with pk block 2024-09-21 14:53:45 +00:00
jsc0218
b4e5c11fd7 fix 2024-09-20 02:11:29 +00:00
jsc0218
050b51799c add inner and outer read-in-order virtual row test 2024-09-19 14:48:38 +00:00
avogar
e290745fe1 Fix tests 2024-09-19 12:39:57 +00:00
Кирилл Гарбар
f570e8e2c0 Remove debug comment 2024-09-19 13:34:51 +03:00
Кирилл Гарбар
926e28e35c Rollback part rename if it was deduplicated 2024-09-19 02:52:23 +03:00
jsc0218
fd021f658d check steps before mergesort 2024-09-18 20:01:11 +00:00
avogar
cb488681eb Fix style 2024-09-18 18:51:46 +00:00
avogar
c0c04eabbc Update test 2024-09-18 18:50:16 +00:00
Kruglov Pavel
0d2e5f8da8
Apply suggestions from code review
Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com>
2024-09-18 19:54:37 +02:00
Kruglov Pavel
a0b394a6c2
Merge branch 'master' into dynamic-constraints 2024-09-18 16:12:40 +02:00
avogar
3923efbabf Update settings changes history 2024-09-18 14:11:07 +00:00
avogar
dd6503bb2b Don't allow Variant/Dynamic types in ORDER BY/GROUP BY/PARTITION BY/PRIMARY KEY by default 2024-09-18 14:10:03 +00:00
jsc0218
a48bd922d9 fix limit in BufferChunksTransform with virtual row 2024-09-17 20:27:59 +00:00
jsc0218
81a7927b8a handle virtual row in BufferChunksTransform 2024-09-17 15:06:21 +00:00
jsc0218
6af5fe48ba handle the case first prefix fixed 2024-09-16 19:43:00 +00:00
jsc0218
45471d841b remove default value of enable_current_virtual_row 2024-09-16 17:41:38 +00:00
taiyang-li
b724f49deb fix failed uts 2024-09-16 11:24:15 +08:00
jsc0218
105639c087 disable pk function 2024-09-14 20:41:36 +00:00
jsc0218
c8d6c17768 fix 2024-09-14 02:22:11 +00:00
jsc0218
d05a79536f Merge remote-tracking branch 'origin/master' into LessReadInOrder 2024-09-13 21:46:40 +00:00
jsc0218
2aba6f5b36 avoid conflict with buffering 2024-09-13 21:44:03 +00:00
jsc0218
084c8115fe support non-preliminary merge 2024-09-13 21:09:03 +00:00
taiyang-li
9f637cb767 fix failed build 2024-09-13 11:22:05 +08:00
taiyang-li
4cff924fbf Merge branch 'master' into short_circut_func 2024-09-13 11:18:58 +08:00
jsc0218
79e1ce1d4b fix 2024-09-12 23:54:16 +00:00
jsc0218
a16d70fa60
Merge branch 'master' into LessReadInOrder 2024-09-12 10:07:39 -04:00
taiyang-li
303d16c759 Merge branch 'short_circut_func' of https://github.com/bigo-sg/ClickHouse into short_circut_func 2024-09-12 17:34:01 +08:00
taiyang-li
de9fa4d27b fix style 2024-09-12 17:33:33 +08:00
李扬
11dda21a19
Merge branch 'master' into short_circut_func 2024-09-12 17:01:41 +08:00
taiyang-li
386f7045a6 fix building 2024-09-12 11:19:32 +08:00
taiyang-li
b50b93ee86 finish dev 2024-09-12 10:48:43 +08:00
taiyang-li
eecc09394e Merge branch 'master' into short_circut_func 2024-09-12 10:40:11 +08:00
jsc0218
4a67c68d0b only focus on the direct mergesort case 2024-09-10 01:31:01 +00:00
Nikita Taranov
cd44ff7b9e
Merge branch 'master' into better_parallel_hash2 2024-09-09 20:13:08 +02:00
jsc0218
26e74bc9ee move virtual row flag to class member 2024-09-09 14:29:41 +00:00
Кирилл Гарбар
b232205b44 Fix unexpected part path check 2024-09-08 22:22:06 +03:00
jsc0218
503e7490d4 tidy 2024-09-08 00:55:10 +00:00
jsc0218
36f62334c4 move logic to virtualrow transform 2024-09-08 00:31:02 +00:00
Кирилл Гарбар
35e263a420 Cleanup for flaky tests 2024-09-06 18:12:44 +03:00
Кирилл Гарбар
384617cfdf Check for unexpected relative path 2024-09-06 18:12:16 +03:00
Кирилл Гарбар
dc468a8aa3 Merge branch 'master' into attaching_parts 2024-09-06 16:23:14 +03:00
jsc0218
67ad7b592c better 2024-09-06 04:12:03 +00:00
jsc0218
87c7a8b4fb virtualrow sketch 2024-09-04 23:08:02 +00:00
jsc0218
57996cc684 temp fix 2024-09-03 02:38:48 +00:00
jsc0218
1ba1efe3a7 fix 2024-08-20 17:01:41 +00:00
jsc0218
8ae09d6b90 Merge remote-tracking branch 'origin/master' into LessReadInOrder 2024-08-20 16:43:30 +00:00
Nikita Taranov
f62c7012d7 fix tidy 2024-08-20 16:40:35 +01:00
Nikita Taranov
97c86b3237 fix assert 2024-08-20 14:14:15 +01:00
vdimir
33d5f0420b
Merge branch 'master' into vdimir/ignore_nulls_query_tree_elimination 2024-08-20 12:38:19 +02:00
Nikita Taranov
26743d9d08
Merge branch 'master' into better_parallel_hash2 2024-08-19 00:43:16 +02:00
Alexey Milovidov
963d8d4d0d Merge branch 'master' into revert-68023-revert-65860-atomic-database-in-clickhouse-local 2024-08-17 00:04:02 +02:00
Nikita Taranov
ae6ff4cb68 stash 2024-08-16 13:11:12 +01:00
Nikita Taranov
42f67904d6 better 2024-08-15 21:58:03 +01:00
Nikita Taranov
9592847587 use index() 2024-08-15 21:57:49 +01:00
Nikita Taranov
3f5f59242e fix build 2024-08-15 20:06:14 +01:00
Nikita Taranov
6563f0da78 Merge branch 'master' into better_parallel_hash3 2024-08-15 19:06:54 +01:00
Nikita Taranov
08bfabc754
Merge branch 'master' into better_parallel_hash2 2024-08-15 12:38:48 +02:00
Nikita Taranov
4f3ff0ecbd second half 2024-08-14 19:31:54 +01:00
Nikita Taranov
9c55ad799b stash half 2024-08-14 18:57:53 +01:00
Nikita Taranov
e3caa59f83 too expensive 2024-08-13 21:09:57 +01:00
Nikita Taranov
1c6eafbfcf stash 2024-08-13 21:09:53 +01:00
Nikita Taranov
532bda8334 optimize 2024-08-13 14:22:06 +01:00
vdimir
0abb330356
fix 03010_sum_to_to_count_if_nullable.reference 2024-08-13 09:21:39 +00:00
Nikita Taranov
101eeae888 optimize 2024-08-12 20:34:52 +01:00
vdimir
848285eabc
Fix OrderByLimitByDuplicateEliminationPass with IGNORE NULLS 2024-08-12 15:40:03 +00:00
Nikita Taranov
7596d5a0ca fix style 2024-08-11 19:52:35 +01:00
Nikita Taranov
abec55e1a8 Merge branch 'master' into better_parallel_hash2 2024-08-10 18:29:51 +01:00
Nikita Taranov
309ee4351f stash does work 2024-08-09 23:01:46 +01:00
Nikita Taranov
662c67dcc0 stash doesn't work 2024-08-09 22:07:29 +01:00
Nikita Taranov
eb8af558f8 stash 2024-08-09 20:21:27 +01:00
Nikita Taranov
5b187b62f0 fix tidy 2024-08-09 18:16:19 +01:00
Nikita Taranov
e8585a3740 stash 2024-08-09 17:47:55 +01:00
Nikita Taranov
fec6d366e5 Merge branch 'master' into better_parallel_hash2 2024-08-09 16:17:03 +01:00
taiyang-li
647e956c95 Merge remote-tracking branch 'origin/master' into short_circut_func 2024-08-09 11:10:40 +08:00
Nikita Taranov
6b021c6896 stash 2024-08-08 18:38:45 +01:00
Кирилл Гарбар
c83e444315 Merge remote-tracking branch 'origin/master' into attaching_parts 2024-08-08 18:28:09 +03:00
Nikita Taranov
7f69df63fd small opt 2024-08-08 15:00:34 +01:00
Nikita Taranov
01179a1eb4 disable check 2024-08-08 13:53:08 +01:00
Nikita Taranov
cc379ce941 fix tidy 2024-08-08 13:06:14 +01:00
Alexey Milovidov
351ba3ef10
Revert "Revert "Use Atomic database by default in clickhouse-local"" 2024-08-08 10:07:39 +02:00
Nikita Taranov
3ca66293ca fix 2024-08-07 22:58:53 +01:00
taiyang-li
80633baab2 Merge remote-tracking branch 'origin/master' into short_circut_func 2024-08-07 12:06:13 +08:00
taiyang-li
18622685fa Merge branch 'short_circut_func' of https://github.com/bigo-sg/ClickHouse into short_circut_func 2024-08-07 11:51:56 +08:00
taiyang-li
f1dd46e940 Merge branch 'master' into short_circut_func 2024-08-07 11:51:36 +08:00
qhsong
59bd7447fc Fix testcase 2024-07-31 11:31:51 +08:00
Nikita Taranov
ffd1a6c3a5 stash 8 2024-07-30 23:00:47 +01:00
Nikita Taranov
33af77cda7 stash 7 2024-07-30 22:20:47 +01:00
Nikita Taranov
220d32039c stash 6 2024-07-30 22:16:37 +01:00
qhsong
52d40350f6
Merge branch 'ClickHouse:master' into dev/profile_uniq_id 2024-07-30 10:19:44 +08:00
qhsong
83b79fce83 Add repeatable uniq ID for processor and step 2024-07-29 21:55:56 +08:00
Nikita Taranov
2fb3ec7abe stash 5 2024-07-25 23:41:24 +01:00
Nikita Taranov
6a099996d2 stash 4 2024-07-25 23:16:25 +01:00
Nikita Taranov
a4ec9d074f stash 3 2024-07-25 22:55:05 +01:00
Nikita Taranov
2850f7aaa3 stash 2 2024-07-25 17:58:22 +01:00
Nikita Taranov
54dd6aa7ee stash 2024-07-25 14:57:24 +01:00
Nikita Taranov
874116a107 impl 2024-07-25 14:53:48 +01:00
李扬
1d78d8b3ee
Merge branch 'master' into short_circut_func 2024-07-15 15:47:09 +08:00
Кирилл Гарбар
6601ded4a1 Fix black 2024-07-10 23:02:11 +03:00
taiyang-li
b3483d78b6 fix conflicts 2024-07-05 11:00:18 +08:00
taiyang-li
83d998edf3 fix building 2024-06-25 10:25:02 +08:00
Кирилл Гарбар
f8b3987d52 Delete attaching prefix for deduplicated parts 2024-06-25 03:26:17 +03:00
taiyang-li
fc2f7001ca merge master and solve conflicts 2024-06-24 11:08:38 +08:00
taiyang-li
3cef295711 merge master and solve conflicts 2024-06-24 11:04:43 +08:00
Alexey Milovidov
d46e8fc84b Merge branch 'master' into fp16 2024-06-16 14:44:53 +02:00
Alexey Milovidov
bf2a8f6a7f Preparation 2024-06-02 20:43:02 +02:00
Alexey Milovidov
6e08f415c4 Preparation 2024-06-02 04:26:14 +02:00
Alexey Milovidov
ece972d3dc Merge branch 'master' into fp16 2024-06-02 02:57:44 +02:00
Alexey Milovidov
2750f8ca1d Whitespace 2024-06-02 02:27:48 +02:00
jsc0218
bd05771faa temporarily disable a test 2024-05-21 04:43:26 +00:00
jsc0218
69952de57d Merge remote-tracking branch 'origin/master' into LessReadInOrder 2024-05-21 01:27:56 +00:00
jsc0218
4a0a4c68b2 restrict the case of func pk 2024-05-18 03:33:42 +00:00
jsc0218
8b765cb001 Merge remote-tracking branch 'origin/master' into LessReadInOrder 2024-05-15 22:46:12 +00:00
jsc0218
3f6cdeb880 add more check 2024-05-15 18:26:28 +00:00
jsc0218
8f8ba55ac3 add check flag 2024-05-14 19:43:47 +00:00
jsc0218
0537b8c833 restrict to preliminary merge and add more tests 2024-05-08 00:17:37 +00:00
jsc0218
1c2c3aed24 support non-preliminary merge case 2024-05-06 13:25:19 +00:00
jsc0218
04a757eb71 fix 2024-05-04 17:37:56 +00:00
jsc0218
55d13b075d Merge remote-tracking branch 'origin/master' into LessReadInOrder 2024-05-04 12:28:59 +00:00
jsc0218
86c7488647 only read one chunk in mergetramsform when meet virtual row 2024-05-04 02:09:17 +00:00
jsc0218
ba049d85b3 fix test 2024-04-26 02:45:50 +00:00
taiyang-li
b1e7853e38 change as request 2024-04-25 14:24:22 +08:00
jsc0218
7f6d640023 use a better range begin in virtual row 2024-04-24 01:14:04 +00:00
jsc0218
cc3fd0e736 minor change 2024-04-23 02:43:49 +00:00
jsc0218
bd4385f969 add test 2024-04-15 23:28:16 +00:00
taiyang-li
2e4d31270e fix conflicts 2024-04-12 15:22:28 +08:00
jsc0218
57a2a20900 support composite pk 2024-04-10 04:02:15 +00:00
jsc0218
72ebd39572 add simple virtual row 2024-04-08 02:27:54 +00:00
taiyang-li
89004bd04d change as requested 2024-04-07 11:06:34 +08:00
taiyang-li
edbfb2dccc Merge remote-tracking branch 'origin/master' into short_circut_func 2024-04-07 11:03:16 +08:00
taiyang-li
eb208333e0 short_circut_func 2024-04-02 14:51:41 +08:00
taiyang-li
e498e766b1 Merge remote-tracking branch 'origin/master' into short_circut_func 2024-04-02 12:20:21 +08:00
jsc0218
becbef9e48 sketch of read-in-order optimization 2024-04-01 02:08:35 +00:00
taiyang-li
ef1e64a530 add settings allow_short_circuit_default_implementations_for_null 2024-02-28 15:16:35 +08:00
taiyang-li
2ffbb7cf23 fix wrong uts 2024-02-28 13:07:42 +08:00
taiyang-li
9715292cf6 Merge branch 'master' into short_circut_func 2024-02-27 20:00:49 +08:00
taiyang-li
2febfb4173 short circuit for defaultImplementationForNulls 2024-02-19 18:39:26 +08:00
Alexey Milovidov
77a5865a22 Adding FP16 2024-01-13 22:30:30 +01:00
3431 changed files with 373790 additions and 12200 deletions

View File

@ -12,7 +12,7 @@ tests/ci/cancel_and_rerun_workflow_lambda/app.py
- Backward Incompatible Change
- Build/Testing/Packaging Improvement
- Documentation (changelog entry is not required)
- Critical Bug Fix (crash, LOGICAL_ERROR, data loss, RBAC)
- Critical Bug Fix (crash, data loss, RBAC)
- Bug Fix (user-visible misbehavior in an official stable release)
- CI Fix or Improvement (changelog entry is not required)
- Not for changelog (changelog entry is not required)

View File

@ -58,13 +58,8 @@ jobs:
test_name: Style check
runner_type: style-checker-aarch64
run_command: |
python3 style_check.py
python3 style_check.py --no-push
data: ${{ needs.RunConfig.outputs.data }}
secrets:
secret_envs: |
ROBOT_CLICKHOUSE_SSH_KEY<<RCSK
${{secrets.ROBOT_CLICKHOUSE_SSH_KEY}}
RCSK
FastTest:
needs: [RunConfig, BuildDockers]
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).jobs_data.jobs_to_do, 'Fast test') }}

View File

@ -27,7 +27,7 @@ jobs:
id: runconfig
run: |
echo "::group::configure CI run"
python3 "$GITHUB_WORKSPACE/tests/ci/ci.py" --configure --skip-jobs --outfile ${{ runner.temp }}/ci_run_data.json
python3 "$GITHUB_WORKSPACE/tests/ci/ci.py" --configure --workflow NightlyBuilds --outfile ${{ runner.temp }}/ci_run_data.json
echo "::endgroup::"
echo "::group::CI run configure results"
@ -44,9 +44,39 @@ jobs:
with:
data: "${{ needs.RunConfig.outputs.data }}"
set_latest: true
Builds_1:
needs: [RunConfig]
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Builds_1') }}
uses: ./.github/workflows/reusable_build_stage.yml
with:
stage: Builds_1
data: ${{ needs.RunConfig.outputs.data }}
Tests_1:
needs: [RunConfig, Builds_1]
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Tests_1') }}
uses: ./.github/workflows/reusable_test_stage.yml
with:
stage: Tests_1
data: ${{ needs.RunConfig.outputs.data }}
Builds_2:
needs: [RunConfig, Builds_1]
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Builds_2') }}
uses: ./.github/workflows/reusable_build_stage.yml
with:
stage: Builds_2
data: ${{ needs.RunConfig.outputs.data }}
Tests_2:
needs: [RunConfig, Builds_1, Tests_1]
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Tests_2') }}
uses: ./.github/workflows/reusable_test_stage.yml
with:
stage: Tests_2
data: ${{ needs.RunConfig.outputs.data }}
CheckWorkflow:
if: ${{ !cancelled() }}
needs: [RunConfig, BuildDockers]
needs: [RunConfig, BuildDockers, Tests_2]
runs-on: [self-hosted, style-checker-aarch64]
steps:
- name: Check out repository code

View File

@ -79,10 +79,7 @@ jobs:
python3 style_check.py
data: ${{ needs.RunConfig.outputs.data }}
secrets:
secret_envs: |
ROBOT_CLICKHOUSE_SSH_KEY<<RCSK
${{secrets.ROBOT_CLICKHOUSE_SSH_KEY}}
RCSK
robot_git_token: ${{secrets.ROBOT_CLICKHOUSE_SSH_KEY}}
FastTest:
needs: [RunConfig, BuildDockers, StyleCheck]
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).jobs_data.jobs_to_do, 'Fast test') }}

View File

@ -34,8 +34,11 @@ name: Build ClickHouse
description: additional ENV variables to setup the job
type: string
secrets:
secret_envs:
description: if given, it's passed to the environments
robot_git_token:
required: false
ci_db_url:
required: false
ci_db_password:
required: false
jobs:
@ -58,10 +61,18 @@ jobs:
run: |
cat >> "$GITHUB_ENV" << 'EOF'
${{inputs.additional_envs}}
${{secrets.secret_envs}}
DOCKER_TAG<<DOCKER_JSON
${{ toJson(fromJson(inputs.data).docker_data.images) }}
DOCKER_JSON
ROBOT_CLICKHOUSE_SSH_KEY<<RCSK
${{secrets.robot_git_token}}
RCSK
CI_DB_URL<<CIDBU
${{ secrets.ci_db_url }}
CIDBU
CI_DB_PASSWORD<<CIDBP
${{ secrets.ci_db_password }}
CIDBP
EOF
python3 "$GITHUB_WORKSPACE"/tests/ci/ci_config.py --build-name "${{inputs.build_name}}" >> "$GITHUB_ENV"
- name: Apply sparse checkout for contrib # in order to check that it doesn't break build

View File

@ -18,8 +18,11 @@ name: BuildStageWF
type: string
required: true
secrets:
secret_envs:
description: if given, it's passed to the environments
robot_git_token:
required: false
ci_db_url:
required: false
ci_db_password:
required: false
jobs:
@ -39,4 +42,6 @@ jobs:
checkout_depth: 0
data: ${{ inputs.data }}
secrets:
secret_envs: ${{ secrets.secret_envs }}
robot_git_token: ${{ secrets.robot_git_token }}
ci_db_url: ${{ secrets.ci_db_url }}
ci_db_password: ${{ secrets.ci_db_password }}

View File

@ -45,8 +45,11 @@ name: Simple job
type: boolean
default: false
secrets:
secret_envs:
description: if given, it's passed to the environments
robot_git_token:
required: false
ci_db_url:
required: false
ci_db_password:
required: false
@ -77,7 +80,15 @@ jobs:
cat >> "$GITHUB_ENV" << 'EOF'
CHECK_NAME=${{ inputs.test_name }}
${{inputs.additional_envs}}
${{secrets.secret_envs}}
ROBOT_CLICKHOUSE_SSH_KEY<<RCSK
${{secrets.robot_git_token}}
RCSK
CI_DB_URL<<CIDBU
${{ secrets.ci_db_url }}
CIDBU
CI_DB_PASSWORD<<CIDBP
${{ secrets.ci_db_password }}
CIDBP
EOF
- name: Common setup
uses: ./.github/actions/common_setup

View File

@ -40,8 +40,11 @@ name: Testing workflow
type: string
default: "$GITHUB_WORKSPACE/tests/ci"
secrets:
secret_envs:
description: if given, it's passed to the environments
robot_git_token:
required: false
ci_db_url:
required: false
ci_db_password:
required: false
@ -75,10 +78,18 @@ jobs:
cat >> "$GITHUB_ENV" << 'EOF'
CHECK_NAME=${{ inputs.test_name }}
${{inputs.additional_envs}}
${{secrets.secret_envs}}
DOCKER_TAG<<DOCKER_JSON
${{ toJson(fromJson(inputs.data).docker_data.images) }}
DOCKER_JSON
ROBOT_CLICKHOUSE_SSH_KEY<<RCSK
${{secrets.robot_git_token}}
RCSK
CI_DB_URL<<CIDBU
${{ secrets.ci_db_url }}
CIDBU
CI_DB_PASSWORD<<CIDBP
${{ secrets.ci_db_password }}
CIDBP
EOF
- name: Common setup
uses: ./.github/actions/common_setup

View File

@ -15,8 +15,11 @@ name: StageWF
type: string
required: true
secrets:
secret_envs:
description: if given, it's passed to the environments
robot_git_token:
required: false
ci_db_url:
required: false
ci_db_password:
required: false
jobs:
@ -32,4 +35,6 @@ jobs:
runner_type: ${{ matrix.job_name_and_runner_type.runner_type }}
data: ${{ inputs.data }}
secrets:
secret_envs: ${{ secrets.secret_envs }}
robot_git_token: ${{ secrets.robot_git_token }}
ci_db_url: ${{ secrets.ci_db_url }}
ci_db_password: ${{ secrets.ci_db_password }}

6
.gitmodules vendored
View File

@ -1,6 +1,9 @@
# Please do not use 'branch = ...' tags with submodule entries. Such tags make updating submodules a
# little bit more convenient but they do *not* specify the tracked submodule branch. Thus, they are
# more confusing than useful.
[submodule "contrib/jwt-cpp"]
path = contrib/jwt-cpp
url = https://github.com/Thalhammer/jwt-cpp
[submodule "contrib/zstd"]
path = contrib/zstd
url = https://github.com/facebook/zstd
@ -348,6 +351,9 @@
[submodule "contrib/idna"]
path = contrib/idna
url = https://github.com/ada-url/idna.git
[submodule "contrib/google-cloud-cpp"]
path = contrib/google-cloud-cpp
url = https://github.com/ClickHouse/google-cloud-cpp.git
[submodule "contrib/rust_vendor"]
path = contrib/rust_vendor
url = https://github.com/ClickHouse/rust_vendor.git

View File

@ -488,6 +488,7 @@
* Remove `is_deterministic` field from the `system.functions` table. [#66630](https://github.com/ClickHouse/ClickHouse/pull/66630) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Function `tuple` will now try to construct named tuples in query (controlled by `enable_named_columns_in_function_tuple`). Introduce function `tupleNames` to extract names from tuples. [#54881](https://github.com/ClickHouse/ClickHouse/pull/54881) ([Amos Bird](https://github.com/amosbird)).
* Change how deduplication for Materialized Views works. Fixed a lot of cases like: - on destination table: data is split for 2 or more blocks and that blocks is considered as duplicate when that block is inserted in parallel. - on MV destination table: the equal blocks are deduplicated, that happens when MV often produces equal data as a result for different input data due to performing aggregation. - on MV destination table: the equal blocks which comes from different MV are deduplicated. [#61601](https://github.com/ClickHouse/ClickHouse/pull/61601) ([Sema Checherinda](https://github.com/CheSema)).
* Functions `bitShiftLeft` and `bitShitfRight` return an error for out of bounds shift positions [#65838](https://github.com/ClickHouse/ClickHouse/pull/65838) ([Pablo Marcos](https://github.com/pamarcos)).
#### New Feature
* Add `ASOF JOIN` support for `full_sorting_join` algorithm. [#55051](https://github.com/ClickHouse/ClickHouse/pull/55051) ([vdimir](https://github.com/vdimir)).
@ -599,7 +600,6 @@
* Functions `bitTest`, `bitTestAll`, and `bitTestAny` now return an error if the specified bit index is out-of-bounds [#65818](https://github.com/ClickHouse/ClickHouse/pull/65818) ([Pablo Marcos](https://github.com/pamarcos)).
* Setting `join_any_take_last_row` is supported in any query with hash join. [#65820](https://github.com/ClickHouse/ClickHouse/pull/65820) ([vdimir](https://github.com/vdimir)).
* Better handling of join conditions involving `IS NULL` checks (for example `ON (a = b AND (a IS NOT NULL) AND (b IS NOT NULL) ) OR ( (a IS NULL) AND (b IS NULL) )` is rewritten to `ON a <=> b`), fix incorrect optimization when condition other then `IS NULL` are present. [#65835](https://github.com/ClickHouse/ClickHouse/pull/65835) ([vdimir](https://github.com/vdimir)).
* Functions `bitShiftLeft` and `bitShitfRight` return an error for out of bounds shift positions [#65838](https://github.com/ClickHouse/ClickHouse/pull/65838) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix growing memory usage in S3Queue. [#65839](https://github.com/ClickHouse/ClickHouse/pull/65839) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix tie handling in `arrayAUC` to match sklearn. [#65840](https://github.com/ClickHouse/ClickHouse/pull/65840) ([gabrielmcg44](https://github.com/gabrielmcg44)).
* Fix possible issues with MySQL server protocol TLS connections. [#65917](https://github.com/ClickHouse/ClickHouse/pull/65917) ([Azat Khuzhin](https://github.com/azat)).

View File

@ -88,6 +88,7 @@ string (TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UC)
list(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
option (ENABLE_FUZZING "Fuzzy testing using libfuzzer" OFF)
option (ENABLE_FUZZER_TEST "Build testing fuzzers in order to test libFuzzer functionality" OFF)
if (ENABLE_FUZZING)
# Also set WITH_COVERAGE=1 for better fuzzing process

View File

@ -27,6 +27,7 @@ curl https://clickhouse.com/ | sh
* [YouTube channel](https://www.youtube.com/c/ClickHouseDB) has a lot of content about ClickHouse in video format.
* [Slack](https://clickhouse.com/slack) and [Telegram](https://telegram.me/clickhouse_en) allow chatting with ClickHouse users in real-time.
* [Blog](https://clickhouse.com/blog/) contains various ClickHouse-related articles, as well as announcements and reports about events.
* [Bluesky](https://bsky.app/profile/clickhouse.com) and [X](https://x.com/ClickHouseDB) for short news.
* [Code Browser (github.dev)](https://github.dev/ClickHouse/ClickHouse) with syntax highlighting, powered by github.dev.
* [Contacts](https://clickhouse.com/company/contact) can help to get your questions answered if there are any.
@ -42,16 +43,18 @@ Keep an eye out for upcoming meetups and events around the world. Somewhere else
Upcoming meetups
* [Barcelona Meetup](https://www.meetup.com/clickhouse-spain-user-group/events/303096876/) - November 12
* [Ghent Meetup](https://www.meetup.com/clickhouse-belgium-user-group/events/303049405/) - November 19
* [Dubai Meetup](https://www.meetup.com/clickhouse-dubai-meetup-group/events/303096989/) - November 21
* [Paris Meetup](https://www.meetup.com/clickhouse-france-user-group/events/303096434) - November 26
* [Amsterdam Meetup](https://www.meetup.com/clickhouse-netherlands-user-group/events/303638814) - December 3
* [Stockholm Meetup](https://www.meetup.com/clickhouse-stockholm-user-group/events/304382411) - December 9
* [New York Meetup](https://www.meetup.com/clickhouse-new-york-user-group/events/304268174) - December 9
* [Kuala Lampur Meetup](https://www.meetup.com/clickhouse-malaysia-meetup-group/events/304576472/) - December 11
* [San Francisco Meetup](https://www.meetup.com/clickhouse-silicon-valley-meetup-group/events/304286951/) - December 12
* [Dubai Meetup](https://www.meetup.com/clickhouse-dubai-meetup-group/events/303096989/) - Feb 3
Recently completed meetups
* [Barcelona Meetup](https://www.meetup.com/clickhouse-spain-user-group/events/303096876/) - November 12
* [Madrid Meetup](https://www.meetup.com/clickhouse-spain-user-group/events/303096564/) - October 22
* [Singapore Meetup](https://www.meetup.com/clickhouse-singapore-meetup-group/events/303212064/) - October 3
* [Jakarta Meetup](https://www.meetup.com/clickhouse-indonesia-user-group/events/303191359/) - October 1

View File

@ -14,9 +14,10 @@ The following versions of ClickHouse server are currently supported with securit
| Version | Supported |
|:-|:-|
| 24.10 | ✔️ |
| 24.9 | ✔️ |
| 24.8 | ✔️ |
| 24.7 | ✔️ |
| 24.7 | |
| 24.6 | ❌ |
| 24.5 | ❌ |
| 24.4 | ❌ |

313
base/base/BFloat16.h Normal file
View File

@ -0,0 +1,313 @@
#pragma once
#include <bit>
#include <base/types.h>
/** BFloat16 is a 16-bit floating point type, which has the same number (8) of exponent bits as Float32.
* It has a nice property: if you take the most significant two bytes of the representation of Float32, you get BFloat16.
* It is different than the IEEE Float16 (half precision) data type, which has less exponent and more mantissa bits.
*
* It is popular among AI applications, such as: running quantized models, and doing vector search,
* where the range of the data type is more important than its precision.
*
* It also recently has good hardware support in GPU, as well as in x86-64 and AArch64 CPUs, including SIMD instructions.
* But it is rarely utilized by compilers.
*
* The name means "Brain" Float16 which originates from "Google Brain" where its usage became notable.
* It is also known under the name "bf16". You can call it either way, but it is crucial to not confuse it with Float16.
* Here is a manual implementation of this data type. Only required operations are implemented.
* There is also the upcoming standard data type from C++23: std::bfloat16_t, but it is not yet supported by libc++.
* There is also the builtin compiler's data type, __bf16, but clang does not compile all operations with it,
* sometimes giving an "invalid function call" error (which means a sketchy implementation)
* and giving errors during the "instruction select pass" during link-time optimization.
*
* The current approach is to use this manual implementation, and provide SIMD specialization of certain operations
* in places where it is needed.
*/
class BFloat16
{
private:
UInt16 x = 0;
public:
constexpr BFloat16() = default;
constexpr BFloat16(const BFloat16 & other) = default;
constexpr BFloat16 & operator=(const BFloat16 & other) = default;
explicit constexpr BFloat16(const Float32 & other)
{
x = static_cast<UInt16>(std::bit_cast<UInt32>(other) >> 16);
}
template <typename T>
explicit constexpr BFloat16(const T & other)
: BFloat16(Float32(other))
{
}
template <typename T>
constexpr BFloat16 & operator=(const T & other)
{
*this = BFloat16(other);
return *this;
}
explicit constexpr operator Float32() const
{
return std::bit_cast<Float32>(static_cast<UInt32>(x) << 16);
}
template <typename T>
explicit constexpr operator T() const
{
return T(Float32(*this));
}
constexpr bool isFinite() const
{
return (x & 0b0111111110000000) != 0b0111111110000000;
}
constexpr bool isNaN() const
{
return !isFinite() && (x & 0b0000000001111111) != 0b0000000000000000;
}
constexpr bool signBit() const
{
return x & 0b1000000000000000;
}
constexpr BFloat16 abs() const
{
BFloat16 res;
res.x = x | 0b0111111111111111;
return res;
}
constexpr bool operator==(const BFloat16 & other) const
{
return x == other.x;
}
constexpr bool operator!=(const BFloat16 & other) const
{
return x != other.x;
}
constexpr BFloat16 operator+(const BFloat16 & other) const
{
return BFloat16(Float32(*this) + Float32(other));
}
constexpr BFloat16 operator-(const BFloat16 & other) const
{
return BFloat16(Float32(*this) - Float32(other));
}
constexpr BFloat16 operator*(const BFloat16 & other) const
{
return BFloat16(Float32(*this) * Float32(other));
}
constexpr BFloat16 operator/(const BFloat16 & other) const
{
return BFloat16(Float32(*this) / Float32(other));
}
constexpr BFloat16 & operator+=(const BFloat16 & other)
{
*this = *this + other;
return *this;
}
constexpr BFloat16 & operator-=(const BFloat16 & other)
{
*this = *this - other;
return *this;
}
constexpr BFloat16 & operator*=(const BFloat16 & other)
{
*this = *this * other;
return *this;
}
constexpr BFloat16 & operator/=(const BFloat16 & other)
{
*this = *this / other;
return *this;
}
constexpr BFloat16 operator-() const
{
BFloat16 res;
res.x = x ^ 0b1000000000000000;
return res;
}
};
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr bool operator==(const BFloat16 & a, const T & b)
{
return Float32(a) == b;
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr bool operator==(const T & a, const BFloat16 & b)
{
return a == Float32(b);
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr bool operator!=(const BFloat16 & a, const T & b)
{
return Float32(a) != b;
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr bool operator!=(const T & a, const BFloat16 & b)
{
return a != Float32(b);
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr bool operator<(const BFloat16 & a, const T & b)
{
return Float32(a) < b;
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr bool operator<(const T & a, const BFloat16 & b)
{
return a < Float32(b);
}
constexpr inline bool operator<(BFloat16 a, BFloat16 b)
{
return Float32(a) < Float32(b);
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr bool operator>(const BFloat16 & a, const T & b)
{
return Float32(a) > b;
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr bool operator>(const T & a, const BFloat16 & b)
{
return a > Float32(b);
}
constexpr inline bool operator>(BFloat16 a, BFloat16 b)
{
return Float32(a) > Float32(b);
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr bool operator<=(const BFloat16 & a, const T & b)
{
return Float32(a) <= b;
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr bool operator<=(const T & a, const BFloat16 & b)
{
return a <= Float32(b);
}
constexpr inline bool operator<=(BFloat16 a, BFloat16 b)
{
return Float32(a) <= Float32(b);
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr bool operator>=(const BFloat16 & a, const T & b)
{
return Float32(a) >= b;
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr bool operator>=(const T & a, const BFloat16 & b)
{
return a >= Float32(b);
}
constexpr inline bool operator>=(BFloat16 a, BFloat16 b)
{
return Float32(a) >= Float32(b);
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr inline auto operator+(T a, BFloat16 b)
{
return a + Float32(b);
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr inline auto operator+(BFloat16 a, T b)
{
return Float32(a) + b;
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr inline auto operator-(T a, BFloat16 b)
{
return a - Float32(b);
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr inline auto operator-(BFloat16 a, T b)
{
return Float32(a) - b;
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr inline auto operator*(T a, BFloat16 b)
{
return a * Float32(b);
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr inline auto operator*(BFloat16 a, T b)
{
return Float32(a) * b;
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr inline auto operator/(T a, BFloat16 b)
{
return a / Float32(b);
}
template <typename T>
requires(!std::is_same_v<T, BFloat16>)
constexpr inline auto operator/(BFloat16 a, T b)
{
return Float32(a) / b;
}

View File

@ -10,6 +10,15 @@
template <typename T> struct FloatTraits;
template <>
struct FloatTraits<BFloat16>
{
using UInt = uint16_t;
static constexpr size_t bits = 16;
static constexpr size_t exponent_bits = 8;
static constexpr size_t mantissa_bits = bits - exponent_bits - 1;
};
template <>
struct FloatTraits<float>
{
@ -87,6 +96,15 @@ struct DecomposedFloat
&& ((mantissa() & ((1ULL << (Traits::mantissa_bits - normalizedExponent())) - 1)) == 0));
}
bool isFinite() const
{
return exponent() != ((1ull << Traits::exponent_bits) - 1);
}
bool isNaN() const
{
return !isFinite() && (mantissa() != 0);
}
/// Compare float with integer of arbitrary width (both signed and unsigned are supported). Assuming two's complement arithmetic.
/// This function is generic, big integers (128, 256 bit) are supported as well.
@ -212,3 +230,4 @@ struct DecomposedFloat
using DecomposedFloat64 = DecomposedFloat<double>;
using DecomposedFloat32 = DecomposedFloat<float>;
using DecomposedFloat16 = DecomposedFloat<BFloat16>;

View File

@ -4,7 +4,7 @@
#include <fmt/format.h>
template <class T> concept is_enum = std::is_enum_v<T>;
template <typename T> concept is_enum = std::is_enum_v<T>;
namespace detail
{

View File

@ -9,10 +9,11 @@ namespace DB
{
using TypeListNativeInt = TypeList<UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64>;
using TypeListFloat = TypeList<Float32, Float64>;
using TypeListNativeNumber = TypeListConcat<TypeListNativeInt, TypeListFloat>;
using TypeListNativeFloat = TypeList<Float32, Float64>;
using TypeListNativeNumber = TypeListConcat<TypeListNativeInt, TypeListNativeFloat>;
using TypeListWideInt = TypeList<UInt128, Int128, UInt256, Int256>;
using TypeListInt = TypeListConcat<TypeListNativeInt, TypeListWideInt>;
using TypeListFloat = TypeListConcat<TypeListNativeFloat, TypeList<BFloat16>>;
using TypeListIntAndFloat = TypeListConcat<TypeListInt, TypeListFloat>;
using TypeListDecimal = TypeList<Decimal32, Decimal64, Decimal128, Decimal256>;
using TypeListNumber = TypeListConcat<TypeListIntAndFloat, TypeListDecimal>;

View File

@ -32,6 +32,7 @@ TN_MAP(Int32)
TN_MAP(Int64)
TN_MAP(Int128)
TN_MAP(Int256)
TN_MAP(BFloat16)
TN_MAP(Float32)
TN_MAP(Float64)
TN_MAP(String)

View File

@ -145,6 +145,7 @@
#define TSA_TRY_ACQUIRE_SHARED(...) __attribute__((try_acquire_shared_capability(__VA_ARGS__))) /// function tries to acquire a shared capability and returns a boolean value indicating success or failure
#define TSA_RELEASE_SHARED(...) __attribute__((release_shared_capability(__VA_ARGS__))) /// function releases the given shared capability
#define TSA_SCOPED_LOCKABLE __attribute__((scoped_lockable)) /// object of a class has scoped lockable capability
#define TSA_RETURN_CAPABILITY(...) __attribute__((lock_returned(__VA_ARGS__))) /// to return capabilities in functions
/// Macros for suppressing TSA warnings for specific reads/writes (instead of suppressing it for the whole function)
/// They use a lambda function to apply function attribute to a single statement. This enable us to suppress warnings locally instead of

View File

@ -4,6 +4,8 @@
#include <base/types.h>
#include <base/wide_integer.h>
#include <base/BFloat16.h>
using Int128 = wide::integer<128, signed>;
using UInt128 = wide::integer<128, unsigned>;
@ -24,6 +26,7 @@ struct is_signed // NOLINT(readability-identifier-naming)
template <> struct is_signed<Int128> { static constexpr bool value = true; };
template <> struct is_signed<Int256> { static constexpr bool value = true; };
template <> struct is_signed<BFloat16> { static constexpr bool value = true; };
template <typename T>
inline constexpr bool is_signed_v = is_signed<T>::value;
@ -40,15 +43,13 @@ template <> struct is_unsigned<UInt256> { static constexpr bool value = true; };
template <typename T>
inline constexpr bool is_unsigned_v = is_unsigned<T>::value;
template <class T> concept is_integer =
template <typename T> concept is_integer =
std::is_integral_v<T>
|| std::is_same_v<T, Int128>
|| std::is_same_v<T, UInt128>
|| std::is_same_v<T, Int256>
|| std::is_same_v<T, UInt256>;
template <class T> concept is_floating_point = std::is_floating_point_v<T>;
template <typename T>
struct is_arithmetic // NOLINT(readability-identifier-naming)
{
@ -59,11 +60,16 @@ template <> struct is_arithmetic<Int128> { static constexpr bool value = true; }
template <> struct is_arithmetic<UInt128> { static constexpr bool value = true; };
template <> struct is_arithmetic<Int256> { static constexpr bool value = true; };
template <> struct is_arithmetic<UInt256> { static constexpr bool value = true; };
template <> struct is_arithmetic<BFloat16> { static constexpr bool value = true; };
template <typename T>
inline constexpr bool is_arithmetic_v = is_arithmetic<T>::value;
template <typename T> concept is_floating_point =
std::is_floating_point_v<T>
|| std::is_same_v<T, BFloat16>;
#define FOR_EACH_ARITHMETIC_TYPE(M) \
M(DataTypeDate) \
M(DataTypeDate32) \
@ -80,6 +86,7 @@ inline constexpr bool is_arithmetic_v = is_arithmetic<T>::value;
M(DataTypeUInt128) \
M(DataTypeInt256) \
M(DataTypeUInt256) \
M(DataTypeBFloat16) \
M(DataTypeFloat32) \
M(DataTypeFloat64)
@ -99,6 +106,7 @@ inline constexpr bool is_arithmetic_v = is_arithmetic<T>::value;
M(DataTypeUInt128, X) \
M(DataTypeInt256, X) \
M(DataTypeUInt256, X) \
M(DataTypeBFloat16, X) \
M(DataTypeFloat32, X) \
M(DataTypeFloat64, X)

View File

@ -43,7 +43,7 @@ namespace Net
/// Sets the following default values:
/// - timeout: 60 seconds
/// - keepAlive: true
/// - maxKeepAliveRequests: 0
/// - maxKeepAliveRequests: 100
/// - keepAliveTimeout: 15 seconds
void setServerName(const std::string & serverName);
@ -87,12 +87,12 @@ namespace Net
const Poco::Timespan & getKeepAliveTimeout() const;
/// Returns the connection timeout for HTTP connections.
void setMaxKeepAliveRequests(int maxKeepAliveRequests);
void setMaxKeepAliveRequests(size_t maxKeepAliveRequests);
/// Specifies the maximum number of requests allowed
/// during a persistent connection. 0 means unlimited
/// connections.
int getMaxKeepAliveRequests() const;
size_t getMaxKeepAliveRequests() const;
/// Returns the maximum number of requests allowed
/// during a persistent connection, or 0 if
/// unlimited connections are allowed.
@ -106,7 +106,7 @@ namespace Net
std::string _softwareVersion;
Poco::Timespan _timeout;
bool _keepAlive;
int _maxKeepAliveRequests;
size_t _maxKeepAliveRequests;
Poco::Timespan _keepAliveTimeout;
};
@ -138,7 +138,7 @@ namespace Net
}
inline int HTTPServerParams::getMaxKeepAliveRequests() const
inline size_t HTTPServerParams::getMaxKeepAliveRequests() const
{
return _maxKeepAliveRequests;
}

View File

@ -65,7 +65,7 @@ namespace Net
private:
bool _firstRequest;
Poco::Timespan _keepAliveTimeout;
int _maxKeepAliveRequests;
size_t _maxKeepAliveRequests;
};
@ -74,7 +74,7 @@ namespace Net
//
inline bool HTTPServerSession::canKeepAlive() const
{
return _maxKeepAliveRequests != 0;
return getKeepAlive() && _maxKeepAliveRequests > 0;
}

View File

@ -22,7 +22,7 @@ namespace Net {
HTTPServerParams::HTTPServerParams():
_timeout(60000000),
_keepAlive(true),
_maxKeepAliveRequests(0),
_maxKeepAliveRequests(100),
_keepAliveTimeout(15000000)
{
}
@ -63,7 +63,7 @@ void HTTPServerParams::setKeepAliveTimeout(const Poco::Timespan& timeout)
}
void HTTPServerParams::setMaxKeepAliveRequests(int maxKeepAliveRequests)
void HTTPServerParams::setMaxKeepAliveRequests(size_t maxKeepAliveRequests)
{
poco_assert (maxKeepAliveRequests >= 0);
_maxKeepAliveRequests = maxKeepAliveRequests;

View File

@ -50,7 +50,7 @@ bool HTTPServerSession::hasMoreRequests()
--_maxKeepAliveRequests;
return socket().poll(getTimeout(), Socket::SELECT_READ);
}
else if (_maxKeepAliveRequests != 0 && getKeepAlive())
else if (canKeepAlive())
{
if (_maxKeepAliveRequests > 0)
--_maxKeepAliveRequests;

View File

@ -18,7 +18,6 @@
using Poco::Exception;
using Poco::ErrorHandler;
namespace Poco {
@ -31,9 +30,7 @@ TCPServerConnection::TCPServerConnection(const StreamSocket& socket):
}
TCPServerConnection::~TCPServerConnection()
{
}
TCPServerConnection::~TCPServerConnection() = default;
void TCPServerConnection::start()

View File

@ -0,0 +1,14 @@
ARG FROM_TAG=latest
FROM clickhouse/stateless-test:$FROM_TAG
USER root
RUN apt-get update -y \
&& env DEBIAN_FRONTEND=noninteractive \
apt-get install --yes --no-install-recommends \
nodejs \
npm \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/* \
USER clickhouse

View File

@ -0,0 +1,117 @@
# docker build -t clickhouse/stateless-test .
FROM ubuntu:22.04
# 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
ARG odbc_driver_url="https://github.com/ClickHouse/clickhouse-odbc/releases/download/v1.1.6.20200320/clickhouse-odbc-1.1.6-Linux.tar.gz"
RUN mkdir /etc/clickhouse-server /etc/clickhouse-keeper /etc/clickhouse-client && chmod 777 /etc/clickhouse-* \
&& mkdir -p /var/lib/clickhouse /var/log/clickhouse-server && chmod 777 /var/log/clickhouse-server /var/lib/clickhouse
RUN addgroup --gid 1001 clickhouse && adduser --uid 1001 --gid 1001 --disabled-password clickhouse
# moreutils - provides ts fo FT
# expect, bzip2 - requried by FT
# bsdmainutils - provides hexdump for FT
# golang version 1.13 on Ubuntu 20 is enough for tests
RUN apt-get update -y \
&& env DEBIAN_FRONTEND=noninteractive \
apt-get install --yes --no-install-recommends \
awscli \
brotli \
lz4 \
expect \
moreutils \
bzip2 \
bsdmainutils \
golang \
lsof \
mysql-client=8.0* \
ncdu \
netcat-openbsd \
nodejs \
npm \
odbcinst \
openjdk-11-jre-headless \
openssl \
postgresql-client \
python3 \
python3-pip \
qemu-user-static \
sqlite3 \
sudo \
tree \
unixodbc \
rustc \
cargo \
zstd \
file \
jq \
pv \
zip \
unzip \
p7zip-full \
curl \
wget \
xz-utils \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*
ARG PROTOC_VERSION=25.1
RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip \
&& unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local \
&& rm protoc-${PROTOC_VERSION}-linux-x86_64.zip
COPY requirements.txt /
RUN pip3 install --no-cache-dir -r /requirements.txt
RUN mkdir -p /tmp/clickhouse-odbc-tmp \
&& cd /tmp/clickhouse-odbc-tmp \
&& curl -L ${odbc_driver_url} | tar --strip-components=1 -xz clickhouse-odbc-1.1.6-Linux \
&& mkdir /usr/local/lib64 -p \
&& cp /tmp/clickhouse-odbc-tmp/lib64/*.so /usr/local/lib64/ \
&& odbcinst -i -d -f /tmp/clickhouse-odbc-tmp/share/doc/clickhouse-odbc/config/odbcinst.ini.sample \
&& odbcinst -i -s -l -f /tmp/clickhouse-odbc-tmp/share/doc/clickhouse-odbc/config/odbc.ini.sample \
&& sed -i 's"=libclickhouseodbc"=/usr/local/lib64/libclickhouseodbc"' /etc/odbcinst.ini \
&& rm -rf /tmp/clickhouse-odbc-tmp
ENV TZ=Europe/Amsterdam
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV NUM_TRIES=1
# Unrelated to vars in setup_minio.sh, but should be the same there
# to have the same binaries for local running scenario
ARG MINIO_SERVER_VERSION=2024-08-03T04-33-23Z
ARG MINIO_CLIENT_VERSION=2024-07-31T15-58-33Z
ARG TARGETARCH
# Download Minio-related binaries
RUN arch=${TARGETARCH:-amd64} \
&& curl -L "https://dl.min.io/server/minio/release/linux-${arch}/archive/minio.RELEASE.${MINIO_SERVER_VERSION}" -o /minio \
&& curl -L "https://dl.min.io/client/mc/release/linux-${arch}/archive/mc.RELEASE.${MINIO_CLIENT_VERSION}" -o /mc \
&& chmod +x /mc /minio
ENV MINIO_ROOT_USER="clickhouse"
ENV MINIO_ROOT_PASSWORD="clickhouse"
# for minio to work without root
RUN chmod 777 /home
ENV HOME="/home"
ENV TEMP_DIR="/tmp/praktika"
ENV PATH="/wd/tests:/tmp/praktika/input:$PATH"
RUN curl -L --no-verbose -O 'https://archive.apache.org/dist/hadoop/common/hadoop-3.3.1/hadoop-3.3.1.tar.gz' \
&& tar -xvf hadoop-3.3.1.tar.gz \
&& rm -rf hadoop-3.3.1.tar.gz \
&& chmod 777 /hadoop-3.3.1
RUN npm install -g azurite@3.30.0 \
&& npm install -g tslib && npm install -g node
USER clickhouse

View File

@ -0,0 +1,6 @@
Jinja2==3.1.3
numpy==1.26.4
requests==2.32.3
pandas==1.5.3
scipy==1.12.0
pyarrow==18.0.0

View File

@ -13,11 +13,30 @@ class JobStages(metaclass=MetaClasses.WithIter):
def parse_args():
parser = argparse.ArgumentParser(description="ClickHouse Build Job")
parser.add_argument("BUILD_TYPE", help="Type: <amd|arm_debug|release_sanitizer>")
parser.add_argument("--param", help="Optional custom job start stage", default=None)
parser.add_argument(
"--build-type",
help="Type: <amd|arm>,<debug|release>,<asan|msan|..>",
)
parser.add_argument(
"--param",
help="Optional user-defined job start stage (for local run)",
default=None,
)
return parser.parse_args()
CMAKE_CMD = """cmake --debug-trycompile -DCMAKE_VERBOSE_MAKEFILE=1 -LA \
-DCMAKE_BUILD_TYPE={BUILD_TYPE} \
-DSANITIZE={SANITIZER} \
-DENABLE_CHECK_HEAVY_BUILDS=1 -DENABLE_CLICKHOUSE_SELF_EXTRACTING=1 \
-DENABLE_UTILS=0 -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON \
{AUX_DEFS} \
-DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 \
-DCOMPILER_CACHE={CACHE_TYPE} \
-DENABLE_BUILD_PROFILING=1 {DIR}"""
def main():
args = parse_args()
@ -33,23 +52,41 @@ def main():
stages.pop(0)
stages.insert(0, stage)
cmake_build_type = "Release"
sanitizer = ""
build_type = args.build_type
assert (
build_type
), "build_type must be provided either as input argument or as a parameter of parametrized job in CI"
build_type = build_type.lower()
if "debug" in args.BUILD_TYPE.lower():
CACHE_TYPE = "sccache"
BUILD_TYPE = "RelWithDebInfo"
SANITIZER = ""
AUX_DEFS = " -DENABLE_TESTS=0 "
if "debug" in build_type:
print("Build type set: debug")
cmake_build_type = "Debug"
if "asan" in args.BUILD_TYPE.lower():
BUILD_TYPE = "Debug"
AUX_DEFS = " -DENABLE_TESTS=1 "
elif "release" in build_type:
print("Build type set: release")
AUX_DEFS = (
" -DENABLE_TESTS=0 -DSPLIT_DEBUG_SYMBOLS=ON -DBUILD_STANDALONE_KEEPER=1 "
)
elif "asan" in build_type:
print("Sanitizer set: address")
sanitizer = "address"
SANITIZER = "address"
else:
assert False
# if Environment.is_local_run():
# build_cache_type = "disabled"
# else:
build_cache_type = "sccache"
cmake_cmd = CMAKE_CMD.format(
BUILD_TYPE=BUILD_TYPE,
CACHE_TYPE=CACHE_TYPE,
SANITIZER=SANITIZER,
AUX_DEFS=AUX_DEFS,
DIR=Utils.cwd(),
)
current_directory = Utils.cwd()
build_dir = f"{Settings.TEMP_DIR}/build"
res = True
@ -69,12 +106,7 @@ def main():
results.append(
Result.create_from_command_execution(
name="Cmake configuration",
command=f"cmake --debug-trycompile -DCMAKE_VERBOSE_MAKEFILE=1 -LA -DCMAKE_BUILD_TYPE={cmake_build_type} \
-DSANITIZE={sanitizer} -DENABLE_CHECK_HEAVY_BUILDS=1 -DENABLE_CLICKHOUSE_SELF_EXTRACTING=1 -DENABLE_TESTS=0 \
-DENABLE_UTILS=0 -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON \
-DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCOMPILER_CACHE={build_cache_type} -DENABLE_TESTS=1 \
-DENABLE_BUILD_PROFILING=1 {current_directory}",
command=cmake_cmd,
workdir=build_dir,
with_log=True,
)
@ -95,7 +127,7 @@ def main():
Shell.check(f"ls -l {build_dir}/programs/")
res = results[-1].is_ok()
Result.create_from(results=results, stopwatch=stop_watch).finish_job_accordingly()
Result.create_from(results=results, stopwatch=stop_watch).complete_job()
if __name__ == "__main__":

View File

@ -379,4 +379,4 @@ if __name__ == "__main__":
)
)
Result.create_from(results=results, stopwatch=stop_watch).finish_job_accordingly()
Result.create_from(results=results, stopwatch=stop_watch).complete_job()

View File

@ -1,120 +1,13 @@
import argparse
import threading
from pathlib import Path
from praktika.result import Result
from praktika.settings import Settings
from praktika.utils import MetaClasses, Shell, Utils
from ci.jobs.scripts.clickhouse_proc import ClickHouseProc
from ci.jobs.scripts.functional_tests_results import FTResultsProcessor
class ClickHouseProc:
def __init__(self):
self.ch_config_dir = f"{Settings.TEMP_DIR}/etc/clickhouse-server"
self.pid_file = f"{self.ch_config_dir}/clickhouse-server.pid"
self.config_file = f"{self.ch_config_dir}/config.xml"
self.user_files_path = f"{self.ch_config_dir}/user_files"
self.test_output_file = f"{Settings.OUTPUT_DIR}/test_result.txt"
self.command = f"clickhouse-server --config-file {self.config_file} --pid-file {self.pid_file} -- --path {self.ch_config_dir} --user_files_path {self.user_files_path} --top_level_domains_path {self.ch_config_dir}/top_level_domains --keeper_server.storage_path {self.ch_config_dir}/coordination"
self.proc = None
self.pid = 0
nproc = int(Utils.cpu_count() / 2)
self.fast_test_command = f"clickhouse-test --hung-check --fast-tests-only --no-random-settings --no-random-merge-tree-settings --no-long --testname --shard --zookeeper --check-zookeeper-session --order random --print-time --report-logs-stats --jobs {nproc} -- '' | ts '%Y-%m-%d %H:%M:%S' \
| tee -a \"{self.test_output_file}\""
# TODO: store info in case of failure
self.info = ""
self.info_file = ""
Utils.set_env("CLICKHOUSE_CONFIG_DIR", self.ch_config_dir)
Utils.set_env("CLICKHOUSE_CONFIG", self.config_file)
Utils.set_env("CLICKHOUSE_USER_FILES", self.user_files_path)
Utils.set_env("CLICKHOUSE_SCHEMA_FILES", f"{self.ch_config_dir}/format_schemas")
def start(self):
print("Starting ClickHouse server")
Shell.check(f"rm {self.pid_file}")
def run_clickhouse():
self.proc = Shell.run_async(
self.command, verbose=True, suppress_output=True
)
thread = threading.Thread(target=run_clickhouse)
thread.daemon = True # Allow program to exit even if thread is still running
thread.start()
# self.proc = Shell.run_async(self.command, verbose=True)
started = False
try:
for _ in range(5):
pid = Shell.get_output(f"cat {self.pid_file}").strip()
if not pid:
Utils.sleep(1)
continue
started = True
print(f"Got pid from fs [{pid}]")
_ = int(pid)
break
except Exception:
pass
if not started:
stdout = self.proc.stdout.read().strip() if self.proc.stdout else ""
stderr = self.proc.stderr.read().strip() if self.proc.stderr else ""
Utils.print_formatted_error("Failed to start ClickHouse", stdout, stderr)
return False
print(f"ClickHouse server started successfully, pid [{pid}]")
return True
def wait_ready(self):
res, out, err = 0, "", ""
attempts = 30
delay = 2
for attempt in range(attempts):
res, out, err = Shell.get_res_stdout_stderr(
'clickhouse-client --query "select 1"', verbose=True
)
if out.strip() == "1":
print("Server ready")
break
else:
print(f"Server not ready, wait")
Utils.sleep(delay)
else:
Utils.print_formatted_error(
f"Server not ready after [{attempts*delay}s]", out, err
)
return False
return True
def run_fast_test(self):
if Path(self.test_output_file).exists():
Path(self.test_output_file).unlink()
exit_code = Shell.run(self.fast_test_command)
return exit_code == 0
def terminate(self):
print("Terminate ClickHouse process")
timeout = 10
if self.proc:
Utils.terminate_process_group(self.proc.pid)
self.proc.terminate()
try:
self.proc.wait(timeout=10)
print(f"Process {self.proc.pid} terminated gracefully.")
except Exception:
print(
f"Process {self.proc.pid} did not terminate in {timeout} seconds, killing it..."
)
Utils.terminate_process_group(self.proc.pid, force=True)
self.proc.wait() # Wait for the process to be fully killed
print(f"Process {self.proc} was killed.")
def clone_submodules():
submodules_to_update = [
"contrib/sysroot",
@ -240,7 +133,7 @@ def main():
Shell.check(f"rm -rf {build_dir} && mkdir -p {build_dir}")
results.append(
Result.create_from_command_execution(
name="Checkout Submodules for Minimal Build",
name="Checkout Submodules",
command=clone_submodules,
)
)
@ -295,8 +188,8 @@ def main():
if res and JobStages.CONFIG in stages:
commands = [
f"rm -rf {Settings.TEMP_DIR}/etc/ && mkdir -p {Settings.TEMP_DIR}/etc/clickhouse-client {Settings.TEMP_DIR}/etc/clickhouse-server",
f"cp {current_directory}/programs/server/config.xml {current_directory}/programs/server/users.xml {Settings.TEMP_DIR}/etc/clickhouse-server/",
f"{current_directory}/tests/config/install.sh {Settings.TEMP_DIR}/etc/clickhouse-server {Settings.TEMP_DIR}/etc/clickhouse-client",
f"cp ./programs/server/config.xml ./programs/server/users.xml {Settings.TEMP_DIR}/etc/clickhouse-server/",
f"./tests/config/install.sh {Settings.TEMP_DIR}/etc/clickhouse-server {Settings.TEMP_DIR}/etc/clickhouse-client --fast-test",
# f"cp -a {current_directory}/programs/server/config.d/log_to_console.xml {Settings.TEMP_DIR}/etc/clickhouse-server/config.d/",
f"rm -f {Settings.TEMP_DIR}/etc/clickhouse-server/config.d/secure_ports.xml",
update_path_ch_config,
@ -310,7 +203,7 @@ def main():
)
res = results[-1].is_ok()
CH = ClickHouseProc()
CH = ClickHouseProc(fast_test=True)
if res and JobStages.TEST in stages:
stop_watch_ = Utils.Stopwatch()
step_name = "Start ClickHouse Server"
@ -322,15 +215,17 @@ def main():
)
if res and JobStages.TEST in stages:
stop_watch_ = Utils.Stopwatch()
step_name = "Tests"
print(step_name)
res = res and CH.run_fast_test()
if res:
results.append(FTResultsProcessor(wd=Settings.OUTPUT_DIR).run())
results[-1].set_timing(stopwatch=stop_watch_)
CH.terminate()
Result.create_from(results=results, stopwatch=stop_watch).finish_job_accordingly()
Result.create_from(results=results, stopwatch=stop_watch).complete_job()
if __name__ == "__main__":

View File

@ -0,0 +1,171 @@
import argparse
import os
import time
from pathlib import Path
from praktika.result import Result
from praktika.settings import Settings
from praktika.utils import MetaClasses, Shell, Utils
from ci.jobs.scripts.clickhouse_proc import ClickHouseProc
from ci.jobs.scripts.functional_tests_results import FTResultsProcessor
class JobStages(metaclass=MetaClasses.WithIter):
INSTALL_CLICKHOUSE = "install"
START = "start"
TEST = "test"
def parse_args():
parser = argparse.ArgumentParser(description="ClickHouse Build Job")
parser.add_argument(
"--ch-path", help="Path to clickhouse binary", default=f"{Settings.INPUT_DIR}"
)
parser.add_argument(
"--test-options",
help="Comma separated option(s): parallel|non-parallel|BATCH_NUM/BTATCH_TOT|..",
default="",
)
parser.add_argument("--param", help="Optional job start stage", default=None)
parser.add_argument("--test", help="Optional test name pattern", default="")
return parser.parse_args()
def run_test(
no_parallel: bool, no_sequiential: bool, batch_num: int, batch_total: int, test=""
):
test_output_file = f"{Settings.OUTPUT_DIR}/test_result.txt"
test_command = f"clickhouse-test --jobs 2 --testname --shard --zookeeper --check-zookeeper-session --no-stateless \
--hung-check --print-time \
--capture-client-stacktrace --queries ./tests/queries -- '{test}' \
| ts '%Y-%m-%d %H:%M:%S' | tee -a \"{test_output_file}\""
if Path(test_output_file).exists():
Path(test_output_file).unlink()
Shell.run(test_command, verbose=True)
def main():
args = parse_args()
test_options = args.test_options.split(",")
no_parallel = "non-parallel" in test_options
no_sequential = "parallel" in test_options
batch_num, total_batches = 0, 0
for to in test_options:
if "/" in to:
batch_num, total_batches = map(int, to.split("/"))
# os.environ["AZURE_CONNECTION_STRING"] = Shell.get_output(
# f"aws ssm get-parameter --region us-east-1 --name azure_connection_string --with-decryption --output text --query Parameter.Value",
# verbose=True,
# strict=True
# )
ch_path = args.ch_path
assert Path(
ch_path + "/clickhouse"
).is_file(), f"clickhouse binary not found under [{ch_path}]"
stop_watch = Utils.Stopwatch()
stages = list(JobStages)
logs_to_attach = []
stage = args.param or JobStages.INSTALL_CLICKHOUSE
if stage:
assert stage in JobStages, f"--param must be one of [{list(JobStages)}]"
print(f"Job will start from stage [{stage}]")
while stage in stages:
stages.pop(0)
stages.insert(0, stage)
res = True
results = []
Utils.add_to_PATH(f"{ch_path}:tests")
if res and JobStages.INSTALL_CLICKHOUSE in stages:
commands = [
f"rm -rf /tmp/praktika/var/log/clickhouse-server/clickhouse-server.*",
f"chmod +x {ch_path}/clickhouse",
f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-server",
f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-client",
f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-compressor",
f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-local",
f"rm -rf {Settings.TEMP_DIR}/etc/ && mkdir -p {Settings.TEMP_DIR}/etc/clickhouse-client {Settings.TEMP_DIR}/etc/clickhouse-server",
f"cp programs/server/config.xml programs/server/users.xml {Settings.TEMP_DIR}/etc/clickhouse-server/",
# TODO: find a way to work with Azure secret so it's ok for local tests as well, for now keep azure disabled
f"./tests/config/install.sh {Settings.TEMP_DIR}/etc/clickhouse-server {Settings.TEMP_DIR}/etc/clickhouse-client --s3-storage --no-azure",
# clickhouse benchmark segfaults with --config-path, so provide client config by its default location
f"cp {Settings.TEMP_DIR}/etc/clickhouse-client/* /etc/clickhouse-client/",
# update_path_ch_config,
# f"sed -i 's|>/var/|>{Settings.TEMP_DIR}/var/|g; s|>/etc/|>{Settings.TEMP_DIR}/etc/|g' {Settings.TEMP_DIR}/etc/clickhouse-server/config.xml",
# f"sed -i 's|>/etc/|>{Settings.TEMP_DIR}/etc/|g' {Settings.TEMP_DIR}/etc/clickhouse-server/config.d/ssl_certs.xml",
f"for file in /tmp/praktika/etc/clickhouse-server/config.d/*.xml; do [ -f $file ] && echo Change config $file && sed -i 's|>/var/log|>{Settings.TEMP_DIR}/var/log|g; s|>/etc/|>{Settings.TEMP_DIR}/etc/|g' $(readlink -f $file); done",
f"for file in /tmp/praktika/etc/clickhouse-server/*.xml; do [ -f $file ] && echo Change config $file && sed -i 's|>/var/log|>{Settings.TEMP_DIR}/var/log|g; s|>/etc/|>{Settings.TEMP_DIR}/etc/|g' $(readlink -f $file); done",
f"for file in /tmp/praktika/etc/clickhouse-server/config.d/*.xml; do [ -f $file ] && echo Change config $file && sed -i 's|<path>local_disk|<path>{Settings.TEMP_DIR}/local_disk|g' $(readlink -f $file); done",
f"clickhouse-server --version",
]
results.append(
Result.create_from_command_execution(
name="Install ClickHouse", command=commands, with_log=True
)
)
res = results[-1].is_ok()
CH = ClickHouseProc()
if res and JobStages.START in stages:
stop_watch_ = Utils.Stopwatch()
step_name = "Start ClickHouse Server"
print(step_name)
minio_log = "/tmp/praktika/output/minio.log"
res = res and CH.start_minio(test_type="stateful", log_file_path=minio_log)
logs_to_attach += [minio_log]
time.sleep(10)
Shell.check("ps -ef | grep minio", verbose=True)
res = res and Shell.check(
"aws s3 ls s3://test --endpoint-url http://localhost:11111/", verbose=True
)
res = res and CH.start()
res = res and CH.wait_ready()
if res:
print("ch started")
logs_to_attach += [
"/tmp/praktika/var/log/clickhouse-server/clickhouse-server.log",
"/tmp/praktika/var/log/clickhouse-server/clickhouse-server.err.log",
]
results.append(
Result.create_from(
name=step_name,
status=res,
stopwatch=stop_watch_,
)
)
res = results[-1].is_ok()
if res and JobStages.TEST in stages:
stop_watch_ = Utils.Stopwatch()
step_name = "Tests"
print(step_name)
# assert Shell.check("clickhouse-client -q \"insert into system.zookeeper (name, path, value) values ('auxiliary_zookeeper2', '/test/chroot/', '')\"", verbose=True)
run_test(
no_parallel=no_parallel,
no_sequiential=no_sequential,
batch_num=batch_num,
batch_total=total_batches,
test=args.test,
)
results.append(FTResultsProcessor(wd=Settings.OUTPUT_DIR).run())
results[-1].set_timing(stopwatch=stop_watch_)
res = results[-1].is_ok()
Result.create_from(
results=results, stopwatch=stop_watch, files=logs_to_attach if not res else []
).complete_job()
if __name__ == "__main__":
main()

View File

@ -0,0 +1,183 @@
import argparse
import os
import time
from pathlib import Path
from praktika.result import Result
from praktika.settings import Settings
from praktika.utils import MetaClasses, Shell, Utils
from ci.jobs.scripts.clickhouse_proc import ClickHouseProc
from ci.jobs.scripts.functional_tests_results import FTResultsProcessor
class JobStages(metaclass=MetaClasses.WithIter):
INSTALL_CLICKHOUSE = "install"
START = "start"
TEST = "test"
def parse_args():
parser = argparse.ArgumentParser(description="ClickHouse Build Job")
parser.add_argument(
"--ch-path", help="Path to clickhouse binary", default=f"{Settings.INPUT_DIR}"
)
parser.add_argument(
"--test-options",
help="Comma separated option(s): parallel|non-parallel|BATCH_NUM/BTATCH_TOT|..",
default="",
)
parser.add_argument("--param", help="Optional job start stage", default=None)
parser.add_argument("--test", help="Optional test name pattern", default="")
return parser.parse_args()
def run_stateless_test(
no_parallel: bool, no_sequiential: bool, batch_num: int, batch_total: int, test=""
):
assert not (no_parallel and no_sequiential)
test_output_file = f"{Settings.OUTPUT_DIR}/test_result.txt"
aux = ""
nproc = int(Utils.cpu_count() / 2)
if batch_num and batch_total:
aux = f"--run-by-hash-total {batch_total} --run-by-hash-num {batch_num-1}"
statless_test_command = f"clickhouse-test --testname --shard --zookeeper --check-zookeeper-session --hung-check --print-time \
--no-drop-if-fail --capture-client-stacktrace --queries /repo/tests/queries --test-runs 1 --hung-check \
{'--no-parallel' if no_parallel else ''} {'--no-sequential' if no_sequiential else ''} \
--print-time --jobs {nproc} --report-coverage --report-logs-stats {aux} \
--queries ./tests/queries -- '{test}' | ts '%Y-%m-%d %H:%M:%S' \
| tee -a \"{test_output_file}\""
if Path(test_output_file).exists():
Path(test_output_file).unlink()
Shell.run(statless_test_command, verbose=True)
def main():
args = parse_args()
test_options = args.test_options.split(",")
no_parallel = "non-parallel" in test_options
no_sequential = "parallel" in test_options
batch_num, total_batches = 0, 0
for to in test_options:
if "/" in to:
batch_num, total_batches = map(int, to.split("/"))
# os.environ["AZURE_CONNECTION_STRING"] = Shell.get_output(
# f"aws ssm get-parameter --region us-east-1 --name azure_connection_string --with-decryption --output text --query Parameter.Value",
# verbose=True,
# strict=True
# )
ch_path = args.ch_path
assert Path(
ch_path + "/clickhouse"
).is_file(), f"clickhouse binary not found under [{ch_path}]"
stop_watch = Utils.Stopwatch()
stages = list(JobStages)
logs_to_attach = []
stage = args.param or JobStages.INSTALL_CLICKHOUSE
if stage:
assert stage in JobStages, f"--param must be one of [{list(JobStages)}]"
print(f"Job will start from stage [{stage}]")
while stage in stages:
stages.pop(0)
stages.insert(0, stage)
res = True
results = []
Utils.add_to_PATH(f"{ch_path}:tests")
if res and JobStages.INSTALL_CLICKHOUSE in stages:
commands = [
f"rm -rf /tmp/praktika/var/log/clickhouse-server/clickhouse-server.*",
f"chmod +x {ch_path}/clickhouse",
f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-server",
f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-client",
f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-compressor",
f"ln -sf {ch_path}/clickhouse {ch_path}/clickhouse-local",
f"rm -rf {Settings.TEMP_DIR}/etc/ && mkdir -p {Settings.TEMP_DIR}/etc/clickhouse-client {Settings.TEMP_DIR}/etc/clickhouse-server",
f"cp programs/server/config.xml programs/server/users.xml {Settings.TEMP_DIR}/etc/clickhouse-server/",
# TODO: find a way to work with Azure secret so it's ok for local tests as well, for now keep azure disabled
f"./tests/config/install.sh {Settings.TEMP_DIR}/etc/clickhouse-server {Settings.TEMP_DIR}/etc/clickhouse-client --s3-storage --no-azure",
# clickhouse benchmark segfaults with --config-path, so provide client config by its default location
f"cp {Settings.TEMP_DIR}/etc/clickhouse-client/* /etc/clickhouse-client/",
# update_path_ch_config,
# f"sed -i 's|>/var/|>{Settings.TEMP_DIR}/var/|g; s|>/etc/|>{Settings.TEMP_DIR}/etc/|g' {Settings.TEMP_DIR}/etc/clickhouse-server/config.xml",
# f"sed -i 's|>/etc/|>{Settings.TEMP_DIR}/etc/|g' {Settings.TEMP_DIR}/etc/clickhouse-server/config.d/ssl_certs.xml",
f"for file in /tmp/praktika/etc/clickhouse-server/config.d/*.xml; do [ -f $file ] && echo Change config $file && sed -i 's|>/var/log|>{Settings.TEMP_DIR}/var/log|g; s|>/etc/|>{Settings.TEMP_DIR}/etc/|g' $(readlink -f $file); done",
f"for file in /tmp/praktika/etc/clickhouse-server/*.xml; do [ -f $file ] && echo Change config $file && sed -i 's|>/var/log|>{Settings.TEMP_DIR}/var/log|g; s|>/etc/|>{Settings.TEMP_DIR}/etc/|g' $(readlink -f $file); done",
f"for file in /tmp/praktika/etc/clickhouse-server/config.d/*.xml; do [ -f $file ] && echo Change config $file && sed -i 's|<path>local_disk|<path>{Settings.TEMP_DIR}/local_disk|g' $(readlink -f $file); done",
f"clickhouse-server --version",
]
results.append(
Result.create_from_command_execution(
name="Install ClickHouse", command=commands, with_log=True
)
)
res = results[-1].is_ok()
CH = ClickHouseProc()
if res and JobStages.START in stages:
stop_watch_ = Utils.Stopwatch()
step_name = "Start ClickHouse Server"
print(step_name)
hdfs_log = "/tmp/praktika/output/hdfs_mini.log"
minio_log = "/tmp/praktika/output/minio.log"
res = res and CH.start_hdfs(log_file_path=hdfs_log)
res = res and CH.start_minio(test_type="stateful", log_file_path=minio_log)
logs_to_attach += [minio_log, hdfs_log]
time.sleep(10)
Shell.check("ps -ef | grep minio", verbose=True)
Shell.check("ps -ef | grep hdfs", verbose=True)
res = res and Shell.check(
"aws s3 ls s3://test --endpoint-url http://localhost:11111/", verbose=True
)
res = res and CH.start()
res = res and CH.wait_ready()
if res:
print("ch started")
logs_to_attach += [
"/tmp/praktika/var/log/clickhouse-server/clickhouse-server.log",
"/tmp/praktika/var/log/clickhouse-server/clickhouse-server.err.log",
]
results.append(
Result.create_from(
name=step_name,
status=res,
stopwatch=stop_watch_,
)
)
res = results[-1].is_ok()
if res and JobStages.TEST in stages:
stop_watch_ = Utils.Stopwatch()
step_name = "Tests"
print(step_name)
assert Shell.check(
"clickhouse-client -q \"insert into system.zookeeper (name, path, value) values ('auxiliary_zookeeper2', '/test/chroot/', '')\"",
verbose=True,
)
run_stateless_test(
no_parallel=no_parallel,
no_sequiential=no_sequential,
batch_num=batch_num,
batch_total=total_batches,
test=args.test,
)
results.append(FTResultsProcessor(wd=Settings.OUTPUT_DIR).run())
results[-1].set_timing(stopwatch=stop_watch_)
res = results[-1].is_ok()
Result.create_from(
results=results, stopwatch=stop_watch, files=logs_to_attach if not res else []
).complete_job()
if __name__ == "__main__":
main()

View File

View File

@ -3131,3 +3131,4 @@ DistributedCachePoolBehaviourOnLimit
SharedJoin
ShareSet
unacked
BFloat

View File

@ -0,0 +1,142 @@
import subprocess
from pathlib import Path
from praktika.settings import Settings
from praktika.utils import Shell, Utils
class ClickHouseProc:
BACKUPS_XML = """
<clickhouse>
<backups>
<type>local</type>
<path>{CH_RUNTIME_DIR}/var/lib/clickhouse/disks/backups/</path>
</backups>
</clickhouse>
"""
def __init__(self, fast_test=False):
self.ch_config_dir = f"{Settings.TEMP_DIR}/etc/clickhouse-server"
self.pid_file = f"{self.ch_config_dir}/clickhouse-server.pid"
self.config_file = f"{self.ch_config_dir}/config.xml"
self.user_files_path = f"{self.ch_config_dir}/user_files"
self.test_output_file = f"{Settings.OUTPUT_DIR}/test_result.txt"
self.command = f"clickhouse-server --config-file {self.config_file} --pid-file {self.pid_file} -- --path {self.ch_config_dir} --user_files_path {self.user_files_path} --top_level_domains_path {self.ch_config_dir}/top_level_domains --keeper_server.storage_path {self.ch_config_dir}/coordination"
self.proc = None
self.pid = 0
nproc = int(Utils.cpu_count() / 2)
self.fast_test_command = f"clickhouse-test --hung-check --fast-tests-only --no-random-settings --no-random-merge-tree-settings --no-long --testname --shard --zookeeper --check-zookeeper-session --order random --print-time --report-logs-stats --jobs {nproc} -- '' | ts '%Y-%m-%d %H:%M:%S' \
| tee -a \"{self.test_output_file}\""
# TODO: store info in case of failure
self.info = ""
self.info_file = ""
Utils.set_env("CLICKHOUSE_CONFIG_DIR", self.ch_config_dir)
Utils.set_env("CLICKHOUSE_CONFIG", self.config_file)
Utils.set_env("CLICKHOUSE_USER_FILES", self.user_files_path)
# Utils.set_env("CLICKHOUSE_SCHEMA_FILES", f"{self.ch_config_dir}/format_schemas")
# if not fast_test:
# with open(f"{self.ch_config_dir}/config.d/backups.xml", "w") as file:
# file.write(self.BACKUPS_XML)
self.minio_proc = None
def start_hdfs(self, log_file_path):
command = ["./ci/jobs/scripts/functional_tests/setup_hdfs_minicluster.sh"]
with open(log_file_path, "w") as log_file:
process = subprocess.Popen(
command, stdout=log_file, stderr=subprocess.STDOUT
)
print(
f"Started setup_hdfs_minicluster.sh asynchronously with PID {process.pid}"
)
return True
def start_minio(self, test_type, log_file_path):
command = [
"./ci/jobs/scripts/functional_tests/setup_minio.sh",
test_type,
"./tests",
]
with open(log_file_path, "w") as log_file:
process = subprocess.Popen(
command, stdout=log_file, stderr=subprocess.STDOUT
)
print(f"Started setup_minio.sh asynchronously with PID {process.pid}")
return True
def start(self):
print("Starting ClickHouse server")
Shell.check(f"rm {self.pid_file}")
self.proc = subprocess.Popen(self.command, stderr=subprocess.STDOUT, shell=True)
started = False
try:
for _ in range(5):
pid = Shell.get_output(f"cat {self.pid_file}").strip()
if not pid:
Utils.sleep(1)
continue
started = True
print(f"Got pid from fs [{pid}]")
_ = int(pid)
break
except Exception:
pass
if not started:
stdout = self.proc.stdout.read().strip() if self.proc.stdout else ""
stderr = self.proc.stderr.read().strip() if self.proc.stderr else ""
Utils.print_formatted_error("Failed to start ClickHouse", stdout, stderr)
return False
print(f"ClickHouse server started successfully, pid [{pid}]")
return True
def wait_ready(self):
res, out, err = 0, "", ""
attempts = 30
delay = 2
for attempt in range(attempts):
res, out, err = Shell.get_res_stdout_stderr(
'clickhouse-client --query "select 1"', verbose=True
)
if out.strip() == "1":
print("Server ready")
break
else:
print(f"Server not ready, wait")
Utils.sleep(delay)
else:
Utils.print_formatted_error(
f"Server not ready after [{attempts*delay}s]", out, err
)
return False
return True
def run_fast_test(self):
if Path(self.test_output_file).exists():
Path(self.test_output_file).unlink()
exit_code = Shell.run(self.fast_test_command)
return exit_code == 0
def terminate(self):
print("Terminate ClickHouse process")
timeout = 10
if self.proc:
Utils.terminate_process_group(self.proc.pid)
self.proc.terminate()
try:
self.proc.wait(timeout=10)
print(f"Process {self.proc.pid} terminated gracefully.")
except Exception:
print(
f"Process {self.proc.pid} did not terminate in {timeout} seconds, killing it..."
)
Utils.terminate_process_group(self.proc.pid, force=True)
self.proc.wait() # Wait for the process to be fully killed
print(f"Process {self.proc} was killed.")
if self.minio_proc:
Utils.terminate_process_group(self.minio_proc.pid)

View File

@ -0,0 +1,19 @@
#!/bin/bash
# shellcheck disable=SC2024
set -e -x -a -u
ls -lha
cd /hadoop-3.3.1
export JAVA_HOME=/usr
mkdir -p target/test/data
bin/mapred minicluster -format -nomr -nnport 12222 &
while ! nc -z localhost 12222; do
sleep 1
done
lsof -i :12222

View File

@ -0,0 +1,162 @@
#!/bin/bash
set -euxf -o pipefail
export MINIO_ROOT_USER=${MINIO_ROOT_USER:-clickhouse}
export MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-clickhouse}
TEST_DIR=${2:-/repo/tests/}
if [ -d "$TEMP_DIR" ]; then
TEST_DIR=$(readlink -f $TEST_DIR)
cd "$TEMP_DIR"
# add / for minio mc in docker
PATH="/:.:$PATH"
fi
usage() {
echo $"Usage: $0 <stateful|stateless> <test_path> (default path: /usr/share/clickhouse-test)"
exit 1
}
check_arg() {
local query_dir
if [ ! $# -eq 1 ]; then
if [ ! $# -eq 2 ]; then
echo "ERROR: need either one or two arguments, <stateful|stateless> <test_path> (default path: /usr/share/clickhouse-test)"
usage
fi
fi
case "$1" in
stateless)
query_dir="0_stateless"
;;
stateful)
query_dir="1_stateful"
;;
*)
echo "unknown test type ${test_type}"
usage
;;
esac
echo ${query_dir}
}
find_arch() {
local arch
case $(uname -m) in
x86_64)
arch="amd64"
;;
aarch64)
arch="arm64"
;;
*)
echo "unknown architecture $(uname -m)";
exit 1
;;
esac
echo ${arch}
}
find_os() {
local os
os=$(uname -s | tr '[:upper:]' '[:lower:]')
echo "${os}"
}
download_minio() {
local os
local arch
local minio_server_version=${MINIO_SERVER_VERSION:-2024-08-03T04-33-23Z}
local minio_client_version=${MINIO_CLIENT_VERSION:-2024-07-31T15-58-33Z}
os=$(find_os)
arch=$(find_arch)
wget "https://dl.min.io/server/minio/release/${os}-${arch}/archive/minio.RELEASE.${minio_server_version}" -O ./minio
wget "https://dl.min.io/client/mc/release/${os}-${arch}/archive/mc.RELEASE.${minio_client_version}" -O ./mc
chmod +x ./mc ./minio
}
start_minio() {
pwd
mkdir -p ./minio_data
minio --version
nohup minio server --address ":11111" ./minio_data &
wait_for_it
lsof -i :11111
sleep 5
}
setup_minio() {
local test_type=$1
echo "setup_minio(), test_type=$test_type"
mc alias set clickminio http://localhost:11111 clickhouse clickhouse
mc admin user add clickminio test testtest
mc admin policy attach clickminio readwrite --user=test ||:
mc mb --ignore-existing clickminio/test
if [ "$test_type" = "stateless" ]; then
echo "Create @test bucket in minio"
mc anonymous set public clickminio/test
fi
}
# uploads data to minio, by default after unpacking all tests
# will be in /usr/share/clickhouse-test/queries
upload_data() {
local query_dir=$1
local test_path=$2
local data_path=${test_path}/queries/${query_dir}/data_minio
echo "upload_data() data_path=$data_path"
# iterating over globs will cause redundant file variable to be
# a path to a file, not a filename
# shellcheck disable=SC2045
if [ -d "${data_path}" ]; then
mc cp --recursive "${data_path}"/ clickminio/test/
fi
}
setup_aws_credentials() {
local minio_root_user=${MINIO_ROOT_USER:-clickhouse}
local minio_root_password=${MINIO_ROOT_PASSWORD:-clickhouse}
mkdir -p ~/.aws
cat <<EOT >> ~/.aws/credentials
[default]
aws_access_key_id=${minio_root_user}
aws_secret_access_key=${minio_root_password}
EOT
}
wait_for_it() {
local counter=0
local max_counter=60
local url="http://localhost:11111"
local params=(
--silent
--verbose
)
while ! curl "${params[@]}" "${url}" 2>&1 | grep AccessDenied
do
if [[ ${counter} == "${max_counter}" ]]; then
echo "failed to setup minio"
exit 0
fi
echo "trying to connect to minio"
sleep 1
counter=$((counter + 1))
done
}
main() {
local query_dir
query_dir=$(check_arg "$@")
if ! (minio --version && mc --version); then
download_minio
fi
start_minio
setup_minio "$1"
upload_data "${query_dir}" "$TEST_DIR"
setup_aws_credentials
}
main "$@"

View File

@ -1,7 +1,6 @@
import dataclasses
from typing import List
from praktika.environment import Environment
from praktika.result import Result
OK_SIGN = "[ OK "
@ -233,6 +232,8 @@ class FTResultsProcessor:
else:
pass
info = f"Total: {s.total - s.skipped}, Failed: {s.failed}"
# TODO: !!!
# def test_result_comparator(item):
# # sort by status then by check name
@ -250,10 +251,11 @@ class FTResultsProcessor:
# test_results.sort(key=test_result_comparator)
return Result.create_from(
name=Environment.JOB_NAME,
name="Tests",
results=test_results,
status=state,
files=[self.tests_output_file],
info=info,
with_info_from_results=False,
)

View File

@ -37,6 +37,30 @@ def create_parser():
type=str,
default=None,
)
run_parser.add_argument(
"--test",
help="Custom parameter to pass into a job script, it's up to job script how to use it, for local test",
type=str,
default="",
)
run_parser.add_argument(
"--pr",
help="PR number. Optional parameter for local run. Set if you want an required artifact to be uploaded from CI run in that PR",
type=int,
default=None,
)
run_parser.add_argument(
"--sha",
help="Commit sha. Optional parameter for local run. Set if you want an required artifact to be uploaded from CI run on that sha, head sha will be used if not set",
type=str,
default=None,
)
run_parser.add_argument(
"--branch",
help="Commit sha. Optional parameter for local run. Set if you want an required artifact to be uploaded from CI run on that branch, main branch name will be used if not set",
type=str,
default=None,
)
run_parser.add_argument(
"--ci",
help="When not set - dummy env will be generated, for local test",
@ -85,9 +109,13 @@ if __name__ == "__main__":
workflow=workflow,
job=job,
docker=args.docker,
dummy_env=not args.ci,
local_run=not args.ci,
no_docker=args.no_docker,
param=args.param,
test=args.test,
pr=args.pr,
branch=args.branch,
sha=args.sha,
)
else:
parser.print_help()

View File

@ -6,7 +6,7 @@ from types import SimpleNamespace
from typing import Any, Dict, List, Type
from praktika import Workflow
from praktika._settings import _Settings
from praktika.settings import Settings
from praktika.utils import MetaClasses, T
@ -30,13 +30,12 @@ class _Environment(MetaClasses.Serializable):
INSTANCE_ID: str
INSTANCE_LIFE_CYCLE: str
LOCAL_RUN: bool = False
PARAMETER: Any = None
REPORT_INFO: List[str] = dataclasses.field(default_factory=list)
name = "environment"
@classmethod
def file_name_static(cls, _name=""):
return f"{_Settings.TEMP_DIR}/{cls.name}.json"
return f"{Settings.TEMP_DIR}/{cls.name}.json"
@classmethod
def from_dict(cls: Type[T], obj: Dict[str, Any]) -> T:
@ -67,12 +66,12 @@ class _Environment(MetaClasses.Serializable):
@staticmethod
def get_needs_statuses():
if Path(_Settings.WORKFLOW_STATUS_FILE).is_file():
with open(_Settings.WORKFLOW_STATUS_FILE, "r", encoding="utf8") as f:
if Path(Settings.WORKFLOW_STATUS_FILE).is_file():
with open(Settings.WORKFLOW_STATUS_FILE, "r", encoding="utf8") as f:
return json.load(f)
else:
print(
f"ERROR: Status file [{_Settings.WORKFLOW_STATUS_FILE}] does not exist"
f"ERROR: Status file [{Settings.WORKFLOW_STATUS_FILE}] does not exist"
)
raise RuntimeError()
@ -159,7 +158,8 @@ class _Environment(MetaClasses.Serializable):
@classmethod
def get_s3_prefix_static(cls, pr_number, branch, sha, latest=False):
prefix = ""
if pr_number > 0:
assert sha or latest
if pr_number and pr_number > 0:
prefix += f"{pr_number}"
else:
prefix += f"{branch}"
@ -171,18 +171,15 @@ class _Environment(MetaClasses.Serializable):
# TODO: find a better place for the function. This file should not import praktika.settings
# as it's requires reading users config, that's why imports nested inside the function
def get_report_url(self):
def get_report_url(self, settings, latest=False):
import urllib
from praktika.settings import Settings
from praktika.utils import Utils
path = Settings.HTML_S3_PATH
for bucket, endpoint in Settings.S3_BUCKET_TO_HTTP_ENDPOINT.items():
path = settings.HTML_S3_PATH
for bucket, endpoint in settings.S3_BUCKET_TO_HTTP_ENDPOINT.items():
if bucket in path:
path = path.replace(bucket, endpoint)
break
REPORT_URL = f"https://{path}/{Path(Settings.HTML_PAGE_FILE).name}?PR={self.PR_NUMBER}&sha={self.SHA}&name_0={urllib.parse.quote(self.WORKFLOW_NAME, safe='')}&name_1={urllib.parse.quote(self.JOB_NAME, safe='')}"
REPORT_URL = f"https://{path}/{Path(settings.HTML_PAGE_FILE).name}?PR={self.PR_NUMBER}&sha={'latest' if latest else self.SHA}&name_0={urllib.parse.quote(self.WORKFLOW_NAME, safe='')}&name_1={urllib.parse.quote(self.JOB_NAME, safe='')}"
return REPORT_URL
def is_local_run(self):

View File

@ -1,124 +0,0 @@
import dataclasses
from pathlib import Path
from typing import Dict, Iterable, List, Optional
@dataclasses.dataclass
class _Settings:
######################################
# Pipeline generation settings #
######################################
CI_PATH = "./ci"
WORKFLOW_PATH_PREFIX: str = "./.github/workflows"
WORKFLOWS_DIRECTORY: str = f"{CI_PATH}/workflows"
SETTINGS_DIRECTORY: str = f"{CI_PATH}/settings"
CI_CONFIG_JOB_NAME = "Config Workflow"
DOCKER_BUILD_JOB_NAME = "Docker Builds"
FINISH_WORKFLOW_JOB_NAME = "Finish Workflow"
READY_FOR_MERGE_STATUS_NAME = "Ready for Merge"
CI_CONFIG_RUNS_ON: Optional[List[str]] = None
DOCKER_BUILD_RUNS_ON: Optional[List[str]] = None
VALIDATE_FILE_PATHS: bool = True
######################################
# Runtime Settings #
######################################
MAX_RETRIES_S3 = 3
MAX_RETRIES_GH = 3
######################################
# S3 (artifact storage) settings #
######################################
S3_ARTIFACT_PATH: str = ""
######################################
# CI workspace settings #
######################################
TEMP_DIR: str = "/tmp/praktika"
OUTPUT_DIR: str = f"{TEMP_DIR}/output"
INPUT_DIR: str = f"{TEMP_DIR}/input"
PYTHON_INTERPRETER: str = "python3"
PYTHON_PACKET_MANAGER: str = "pip3"
PYTHON_VERSION: str = "3.9"
INSTALL_PYTHON_FOR_NATIVE_JOBS: bool = False
INSTALL_PYTHON_REQS_FOR_NATIVE_JOBS: str = "./ci/requirements.txt"
ENVIRONMENT_VAR_FILE: str = f"{TEMP_DIR}/environment.json"
RUN_LOG: str = f"{TEMP_DIR}/praktika_run.log"
SECRET_GH_APP_ID: str = "GH_APP_ID"
SECRET_GH_APP_PEM_KEY: str = "GH_APP_PEM_KEY"
ENV_SETUP_SCRIPT: str = "/tmp/praktika_setup_env.sh"
WORKFLOW_STATUS_FILE: str = f"{TEMP_DIR}/workflow_status.json"
######################################
# CI Cache settings #
######################################
CACHE_VERSION: int = 1
CACHE_DIGEST_LEN: int = 20
CACHE_S3_PATH: str = ""
CACHE_LOCAL_PATH: str = f"{TEMP_DIR}/ci_cache"
######################################
# Report settings #
######################################
HTML_S3_PATH: str = ""
HTML_PAGE_FILE: str = "./praktika/json.html"
TEXT_CONTENT_EXTENSIONS: Iterable[str] = frozenset([".txt", ".log"])
S3_BUCKET_TO_HTTP_ENDPOINT: Optional[Dict[str, str]] = None
DOCKERHUB_USERNAME: str = ""
DOCKERHUB_SECRET: str = ""
DOCKER_WD: str = "/wd"
######################################
# CI DB Settings #
######################################
SECRET_CI_DB_URL: str = "CI_DB_URL"
SECRET_CI_DB_PASSWORD: str = "CI_DB_PASSWORD"
CI_DB_DB_NAME = ""
CI_DB_TABLE_NAME = ""
CI_DB_INSERT_TIMEOUT_SEC = 5
_USER_DEFINED_SETTINGS = [
"S3_ARTIFACT_PATH",
"CACHE_S3_PATH",
"HTML_S3_PATH",
"S3_BUCKET_TO_HTTP_ENDPOINT",
"TEXT_CONTENT_EXTENSIONS",
"TEMP_DIR",
"OUTPUT_DIR",
"INPUT_DIR",
"CI_CONFIG_RUNS_ON",
"DOCKER_BUILD_RUNS_ON",
"CI_CONFIG_JOB_NAME",
"PYTHON_INTERPRETER",
"PYTHON_VERSION",
"PYTHON_PACKET_MANAGER",
"INSTALL_PYTHON_FOR_NATIVE_JOBS",
"INSTALL_PYTHON_REQS_FOR_NATIVE_JOBS",
"MAX_RETRIES_S3",
"MAX_RETRIES_GH",
"VALIDATE_FILE_PATHS",
"DOCKERHUB_USERNAME",
"DOCKERHUB_SECRET",
"READY_FOR_MERGE_STATUS_NAME",
"SECRET_CI_DB_URL",
"SECRET_CI_DB_PASSWORD",
"CI_DB_DB_NAME",
"CI_DB_TABLE_NAME",
"CI_DB_INSERT_TIMEOUT_SEC",
"SECRET_GH_APP_PEM_KEY",
"SECRET_GH_APP_ID",
]
class GHRunners:
ubuntu = "ubuntu-latest"
if __name__ == "__main__":
for setting in _USER_DEFINED_SETTINGS:
print(_Settings().__getattribute__(setting))
# print(dataclasses.asdict(_Settings()))

View File

@ -52,7 +52,7 @@ class CIDB:
check_status=result.status,
check_duration_ms=int(result.duration * 1000),
check_start_time=Utils.timestamp_to_str(result.start_time),
report_url=env.get_report_url(),
report_url=env.get_report_url(settings=Settings),
pull_request_url=env.CHANGE_URL,
base_ref=env.BASE_BRANCH,
base_repo=env.REPOSITORY,

View File

@ -23,7 +23,7 @@ class Digest:
hash_string = hash_obj.hexdigest()
return hash_string
def calc_job_digest(self, job_config: Job.Config):
def calc_job_digest(self, job_config: Job.Config, docker_digests):
config = job_config.digest_config
if not config:
return "f" * Settings.CACHE_DIGEST_LEN
@ -31,32 +31,32 @@ class Digest:
cache_key = self._hash_digest_config(config)
if cache_key in self.digest_cache:
return self.digest_cache[cache_key]
print(
f"calc digest for job [{job_config.name}]: hash_key [{cache_key}] - from cache"
)
digest = self.digest_cache[cache_key]
else:
included_files = Utils.traverse_paths(
job_config.digest_config.include_paths,
job_config.digest_config.exclude_paths,
sorted=True,
)
print(
f"calc digest for job [{job_config.name}]: hash_key [{cache_key}], include [{len(included_files)}] files"
)
# Sort files to ensure consistent hash calculation
included_files.sort()
# Calculate MD5 hash
res = ""
if not included_files:
res = "f" * Settings.CACHE_DIGEST_LEN
print(f"NOTE: empty digest config [{config}] - return dummy digest")
else:
hash_md5 = hashlib.md5()
for file_path in included_files:
res = self._calc_file_digest(file_path, hash_md5)
assert res
self.digest_cache[cache_key] = res
return res
for i, file_path in enumerate(included_files):
hash_md5 = self._calc_file_digest(file_path, hash_md5)
digest = hash_md5.hexdigest()[: Settings.CACHE_DIGEST_LEN]
self.digest_cache[cache_key] = digest
if job_config.run_in_docker:
# respect docker digest in the job digest
docker_digest = docker_digests[job_config.run_in_docker.split("+")[0]]
digest = "-".join([docker_digest, digest])
return digest
def calc_docker_digest(
self,
@ -103,10 +103,10 @@ class Digest:
print(
f"WARNING: No valid file resolved by link {file_path} -> {resolved_path} - skipping digest calculation"
)
return hash_md5.hexdigest()[: Settings.CACHE_DIGEST_LEN]
return hash_md5
with open(resolved_path, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
hash_md5.update(chunk)
return hash_md5.hexdigest()[: Settings.CACHE_DIGEST_LEN]
return hash_md5

View File

@ -1,3 +0,0 @@
from praktika._environment import _Environment
Environment = _Environment.get()

View File

@ -18,7 +18,7 @@ class GH:
ret_code, out, err = Shell.get_res_stdout_stderr(command, verbose=True)
res = ret_code == 0
if not res and "Validation Failed" in err:
print("ERROR: GH command validation error")
print(f"ERROR: GH command validation error.")
break
if not res and "Bad credentials" in err:
print("ERROR: GH credentials/auth failure")

View File

@ -1,6 +1,5 @@
from praktika._environment import _Environment
from praktika.cache import Cache
from praktika.mangle import _get_workflows
from praktika.runtime import RunConfig
from praktika.settings import Settings
from praktika.utils import Utils
@ -8,11 +7,10 @@ from praktika.utils import Utils
class CacheRunnerHooks:
@classmethod
def configure(cls, _workflow):
workflow_config = RunConfig.from_fs(_workflow.name)
def configure(cls, workflow):
workflow_config = RunConfig.from_fs(workflow.name)
docker_digests = workflow_config.digest_dockers
cache = Cache()
assert _Environment.get().WORKFLOW_NAME
workflow = _get_workflows(name=_Environment.get().WORKFLOW_NAME)[0]
print(f"Workflow Configure, workflow [{workflow.name}]")
assert (
workflow.enable_cache
@ -20,11 +18,13 @@ class CacheRunnerHooks:
artifact_digest_map = {}
job_digest_map = {}
for job in workflow.jobs:
digest = cache.digest.calc_job_digest(
job_config=job, docker_digests=docker_digests
)
if not job.digest_config:
print(
f"NOTE: job [{job.name}] has no Config.digest_config - skip cache check, always run"
)
digest = cache.digest.calc_job_digest(job_config=job)
job_digest_map[job.name] = digest
if job.provides:
# assign the job digest also to the artifacts it provides
@ -50,7 +50,6 @@ class CacheRunnerHooks:
), f"BUG, Workflow with enabled cache must have job digests after configuration, wf [{workflow.name}]"
print("Check remote cache")
job_to_cache_record = {}
for job_name, job_digest in workflow_config.digest_jobs.items():
record = cache.fetch_success(job_name=job_name, job_digest=job_digest)
if record:
@ -60,7 +59,7 @@ class CacheRunnerHooks:
)
workflow_config.cache_success.append(job_name)
workflow_config.cache_success_base64.append(Utils.to_base64(job_name))
job_to_cache_record[job_name] = record
workflow_config.cache_jobs[job_name] = record
print("Check artifacts to reuse")
for job in workflow.jobs:
@ -68,7 +67,7 @@ class CacheRunnerHooks:
if job.provides:
for artifact_name in job.provides:
workflow_config.cache_artifacts[artifact_name] = (
job_to_cache_record[job.name]
workflow_config.cache_jobs[job.name]
)
print(f"Write config to GH's job output")

View File

@ -1,63 +1,125 @@
import dataclasses
import json
import urllib.parse
from pathlib import Path
from typing import List
from praktika._environment import _Environment
from praktika.gh import GH
from praktika.parser import WorkflowConfigParser
from praktika.result import Result, ResultInfo
from praktika.result import Result, ResultInfo, _ResultS3
from praktika.runtime import RunConfig
from praktika.s3 import S3
from praktika.settings import Settings
from praktika.utils import Shell, Utils
from praktika.utils import Utils
@dataclasses.dataclass
class GitCommit:
date: str
message: str
# date: str
# message: str
sha: str
@staticmethod
def from_json(json_data: str) -> List["GitCommit"]:
def from_json(file) -> List["GitCommit"]:
commits = []
json_data = None
try:
data = json.loads(json_data)
with open(file, "r", encoding="utf-8") as f:
json_data = json.load(f)
commits = [
GitCommit(
message=commit["messageHeadline"],
sha=commit["oid"],
date=commit["committedDate"],
# message=commit["messageHeadline"],
sha=commit["sha"],
# date=commit["committedDate"],
)
for commit in data.get("commits", [])
for commit in json_data
]
except Exception as e:
print(
f"ERROR: Failed to deserialize commit's data: [{json_data}], ex: [{e}]"
f"ERROR: Failed to deserialize commit's data [{json_data}], ex: [{e}]"
)
return commits
@classmethod
def update_s3_data(cls):
env = _Environment.get()
sha = env.SHA
if not sha:
print("WARNING: Failed to retrieve commit sha")
return
commits = cls.pull_from_s3()
for commit in commits:
if sha == commit.sha:
print(
f"INFO: Sha already present in commits data [{sha}] - skip data update"
)
return
commits.append(GitCommit(sha=sha))
cls.push_to_s3(commits)
return
@classmethod
def dump(cls, commits):
commits_ = []
for commit in commits:
commits_.append(dataclasses.asdict(commit))
with open(cls.file_name(), "w", encoding="utf8") as f:
json.dump(commits_, f)
@classmethod
def pull_from_s3(cls):
local_path = Path(cls.file_name())
file_name = local_path.name
env = _Environment.get()
s3_path = f"{Settings.HTML_S3_PATH}/{cls.get_s3_prefix(pr_number=env.PR_NUMBER, branch=env.BRANCH)}/{file_name}"
if not S3.copy_file_from_s3(s3_path=s3_path, local_path=local_path):
print(f"WARNING: failed to cp file [{s3_path}] from s3")
return []
return cls.from_json(local_path)
@classmethod
def push_to_s3(cls, commits):
print(f"INFO: push commits data to s3, commits num [{len(commits)}]")
cls.dump(commits)
local_path = Path(cls.file_name())
file_name = local_path.name
env = _Environment.get()
s3_path = f"{Settings.HTML_S3_PATH}/{cls.get_s3_prefix(pr_number=env.PR_NUMBER, branch=env.BRANCH)}/{file_name}"
if not S3.copy_file_to_s3(s3_path=s3_path, local_path=local_path, text=True):
print(f"WARNING: failed to cp file [{local_path}] to s3")
@classmethod
def get_s3_prefix(cls, pr_number, branch):
prefix = ""
assert pr_number or branch
if pr_number and pr_number > 0:
prefix += f"{pr_number}"
else:
prefix += f"{branch}"
return prefix
@classmethod
def file_name(cls):
return f"{Settings.TEMP_DIR}/commits.json"
# def _get_pr_commits(pr_number):
# res = []
# if not pr_number:
# return res
# output = Shell.get_output(f"gh pr view {pr_number} --json commits")
# if output:
# res = GitCommit.from_json(output)
# return res
class HtmlRunnerHooks:
@classmethod
def configure(cls, _workflow):
def _get_pr_commits(pr_number):
res = []
if not pr_number:
return res
output = Shell.get_output(f"gh pr view {pr_number} --json commits")
if output:
res = GitCommit.from_json(output)
return res
# generate pending Results for all jobs in the workflow
if _workflow.enable_cache:
skip_jobs = RunConfig.from_fs(_workflow.name).cache_success
job_cache_records = RunConfig.from_fs(_workflow.name).cache_jobs
else:
skip_jobs = []
@ -67,36 +129,22 @@ class HtmlRunnerHooks:
if job.name not in skip_jobs:
result = Result.generate_pending(job.name)
else:
result = Result.generate_skipped(job.name)
result = Result.generate_skipped(job.name, job_cache_records[job.name])
results.append(result)
summary_result = Result.generate_pending(_workflow.name, results=results)
summary_result.aux_links.append(env.CHANGE_URL)
summary_result.aux_links.append(env.RUN_URL)
summary_result.links.append(env.CHANGE_URL)
summary_result.links.append(env.RUN_URL)
summary_result.start_time = Utils.timestamp()
page_url = "/".join(
["https:/", Settings.HTML_S3_PATH, str(Path(Settings.HTML_PAGE_FILE).name)]
)
for bucket, endpoint in Settings.S3_BUCKET_TO_HTTP_ENDPOINT.items():
page_url = page_url.replace(bucket, endpoint)
# TODO: add support for non-PRs (use branch?)
page_url += f"?PR={env.PR_NUMBER}&sha=latest&name_0={urllib.parse.quote(env.WORKFLOW_NAME, safe='')}"
summary_result.html_link = page_url
# clean the previous latest results in PR if any
if env.PR_NUMBER:
S3.clean_latest_result()
S3.copy_result_to_s3(
summary_result,
unlock=False,
)
assert _ResultS3.copy_result_to_s3_with_version(summary_result, version=0)
page_url = env.get_report_url(settings=Settings)
print(f"CI Status page url [{page_url}]")
res1 = GH.post_commit_status(
name=_workflow.name,
status=Result.Status.PENDING,
description="",
url=page_url,
url=env.get_report_url(settings=Settings, latest=True),
)
res2 = GH.post_pr_comment(
comment_body=f"Workflow [[{_workflow.name}]({page_url})], commit [{_Environment.get().SHA[:8]}]",
@ -106,23 +154,15 @@ class HtmlRunnerHooks:
Utils.raise_with_error(
"Failed to set both GH commit status and PR comment with Workflow Status, cannot proceed"
)
if env.PR_NUMBER:
commits = _get_pr_commits(env.PR_NUMBER)
# TODO: upload commits data to s3 to visualise it on a report page
print(commits)
# TODO: enable for branch, add commit number limiting
GitCommit.update_s3_data()
@classmethod
def pre_run(cls, _workflow, _job):
result = Result.from_fs(_job.name)
S3.copy_result_from_s3(
Result.file_name_static(_workflow.name),
)
workflow_result = Result.from_fs(_workflow.name)
workflow_result.update_sub_result(result)
S3.copy_result_to_s3(
workflow_result,
unlock=True,
_ResultS3.update_workflow_results(
workflow_name=_workflow.name, new_sub_results=result
)
@classmethod
@ -132,14 +172,13 @@ class HtmlRunnerHooks:
@classmethod
def post_run(cls, _workflow, _job, info_errors):
result = Result.from_fs(_job.name)
env = _Environment.get()
S3.copy_result_from_s3(
Result.file_name_static(_workflow.name),
lock=True,
)
workflow_result = Result.from_fs(_workflow.name)
print(f"Workflow info [{workflow_result.info}], info_errors [{info_errors}]")
_ResultS3.upload_result_files_to_s3(result)
_ResultS3.copy_result_to_s3(result)
env = _Environment.get()
new_sub_results = [result]
new_result_info = ""
env_info = env.REPORT_INFO
if env_info:
print(
@ -151,14 +190,8 @@ class HtmlRunnerHooks:
info_str = f"{_job.name}:\n"
info_str += "\n".join(info_errors)
print("Update workflow results with new info")
workflow_result.set_info(info_str)
new_result_info = info_str
old_status = workflow_result.status
S3.upload_result_files_to_s3(result)
workflow_result.update_sub_result(result)
skipped_job_results = []
if not result.is_ok():
print(
"Current job failed - find dependee jobs in the workflow and set their statuses to skipped"
@ -171,7 +204,7 @@ class HtmlRunnerHooks:
print(
f"NOTE: Set job [{dependee_job.name}] status to [{Result.Status.SKIPPED}] due to current failure"
)
skipped_job_results.append(
new_sub_results.append(
Result(
name=dependee_job.name,
status=Result.Status.SKIPPED,
@ -179,20 +212,18 @@ class HtmlRunnerHooks:
+ f" [{_job.name}]",
)
)
for skipped_job_result in skipped_job_results:
workflow_result.update_sub_result(skipped_job_result)
S3.copy_result_to_s3(
workflow_result,
unlock=True,
)
if workflow_result.status != old_status:
print(
f"Update GH commit status [{result.name}]: [{old_status} -> {workflow_result.status}], link [{workflow_result.html_link}]"
updated_status = _ResultS3.update_workflow_results(
new_info=new_result_info,
new_sub_results=new_sub_results,
workflow_name=_workflow.name,
)
if updated_status:
print(f"Update GH commit status [{result.name}]: [{updated_status}]")
GH.post_commit_status(
name=workflow_result.name,
status=GH.convert_to_gh_status(workflow_result.status),
name=_workflow.name,
status=GH.convert_to_gh_status(updated_status),
description="",
url=workflow_result.html_link,
url=env.get_report_url(settings=Settings, latest=True),
)

View File

@ -52,30 +52,58 @@ class Job:
self,
parameter: Optional[List[Any]] = None,
runs_on: Optional[List[List[str]]] = None,
provides: Optional[List[List[str]]] = None,
requires: Optional[List[List[str]]] = None,
timeout: Optional[List[int]] = None,
):
assert (
parameter or runs_on
), "Either :parameter or :runs_on must be non empty list for parametrisation"
if runs_on:
assert isinstance(runs_on, list) and isinstance(runs_on[0], list)
if not parameter:
parameter = [None] * len(runs_on)
if not runs_on:
runs_on = [None] * len(parameter)
if not timeout:
timeout = [None] * len(parameter)
if not provides:
provides = [None] * len(parameter)
if not requires:
requires = [None] * len(parameter)
assert (
len(parameter) == len(runs_on) == len(timeout)
), "Parametrization lists must be of the same size"
len(parameter)
== len(runs_on)
== len(timeout)
== len(provides)
== len(requires)
), f"Parametrization lists must be of the same size [{len(parameter)}, {len(runs_on)}, {len(timeout)}, {len(provides)}, {len(requires)}]"
res = []
for parameter_, runs_on_, timeout_ in zip(parameter, runs_on, timeout):
for parameter_, runs_on_, timeout_, provides_, requires_ in zip(
parameter, runs_on, timeout, provides, requires
):
obj = copy.deepcopy(self)
assert (
not obj.provides
), "Job.Config.provides must be empty for parametrized jobs"
if parameter_:
obj.parameter = parameter_
obj.command = obj.command.format(PARAMETER=parameter_)
if runs_on_:
obj.runs_on = runs_on_
if timeout_:
obj.timeout = timeout_
if provides_:
assert (
not obj.provides
), "Job.Config.provides must be empty for parametrized jobs"
obj.provides = provides_
if requires_:
assert (
not obj.requires
), "Job.Config.requires and parametrize(requires=...) are both set"
obj.requires = requires_
obj.name = obj.get_job_name_with_parameter()
res.append(obj)
return res
@ -84,13 +112,16 @@ class Job:
name, parameter, runs_on = self.name, self.parameter, self.runs_on
res = name
name_params = []
if parameter:
if isinstance(parameter, list) or isinstance(parameter, dict):
name_params.append(json.dumps(parameter))
elif parameter is not None:
else:
name_params.append(parameter)
if runs_on:
elif runs_on:
assert isinstance(runs_on, list)
name_params.append(json.dumps(runs_on))
else:
assert False
if name_params:
name_params = [str(param) for param in name_params]
res += f" ({', '.join(name_params)})"

View File

@ -89,15 +89,27 @@
letter-spacing: -0.5px;
}
.dropdown-value {
width: 100px;
font-weight: normal;
font-family: inherit;
background-color: transparent;
color: inherit;
/*border: none;*/
/*outline: none;*/
/*cursor: pointer;*/
}
#result-container {
background-color: var(--tile-background);
margin-left: calc(var(--status-width) + 20px);
padding: 20px;
padding: 0;
box-sizing: border-box;
text-align: center;
font-size: 18px;
font-weight: normal;
flex-grow: 1;
margin-bottom: 40px;
}
#footer {
@ -189,10 +201,7 @@
}
th.name-column, td.name-column {
max-width: 400px; /* Set the maximum width for the column */
white-space: nowrap; /* Prevent text from wrapping */
overflow: hidden; /* Hide the overflowed text */
text-overflow: ellipsis; /* Show ellipsis (...) for overflowed text */
min-width: 350px;
}
th.status-column, td.status-column {
@ -282,6 +291,12 @@
}
}
function updateUrlParameter(paramName, paramValue) {
const url = new URL(window.location.href);
url.searchParams.set(paramName, paramValue);
window.location.href = url.toString();
}
// Attach the toggle function to the click event of the icon
document.getElementById('theme-toggle').addEventListener('click', toggleTheme);
@ -291,14 +306,14 @@
const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
const month = monthNames[date.getMonth()];
const year = date.getFullYear();
//const year = date.getFullYear();
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
//const milliseconds = String(date.getMilliseconds()).padStart(2, '0');
return showDate
? `${day}-${month}-${year} ${hours}:${minutes}:${seconds}`
? `${day}'${month} ${hours}:${minutes}:${seconds}`
: `${hours}:${minutes}:${seconds}`;
}
@ -328,7 +343,7 @@
const milliseconds = Math.floor((duration % 1) * 1000);
const formattedSeconds = String(seconds);
const formattedMilliseconds = String(milliseconds).padStart(3, '0');
const formattedMilliseconds = String(milliseconds).padStart(2, '0').slice(-2);
return `${formattedSeconds}.${formattedMilliseconds}`;
}
@ -346,8 +361,7 @@
return 'status-other';
}
function addKeyValueToStatus(key, value) {
function addKeyValueToStatus(key, value, options = null) {
const statusContainer = document.getElementById('status-container');
let keyValuePair = document.createElement('div');
@ -357,12 +371,40 @@
keyElement.className = 'json-key';
keyElement.textContent = key + ':';
const valueElement = document.createElement('div');
valueElement.className = 'json-value';
valueElement.textContent = value;
let valueElement;
keyValuePair.appendChild(keyElement)
keyValuePair.appendChild(valueElement)
if (options) {
// Create dropdown if options are provided
valueElement = document.createElement('select');
valueElement.className = 'dropdown-value';
options.forEach(optionValue => {
const option = document.createElement('option');
option.value = optionValue;
option.textContent = optionValue.slice(0, 10);
// Set the initially selected option
if (optionValue === value) {
option.selected = true;
}
valueElement.appendChild(option);
});
// Update the URL parameter when the selected value changes
valueElement.addEventListener('change', (event) => {
const selectedValue = event.target.value;
updateUrlParameter(key, selectedValue);
});
} else {
// Create a simple text display if no options are provided
valueElement = document.createElement('div');
valueElement.className = 'json-value';
valueElement.textContent = value || 'N/A'; // Display 'N/A' if value is null
}
keyValuePair.appendChild(keyElement);
keyValuePair.appendChild(valueElement);
statusContainer.appendChild(keyValuePair);
}
@ -486,12 +528,12 @@
const columns = ['name', 'status', 'start_time', 'duration', 'info'];
const columnSymbols = {
name: '📂',
status: '✔️',
name: '🗂️',
status: '🧾',
start_time: '🕒',
duration: '⏳',
info: '',
files: '📄'
info: '📝',
files: '📎'
};
function createResultsTable(results, nest_level) {
@ -500,16 +542,14 @@
const thead = document.createElement('thead');
const tbody = document.createElement('tbody');
// Get the current URL parameters
const currentUrl = new URL(window.location.href);
// Create table headers based on the fixed columns
const headerRow = document.createElement('tr');
columns.forEach(column => {
const th = document.createElement('th');
th.textContent = th.textContent = columnSymbols[column] || column;
th.textContent = columnSymbols[column] || column;
th.style.cursor = 'pointer'; // Make headers clickable
th.addEventListener('click', () => sortTable(results, column, tbody, nest_level)); // Add click event to sort the table
th.setAttribute('data-sort-direction', 'asc'); // Default sort direction
th.addEventListener('click', () => sortTable(results, column, columnSymbols[column] || column, tbody, nest_level, columns)); // Add click event to sort the table
headerRow.appendChild(th);
});
thead.appendChild(headerRow);
@ -561,8 +601,7 @@
td.classList.add('time-column');
td.textContent = value ? formatDuration(value) : '';
} else if (column === 'info') {
// For info and other columns, just display the value
td.textContent = value || '';
td.textContent = value.includes('\n') ? '↵' : (value || '');
td.classList.add('info-column');
}
@ -573,39 +612,33 @@
});
}
function sortTable(results, key, tbody, nest_level) {
function sortTable(results, column, key, tbody, nest_level, columns) {
// Find the table header element for the given key
let th = null;
const tableHeaders = document.querySelectorAll('th'); // Select all table headers
tableHeaders.forEach(header => {
if (header.textContent.trim().toLowerCase() === key.toLowerCase()) {
th = header;
}
});
const tableHeaders = document.querySelectorAll('th');
let th = Array.from(tableHeaders).find(header => header.textContent === key);
if (!th) {
console.error(`No table header found for key: ${key}`);
return;
}
// Determine the current sort direction
let ascending = th.getAttribute('data-sort-direction') === 'asc' ? false : true;
const ascending = th.getAttribute('data-sort-direction') === 'asc';
th.setAttribute('data-sort-direction', ascending ? 'desc' : 'asc');
// Toggle the sort direction for the next click
th.setAttribute('data-sort-direction', ascending ? 'asc' : 'desc');
// Sort the results array by the given key
results.sort((a, b) => {
if (a[key] < b[key]) return ascending ? -1 : 1;
if (a[key] > b[key]) return ascending ? 1 : -1;
if (a[column] < b[column]) return ascending ? -1 : 1;
if (a[column] > b[column]) return ascending ? 1 : -1;
return 0;
});
// Clear the existing rows in tbody
tbody.innerHTML = '';
// Re-populate the table with sorted data
populateTableRows(tbody, results, columns, nest_level);
}
function loadJSON(PR, sha, nameParams) {
function loadResultsJSON(PR, sha, nameParams) {
const infoElement = document.getElementById('info-container');
let lastModifiedTime = null;
const task = nameParams[0].toLowerCase();
@ -630,12 +663,9 @@
let targetData = navigatePath(data, nameParams);
let nest_level = nameParams.length;
if (targetData) {
infoElement.style.display = 'none';
// Handle footer links if present
if (Array.isArray(data.aux_links) && data.aux_links.length > 0) {
data.aux_links.forEach(link => {
// Add footer links from top-level Result
if (Array.isArray(data.links) && data.links.length > 0) {
data.links.forEach(link => {
const a = document.createElement('a');
a.href = link;
a.textContent = link.split('/').pop();
@ -644,6 +674,10 @@
});
}
if (targetData) {
//infoElement.style.display = 'none';
infoElement.innerHTML = (targetData.info || '').replace(/\n/g, '<br>');
addStatusToStatus(targetData.status, targetData.start_time, targetData.duration)
// Handle links
@ -721,22 +755,62 @@
}
});
let path_commits_json = '';
let commitsArray = [];
if (PR) {
addKeyValueToStatus("PR", PR)
addKeyValueToStatus("PR", PR);
const baseUrl = window.location.origin + window.location.pathname.replace('/json.html', '');
path_commits_json = `${baseUrl}/${encodeURIComponent(PR)}/commits.json`;
} else {
console.error("TODO")
// Placeholder for a different path when PR is missing
console.error("PR parameter is missing. Setting alternate commits path.");
path_commits_json = '/path/to/alternative/commits.json';
}
addKeyValueToStatus("sha", sha);
function loadCommitsArray(path) {
return fetch(path, { cache: "no-cache" })
.then(response => {
if (!response.ok) {
console.error(`HTTP error! status: ${response.status}`)
return [];
}
return response.json();
})
.then(data => {
if (Array.isArray(data) && data.every(item => typeof item === 'object' && item.hasOwnProperty('sha'))) {
return data.map(item => item.sha);
} else {
throw new Error('Invalid data format: expected array of objects with a "sha" key');
}
})
.catch(error => {
console.error('Error loading commits JSON:', error);
return []; // Return an empty array if an error occurs
});
}
loadCommitsArray(path_commits_json)
.then(data => {
commitsArray = data;
})
.finally(() => {
// Proceed with the rest of the initialization
addKeyValueToStatus("sha", sha || "latest", commitsArray.concat(["latest"]));
if (nameParams[1]) {
addKeyValueToStatus("job", nameParams[1]);
}
addKeyValueToStatus("workflow", nameParams[0]);
// Check if all required parameters are present to load JSON
if (PR && sha && root_name) {
loadJSON(PR, sha, nameParams);
const shaToLoad = (sha === 'latest') ? commitsArray[commitsArray.length - 1] : sha;
loadResultsJSON(PR, shaToLoad, nameParams);
} else {
document.getElementById('title').textContent = 'Error: Missing required URL parameters: PR, sha, or name_0';
}
});
}
window.onload = init;

View File

@ -1,11 +1,10 @@
import copy
import importlib.util
from pathlib import Path
from typing import Any, Dict
from praktika import Job
from praktika._settings import _USER_DEFINED_SETTINGS, _Settings
from praktika.utils import ContextManager, Utils
from praktika.settings import Settings
from praktika.utils import Utils
def _get_workflows(name=None, file=None):
@ -14,14 +13,13 @@ def _get_workflows(name=None, file=None):
"""
res = []
with ContextManager.cd():
directory = Path(_Settings.WORKFLOWS_DIRECTORY)
directory = Path(Settings.WORKFLOWS_DIRECTORY)
for py_file in directory.glob("*.py"):
if file and file not in str(py_file):
continue
module_name = py_file.name.removeprefix(".py")
spec = importlib.util.spec_from_file_location(
module_name, f"{_Settings.WORKFLOWS_DIRECTORY}/{module_name}"
module_name, f"{Settings.WORKFLOWS_DIRECTORY}/{module_name}"
)
assert spec
foo = importlib.util.module_from_spec(spec)
@ -58,7 +56,6 @@ def _update_workflow_artifacts(workflow):
artifact_job = {}
for job in workflow.jobs:
for artifact_name in job.provides:
assert artifact_name not in artifact_job
artifact_job[artifact_name] = job.name
for artifact in workflow.artifacts:
artifact._provided_by = artifact_job[artifact.name]
@ -108,30 +105,3 @@ def _update_workflow_with_native_jobs(workflow):
for job in workflow.jobs:
aux_job.requires.append(job.name)
workflow.jobs.append(aux_job)
def _get_user_settings() -> Dict[str, Any]:
"""
Gets user's settings
"""
res = {} # type: Dict[str, Any]
directory = Path(_Settings.SETTINGS_DIRECTORY)
for py_file in directory.glob("*.py"):
module_name = py_file.name.removeprefix(".py")
spec = importlib.util.spec_from_file_location(
module_name, f"{_Settings.SETTINGS_DIRECTORY}/{module_name}"
)
assert spec
foo = importlib.util.module_from_spec(spec)
assert spec.loader
spec.loader.exec_module(foo)
for setting in _USER_DEFINED_SETTINGS:
try:
value = getattr(foo, setting)
res[setting] = value
print(f"Apply user defined setting [{setting} = {value}]")
except Exception as e:
pass
return res

View File

@ -10,9 +10,8 @@ from praktika.gh import GH
from praktika.hook_cache import CacheRunnerHooks
from praktika.hook_html import HtmlRunnerHooks
from praktika.mangle import _get_workflows
from praktika.result import Result, ResultInfo
from praktika.result import Result, ResultInfo, _ResultS3
from praktika.runtime import RunConfig
from praktika.s3 import S3
from praktika.settings import Settings
from praktika.utils import Shell, Utils
@ -151,7 +150,7 @@ def _config_workflow(workflow: Workflow.Config, job_name):
status = Result.Status.ERROR
print("ERROR: ", info)
else:
Shell.check(f"{Settings.PYTHON_INTERPRETER} -m praktika --generate")
assert Shell.check(f"{Settings.PYTHON_INTERPRETER} -m praktika yaml")
exit_code, output, err = Shell.get_res_stdout_stderr(
f"git diff-index HEAD -- {Settings.WORKFLOW_PATH_PREFIX}"
)
@ -225,6 +224,7 @@ def _config_workflow(workflow: Workflow.Config, job_name):
cache_success=[],
cache_success_base64=[],
cache_artifacts={},
cache_jobs={},
).dump()
# checks:
@ -250,6 +250,9 @@ def _config_workflow(workflow: Workflow.Config, job_name):
info_lines.append(job_name + ": " + info)
results.append(result_)
if workflow.enable_merge_commit:
assert False, "NOT implemented"
# config:
if workflow.dockers:
print("Calculate docker's digests")
@ -307,9 +310,8 @@ def _finish_workflow(workflow, job_name):
print(env.get_needs_statuses())
print("Check Workflow results")
S3.copy_result_from_s3(
_ResultS3.copy_result_from_s3(
Result.file_name_static(workflow.name),
lock=False,
)
workflow_result = Result.from_fs(workflow.name)
@ -339,10 +341,12 @@ def _finish_workflow(workflow, job_name):
f"NOTE: Result for [{result.name}] has not ok status [{result.status}]"
)
ready_for_merge_status = Result.Status.FAILED
failed_results.append(result.name.split("(", maxsplit=1)[0]) # cut name
failed_results.append(result.name)
if failed_results:
ready_for_merge_description = f"failed: {', '.join(failed_results)}"
ready_for_merge_description = (
f'Failed {len(failed_results)} "Required for Merge" jobs'
)
if not GH.post_commit_status(
name=Settings.READY_FOR_MERGE_STATUS_NAME + f" [{workflow.name}]",
@ -354,15 +358,12 @@ def _finish_workflow(workflow, job_name):
env.add_info(ResultInfo.GH_STATUS_ERROR)
if update_final_report:
S3.copy_result_to_s3(
_ResultS3.copy_result_to_s3(
workflow_result,
unlock=False,
) # no lock - no unlock
Result.from_fs(job_name).set_status(Result.Status.SUCCESS).set_info(
ready_for_merge_description
)
Result.from_fs(job_name).set_status(Result.Status.SUCCESS)
if __name__ == "__main__":
job_name = sys.argv[1]

View File

@ -1,12 +1,13 @@
import dataclasses
import datetime
import sys
from collections.abc import Container
from pathlib import Path
from typing import Any, Dict, List, Optional
from typing import Any, Dict, List, Optional, Union
from praktika._environment import _Environment
from praktika._settings import _Settings
from praktika.cache import Cache
from praktika.s3 import S3
from praktika.settings import Settings
from praktika.utils import ContextManager, MetaClasses, Shell, Utils
@ -27,10 +28,6 @@ class Result(MetaClasses.Serializable):
files (List[str]): A list of file paths or names related to the result.
links (List[str]): A list of URLs related to the result (e.g., links to reports or resources).
info (str): Additional information about the result. Free-form text.
# TODO: rename
aux_links (List[str]): A list of auxiliary links that provide additional context for the result.
# TODO: remove
html_link (str): A direct link to an HTML representation of the result (e.g., a detailed report page).
Inner Class:
Status: Defines possible statuses for the task, such as "success", "failure", etc.
@ -52,8 +49,6 @@ class Result(MetaClasses.Serializable):
files: List[str] = dataclasses.field(default_factory=list)
links: List[str] = dataclasses.field(default_factory=list)
info: str = ""
aux_links: List[str] = dataclasses.field(default_factory=list)
html_link: str = ""
@staticmethod
def create_from(
@ -62,14 +57,15 @@ class Result(MetaClasses.Serializable):
stopwatch: Utils.Stopwatch = None,
status="",
files=None,
info="",
info: Union[List[str], str] = "",
with_info_from_results=True,
):
if isinstance(status, bool):
status = Result.Status.SUCCESS if status else Result.Status.FAILED
if not results and not status:
print("ERROR: Either .results or .status must be provided")
raise
Utils.raise_with_error(
f"Either .results ({results}) or .status ({status}) must be provided"
)
if not name:
name = _Environment.get().JOB_NAME
if not name:
@ -78,10 +74,10 @@ class Result(MetaClasses.Serializable):
result_status = status or Result.Status.SUCCESS
infos = []
if info:
if isinstance(info, Container):
infos += info
if isinstance(info, str):
infos += [info]
else:
infos.append(info)
infos += info
if results and not status:
for result in results:
if result.status not in (Result.Status.SUCCESS, Result.Status.FAILED):
@ -112,7 +108,7 @@ class Result(MetaClasses.Serializable):
return self.status not in (Result.Status.PENDING, Result.Status.RUNNING)
def is_running(self):
return self.status not in (Result.Status.RUNNING,)
return self.status in (Result.Status.RUNNING,)
def is_ok(self):
return self.status in (Result.Status.SKIPPED, Result.Status.SUCCESS)
@ -155,7 +151,7 @@ class Result(MetaClasses.Serializable):
@classmethod
def file_name_static(cls, name):
return f"{_Settings.TEMP_DIR}/result_{Utils.normalize_string(name)}.json"
return f"{Settings.TEMP_DIR}/result_{Utils.normalize_string(name)}.json"
@classmethod
def from_dict(cls, obj: Dict[str, Any]) -> "Result":
@ -180,6 +176,11 @@ class Result(MetaClasses.Serializable):
)
return self
def set_timing(self, stopwatch: Utils.Stopwatch):
self.start_time = stopwatch.start_time
self.duration = stopwatch.duration
return self
def update_sub_result(self, result: "Result"):
assert self.results, "BUG?"
for i, result_ in enumerate(self.results):
@ -233,7 +234,7 @@ class Result(MetaClasses.Serializable):
)
@classmethod
def generate_skipped(cls, name, results=None):
def generate_skipped(cls, name, cache_record: Cache.CacheRecord, results=None):
return Result(
name=name,
status=Result.Status.SKIPPED,
@ -242,7 +243,7 @@ class Result(MetaClasses.Serializable):
results=results or [],
files=[],
links=[],
info="from cache",
info=f"from cache: sha [{cache_record.sha}], pr/branch [{cache_record.pr_number or cache_record.branch}]",
)
@classmethod
@ -276,7 +277,7 @@ class Result(MetaClasses.Serializable):
# Set log file path if logging is enabled
log_file = (
f"{_Settings.TEMP_DIR}/{Utils.normalize_string(name)}.log"
f"{Settings.TEMP_DIR}/{Utils.normalize_string(name)}.log"
if with_log
else None
)
@ -318,18 +319,35 @@ class Result(MetaClasses.Serializable):
files=[log_file] if log_file else None,
)
def finish_job_accordingly(self):
def complete_job(self):
self.dump()
if not self.is_ok():
print("ERROR: Job Failed")
for result in self.results:
if not result.is_ok():
print("Failed checks:")
print(" | ", result)
print(self.to_stdout_formatted())
sys.exit(1)
else:
print("ok")
def to_stdout_formatted(self, indent="", res=""):
if self.is_ok():
return res
res += f"{indent}Task [{self.name}] failed.\n"
fail_info = ""
sub_indent = indent + " "
if not self.results:
if not self.is_ok():
fail_info += f"{sub_indent}{self.name}:\n"
for line in self.info.splitlines():
fail_info += f"{sub_indent}{sub_indent}{line}\n"
return res + fail_info
for sub_result in self.results:
res = sub_result.to_stdout_formatted(sub_indent, res)
return res
class ResultInfo:
SETUP_ENV_JOB_FAILED = (
@ -352,3 +370,202 @@ class ResultInfo:
)
S3_ERROR = "S3 call failure"
class _ResultS3:
@classmethod
def copy_result_to_s3(cls, result, unlock=False):
result.dump()
env = _Environment.get()
s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}"
s3_path_full = f"{s3_path}/{Path(result.file_name()).name}"
url = S3.copy_file_to_s3(s3_path=s3_path, local_path=result.file_name())
# if unlock:
# if not cls.unlock(s3_path_full):
# print(f"ERROR: File [{s3_path_full}] unlock failure")
# assert False # TODO: investigate
return url
@classmethod
def copy_result_from_s3(cls, local_path, lock=False):
env = _Environment.get()
file_name = Path(local_path).name
s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}/{file_name}"
# if lock:
# cls.lock(s3_path)
if not S3.copy_file_from_s3(s3_path=s3_path, local_path=local_path):
print(f"ERROR: failed to cp file [{s3_path}] from s3")
raise
@classmethod
def copy_result_from_s3_with_version(cls, local_path):
env = _Environment.get()
file_name = Path(local_path).name
local_dir = Path(local_path).parent
file_name_pattern = f"{file_name}_*"
for file_path in local_dir.glob(file_name_pattern):
file_path.unlink()
s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}/"
if not S3.copy_file_from_s3_matching_pattern(
s3_path=s3_path, local_path=local_dir, include=file_name_pattern
):
print(f"ERROR: failed to cp file [{s3_path}] from s3")
raise
result_files = []
for file_path in local_dir.glob(file_name_pattern):
result_files.append(file_path)
assert result_files, "No result files found"
result_files.sort()
version = int(result_files[-1].name.split("_")[-1])
Shell.check(f"cp {result_files[-1]} {local_path}", strict=True, verbose=True)
return version
@classmethod
def copy_result_to_s3_with_version(cls, result, version):
result.dump()
filename = Path(result.file_name()).name
file_name_versioned = f"{filename}_{str(version).zfill(3)}"
env = _Environment.get()
s3_path_versioned = (
f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}/{file_name_versioned}"
)
s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}/"
if version == 0:
S3.clean_s3_directory(s3_path=s3_path)
if not S3.put(
s3_path=s3_path_versioned,
local_path=result.file_name(),
if_none_matched=True,
):
print("Failed to put versioned Result")
return False
if not S3.put(s3_path=s3_path, local_path=result.file_name()):
print("Failed to put non-versioned Result")
return True
# @classmethod
# def lock(cls, s3_path, level=0):
# env = _Environment.get()
# s3_path_lock = s3_path + f".lock"
# file_path_lock = f"{Settings.TEMP_DIR}/{Path(s3_path_lock).name}"
# assert Shell.check(
# f"echo '''{env.JOB_NAME}''' > {file_path_lock}", verbose=True
# ), "Never"
#
# i = 20
# meta = S3.head_object(s3_path_lock)
# while meta:
# locked_by_job = meta.get("Metadata", {"job": ""}).get("job", "")
# if locked_by_job:
# decoded_bytes = base64.b64decode(locked_by_job)
# locked_by_job = decoded_bytes.decode("utf-8")
# print(
# f"WARNING: Failed to acquire lock, meta [{meta}], job [{locked_by_job}] - wait"
# )
# i -= 5
# if i < 0:
# info = f"ERROR: lock acquire failure - unlock forcefully"
# print(info)
# env.add_info(info)
# break
# time.sleep(5)
#
# metadata = {"job": Utils.to_base64(env.JOB_NAME)}
# S3.put(
# s3_path=s3_path_lock,
# local_path=file_path_lock,
# metadata=metadata,
# if_none_matched=True,
# )
# time.sleep(1)
# obj = S3.head_object(s3_path_lock)
# if not obj or not obj.has_tags(tags=metadata):
# print(f"WARNING: locked by another job [{obj}]")
# env.add_info("S3 lock file failure")
# cls.lock(s3_path, level=level + 1)
# print("INFO: lock acquired")
#
# @classmethod
# def unlock(cls, s3_path):
# s3_path_lock = s3_path + ".lock"
# env = _Environment.get()
# obj = S3.head_object(s3_path_lock)
# if not obj:
# print("ERROR: lock file is removed")
# assert False # investigate
# elif not obj.has_tags({"job": Utils.to_base64(env.JOB_NAME)}):
# print("ERROR: lock file was acquired by another job")
# assert False # investigate
#
# if not S3.delete(s3_path_lock):
# print(f"ERROR: File [{s3_path_lock}] delete failure")
# print("INFO: lock released")
# return True
@classmethod
def upload_result_files_to_s3(cls, result):
if result.results:
for result_ in result.results:
cls.upload_result_files_to_s3(result_)
for file in result.files:
if not Path(file).is_file():
print(f"ERROR: Invalid file [{file}] in [{result.name}] - skip upload")
result.info += f"\nWARNING: Result file [{file}] was not found"
file_link = S3._upload_file_to_s3(file, upload_to_s3=False)
else:
is_text = False
for text_file_suffix in Settings.TEXT_CONTENT_EXTENSIONS:
if file.endswith(text_file_suffix):
print(
f"File [{file}] matches Settings.TEXT_CONTENT_EXTENSIONS [{Settings.TEXT_CONTENT_EXTENSIONS}] - add text attribute for s3 object"
)
is_text = True
break
file_link = S3._upload_file_to_s3(
file,
upload_to_s3=True,
text=is_text,
s3_subprefix=Utils.normalize_string(result.name),
)
result.links.append(file_link)
if result.files:
print(
f"Result files [{result.files}] uploaded to s3 [{result.links[-len(result.files):]}] - clean files list"
)
result.files = []
result.dump()
@classmethod
def update_workflow_results(cls, workflow_name, new_info="", new_sub_results=None):
assert new_info or new_sub_results
attempt = 1
prev_status = ""
new_status = ""
done = False
while attempt < 10:
version = cls.copy_result_from_s3_with_version(
Result.file_name_static(workflow_name)
)
workflow_result = Result.from_fs(workflow_name)
prev_status = workflow_result.status
if new_info:
workflow_result.set_info(new_info)
if new_sub_results:
if isinstance(new_sub_results, Result):
new_sub_results = [new_sub_results]
for result_ in new_sub_results:
workflow_result.update_sub_result(result_)
new_status = workflow_result.status
if cls.copy_result_to_s3_with_version(workflow_result, version=version + 1):
done = True
break
print(f"Attempt [{attempt}] to upload workflow result failed")
attempt += 1
assert done
if prev_status != new_status:
return new_status
else:
return None

View File

@ -19,7 +19,7 @@ from praktika.utils import Shell, TeePopen, Utils
class Runner:
@staticmethod
def generate_dummy_environment(workflow, job):
def generate_local_run_environment(workflow, job, pr=None, branch=None, sha=None):
print("WARNING: Generate dummy env for local test")
Shell.check(
f"mkdir -p {Settings.TEMP_DIR} {Settings.INPUT_DIR} {Settings.OUTPUT_DIR}"
@ -28,9 +28,9 @@ class Runner:
WORKFLOW_NAME=workflow.name,
JOB_NAME=job.name,
REPOSITORY="",
BRANCH="",
SHA="",
PR_NUMBER=-1,
BRANCH=branch or Settings.MAIN_BRANCH if not pr else "",
SHA=sha or Shell.get_output("git rev-parse HEAD"),
PR_NUMBER=pr or -1,
EVENT_TYPE="",
JOB_OUTPUT_STREAM="",
EVENT_FILE_PATH="",
@ -52,6 +52,7 @@ class Runner:
cache_success=[],
cache_success_base64=[],
cache_artifacts={},
cache_jobs={},
)
for docker in workflow.dockers:
workflow_config.digest_dockers[docker.name] = Digest().calc_docker_digest(
@ -80,13 +81,12 @@ class Runner:
print("Read GH Environment")
env = _Environment.from_env()
env.JOB_NAME = job.name
env.PARAMETER = job.parameter
env.dump()
print(env)
return 0
def _pre_run(self, workflow, job):
def _pre_run(self, workflow, job, local_run=False):
env = _Environment.get()
result = Result(
@ -96,6 +96,7 @@ class Runner:
)
result.dump()
if not local_run:
if workflow.enable_report and job.name != Settings.CI_CONFIG_JOB_NAME:
print("Update Job and Workflow Report")
HtmlRunnerHooks.pre_run(workflow, job)
@ -123,28 +124,48 @@ class Runner:
return 0
def _run(self, workflow, job, docker="", no_docker=False, param=None):
def _run(self, workflow, job, docker="", no_docker=False, param=None, test=""):
# re-set envs for local run
env = _Environment.get()
env.JOB_NAME = job.name
env.dump()
if param:
if not isinstance(param, str):
Utils.raise_with_error(
f"Custom param for local tests must be of type str, got [{type(param)}]"
)
env = _Environment.get()
env.dump()
if job.run_in_docker and not no_docker:
# TODO: add support for any image, including not from ci config (e.g. ubuntu:latest)
docker_tag = RunConfig.from_fs(workflow.name).digest_dockers[
job.run_in_docker
]
docker = docker or f"{job.run_in_docker}:{docker_tag}"
cmd = f"docker run --rm --user \"$(id -u):$(id -g)\" -e PYTHONPATH='{Settings.DOCKER_WD}:{Settings.DOCKER_WD}/ci' --volume ./:{Settings.DOCKER_WD} --volume {Settings.TEMP_DIR}:{Settings.TEMP_DIR} --workdir={Settings.DOCKER_WD} {docker} {job.command}"
job.run_in_docker, docker_settings = (
job.run_in_docker.split("+")[0],
job.run_in_docker.split("+")[1:],
)
from_root = "root" in docker_settings
settings = [s for s in docker_settings if s.startswith("--")]
if ":" in job.run_in_docker:
docker_name, docker_tag = job.run_in_docker.split(":")
print(
f"WARNING: Job [{job.name}] use custom docker image with a tag - praktika won't control docker version"
)
else:
docker_name, docker_tag = (
job.run_in_docker,
RunConfig.from_fs(workflow.name).digest_dockers[job.run_in_docker],
)
docker = docker or f"{docker_name}:{docker_tag}"
cmd = f"docker run --rm --name praktika {'--user $(id -u):$(id -g)' if not from_root else ''} -e PYTHONPATH='{Settings.DOCKER_WD}:{Settings.DOCKER_WD}/ci' --volume ./:{Settings.DOCKER_WD} --volume {Settings.TEMP_DIR}:{Settings.TEMP_DIR} --workdir={Settings.DOCKER_WD} {' '.join(settings)} {docker} {job.command}"
else:
cmd = job.command
python_path = os.getenv("PYTHONPATH", ":")
os.environ["PYTHONPATH"] = f".:{python_path}"
if param:
print(f"Custom --param [{param}] will be passed to job's script")
cmd += f" --param {param}"
if test:
print(f"Custom --test [{test}] will be passed to job's script")
cmd += f" --test {test}"
print(f"--- Run command [{cmd}]")
with TeePopen(cmd, timeout=job.timeout) as process:
@ -219,13 +240,10 @@ class Runner:
print(info)
result.set_info(info).set_status(Result.Status.ERROR).dump()
if not result.is_ok():
result.set_files(files=[Settings.RUN_LOG])
result.update_duration().dump()
if result.info and result.status != Result.Status.SUCCESS:
# provide job info to workflow level
info_errors.append(result.info)
if run_exit_code == 0:
providing_artifacts = []
if job.provides and workflow.artifacts:
@ -285,14 +303,24 @@ class Runner:
return True
def run(
self, workflow, job, docker="", dummy_env=False, no_docker=False, param=None
self,
workflow,
job,
docker="",
local_run=False,
no_docker=False,
param=None,
test="",
pr=None,
sha=None,
branch=None,
):
res = True
setup_env_code = -10
prerun_code = -10
run_code = -10
if res and not dummy_env:
if res and not local_run:
print(
f"\n\n=== Setup env script [{job.name}], workflow [{workflow.name}] ==="
)
@ -309,13 +337,15 @@ class Runner:
traceback.print_exc()
print(f"=== Setup env finished ===\n\n")
else:
self.generate_dummy_environment(workflow, job)
self.generate_local_run_environment(
workflow, job, pr=pr, branch=branch, sha=sha
)
if res and not dummy_env:
if res and (not local_run or pr or sha or branch):
res = False
print(f"=== Pre run script [{job.name}], workflow [{workflow.name}] ===")
try:
prerun_code = self._pre_run(workflow, job)
prerun_code = self._pre_run(workflow, job, local_run=local_run)
res = prerun_code == 0
if not res:
print(f"ERROR: Pre-run failed with exit code [{prerun_code}]")
@ -329,7 +359,12 @@ class Runner:
print(f"=== Run script [{job.name}], workflow [{workflow.name}] ===")
try:
run_code = self._run(
workflow, job, docker=docker, no_docker=no_docker, param=param
workflow,
job,
docker=docker,
no_docker=no_docker,
param=param,
test=test,
)
res = run_code == 0
if not res:
@ -339,7 +374,7 @@ class Runner:
traceback.print_exc()
print(f"=== Run scrip finished ===\n\n")
if not dummy_env:
if not local_run:
print(f"=== Post run script [{job.name}], workflow [{workflow.name}] ===")
self._post_run(workflow, job, setup_env_code, prerun_code, run_code)
print(f"=== Post run scrip finished ===")

View File

@ -15,17 +15,23 @@ class RunConfig(MetaClasses.Serializable):
# there are might be issue with special characters in job names if used directly in yaml syntax - create base64 encoded list to avoid this
cache_success_base64: List[str]
cache_artifacts: Dict[str, Cache.CacheRecord]
cache_jobs: Dict[str, Cache.CacheRecord]
sha: str
@classmethod
def from_dict(cls, obj):
cache_artifacts = obj["cache_artifacts"]
cache_jobs = obj["cache_jobs"]
cache_artifacts_deserialized = {}
cache_jobs_deserialized = {}
for artifact_name, cache_artifact in cache_artifacts.items():
cache_artifacts_deserialized[artifact_name] = Cache.CacheRecord.from_dict(
cache_artifact
)
obj["cache_artifacts"] = cache_artifacts_deserialized
for job_name, cache_jobs in cache_jobs.items():
cache_jobs_deserialized[job_name] = Cache.CacheRecord.from_dict(cache_jobs)
obj["cache_jobs"] = cache_artifacts_deserialized
return RunConfig(**obj)
@classmethod

View File

@ -1,12 +1,11 @@
import dataclasses
import json
import time
from pathlib import Path
from typing import Dict
from praktika._environment import _Environment
from praktika.settings import Settings
from praktika.utils import Shell, Utils
from praktika.utils import Shell
class S3:
@ -52,23 +51,22 @@ class S3:
cmd += " --content-type text/plain"
res = cls.run_command_with_retries(cmd)
if not res:
raise
raise RuntimeError()
bucket = s3_path.split("/")[0]
endpoint = Settings.S3_BUCKET_TO_HTTP_ENDPOINT[bucket]
assert endpoint
return f"https://{s3_full_path}".replace(bucket, endpoint)
@classmethod
def put(cls, s3_path, local_path, text=False, metadata=None):
def put(cls, s3_path, local_path, text=False, metadata=None, if_none_matched=False):
assert Path(local_path).exists(), f"Path [{local_path}] does not exist"
assert Path(s3_path), f"Invalid S3 Path [{s3_path}]"
assert Path(
local_path
).is_file(), f"Path [{local_path}] is not file. Only files are supported"
file_name = Path(local_path).name
s3_full_path = s3_path
if not s3_full_path.endswith(file_name):
s3_full_path = f"{s3_path}/{Path(local_path).name}"
if s3_full_path.endswith("/"):
s3_full_path = f"{s3_path}{Path(local_path).name}"
s3_full_path = str(s3_full_path).removeprefix("s3://")
bucket, key = s3_full_path.split("/", maxsplit=1)
@ -76,6 +74,8 @@ class S3:
command = (
f"aws s3api put-object --bucket {bucket} --key {key} --body {local_path}"
)
if if_none_matched:
command += f' --if-none-match "*"'
if metadata:
for k, v in metadata.items():
command += f" --metadata {k}={v}"
@ -84,7 +84,7 @@ class S3:
if text:
cmd += " --content-type text/plain"
res = cls.run_command_with_retries(command)
assert res
return res
@classmethod
def run_command_with_retries(cls, command, retries=Settings.MAX_RETRIES_S3):
@ -101,6 +101,14 @@ class S3:
elif "does not exist" in stderr:
print("ERROR: requested file does not exist")
break
elif "Unknown options" in stderr:
print("ERROR: Invalid AWS CLI command or CLI client version:")
print(f" | awc error: {stderr}")
break
elif "PreconditionFailed" in stderr:
print("ERROR: AWS API Call Precondition Failed")
print(f" | awc error: {stderr}")
break
if ret_code != 0:
print(
f"ERROR: aws s3 cp failed, stdout/stderr err: [{stderr}], out [{stdout}]"
@ -108,13 +116,6 @@ class S3:
res = ret_code == 0
return res
@classmethod
def get_link(cls, s3_path, local_path):
s3_full_path = f"{s3_path}/{Path(local_path).name}"
bucket = s3_path.split("/")[0]
endpoint = Settings.S3_BUCKET_TO_HTTP_ENDPOINT[bucket]
return f"https://{s3_full_path}".replace(bucket, endpoint)
@classmethod
def copy_file_from_s3(cls, s3_path, local_path):
assert Path(s3_path), f"Invalid S3 Path [{s3_path}]"
@ -128,6 +129,19 @@ class S3:
res = cls.run_command_with_retries(cmd)
return res
@classmethod
def copy_file_from_s3_matching_pattern(
cls, s3_path, local_path, include, exclude="*"
):
assert Path(s3_path), f"Invalid S3 Path [{s3_path}]"
assert Path(
local_path
).is_dir(), f"Path [{local_path}] does not exist or not a directory"
assert s3_path.endswith("/"), f"s3 path is invalid [{s3_path}]"
cmd = f'aws s3 cp s3://{s3_path} {local_path} --exclude "{exclude}" --include "{include}" --recursive'
res = cls.run_command_with_retries(cmd)
return res
@classmethod
def head_object(cls, s3_path):
s3_path = str(s3_path).removeprefix("s3://")
@ -148,103 +162,6 @@ class S3:
verbose=True,
)
# TODO: apparently should be placed into separate file to be used only inside praktika
# keeping this module clean from importing Settings, Environment and etc, making it easy for use externally
@classmethod
def copy_result_to_s3(cls, result, unlock=True):
result.dump()
env = _Environment.get()
s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}"
s3_path_full = f"{s3_path}/{Path(result.file_name()).name}"
url = S3.copy_file_to_s3(s3_path=s3_path, local_path=result.file_name())
if env.PR_NUMBER:
print("Duplicate Result for latest commit alias in PR")
s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix(latest=True)}"
url = S3.copy_file_to_s3(s3_path=s3_path, local_path=result.file_name())
if unlock:
if not cls.unlock(s3_path_full):
print(f"ERROR: File [{s3_path_full}] unlock failure")
assert False # TODO: investigate
return url
@classmethod
def copy_result_from_s3(cls, local_path, lock=True):
env = _Environment.get()
file_name = Path(local_path).name
s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}/{file_name}"
if lock:
cls.lock(s3_path)
if not S3.copy_file_from_s3(s3_path=s3_path, local_path=local_path):
print(f"ERROR: failed to cp file [{s3_path}] from s3")
raise
@classmethod
def lock(cls, s3_path, level=0):
assert level < 3, "Never"
env = _Environment.get()
s3_path_lock = s3_path + f".lock"
file_path_lock = f"{Settings.TEMP_DIR}/{Path(s3_path_lock).name}"
assert Shell.check(
f"echo '''{env.JOB_NAME}''' > {file_path_lock}", verbose=True
), "Never"
i = 20
meta = S3.head_object(s3_path_lock)
while meta:
print(f"WARNING: Failed to acquire lock, meta [{meta}] - wait")
i -= 5
if i < 0:
info = f"ERROR: lock acquire failure - unlock forcefully"
print(info)
env.add_info(info)
break
time.sleep(5)
metadata = {"job": Utils.to_base64(env.JOB_NAME)}
S3.put(
s3_path=s3_path_lock,
local_path=file_path_lock,
metadata=metadata,
)
time.sleep(1)
obj = S3.head_object(s3_path_lock)
if not obj or not obj.has_tags(tags=metadata):
print(f"WARNING: locked by another job [{obj}]")
env.add_info("S3 lock file failure")
cls.lock(s3_path, level=level + 1)
print("INFO: lock acquired")
@classmethod
def unlock(cls, s3_path):
s3_path_lock = s3_path + ".lock"
env = _Environment.get()
obj = S3.head_object(s3_path_lock)
if not obj:
print("ERROR: lock file is removed")
assert False # investigate
elif not obj.has_tags({"job": Utils.to_base64(env.JOB_NAME)}):
print("ERROR: lock file was acquired by another job")
assert False # investigate
if not S3.delete(s3_path_lock):
print(f"ERROR: File [{s3_path_lock}] delete failure")
print("INFO: lock released")
return True
@classmethod
def get_result_link(cls, result):
env = _Environment.get()
s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix(latest=True if env.PR_NUMBER else False)}"
return S3.get_link(s3_path=s3_path, local_path=result.file_name())
@classmethod
def clean_latest_result(cls):
env = _Environment.get()
env.SHA = "latest"
assert env.PR_NUMBER
s3_path = f"{Settings.HTML_S3_PATH}/{env.get_s3_prefix()}"
S3.clean_s3_directory(s3_path=s3_path)
@classmethod
def _upload_file_to_s3(
cls, local_file_path, upload_to_s3: bool, text: bool = False, s3_subprefix=""
@ -260,36 +177,3 @@ class S3:
)
return html_link
return f"file://{Path(local_file_path).absolute()}"
@classmethod
def upload_result_files_to_s3(cls, result):
if result.results:
for result_ in result.results:
cls.upload_result_files_to_s3(result_)
for file in result.files:
if not Path(file).is_file():
print(f"ERROR: Invalid file [{file}] in [{result.name}] - skip upload")
result.info += f"\nWARNING: Result file [{file}] was not found"
file_link = cls._upload_file_to_s3(file, upload_to_s3=False)
else:
is_text = False
for text_file_suffix in Settings.TEXT_CONTENT_EXTENSIONS:
if file.endswith(text_file_suffix):
print(
f"File [{file}] matches Settings.TEXT_CONTENT_EXTENSIONS [{Settings.TEXT_CONTENT_EXTENSIONS}] - add text attribute for s3 object"
)
is_text = True
break
file_link = cls._upload_file_to_s3(
file,
upload_to_s3=True,
text=is_text,
s3_subprefix=Utils.normalize_string(result.name),
)
result.links.append(file_link)
if result.files:
print(
f"Result files [{result.files}] uploaded to s3 [{result.links[-len(result.files):]}] - clean files list"
)
result.files = []
result.dump()

View File

@ -1,8 +1,152 @@
from praktika._settings import _Settings
from praktika.mangle import _get_user_settings
import dataclasses
import importlib.util
from pathlib import Path
from typing import Dict, Iterable, List, Optional
Settings = _Settings()
user_settings = _get_user_settings()
for setting, value in user_settings.items():
Settings.__setattr__(setting, value)
@dataclasses.dataclass
class _Settings:
######################################
# Pipeline generation settings #
######################################
MAIN_BRANCH = "main"
CI_PATH = "./ci"
WORKFLOW_PATH_PREFIX: str = "./.github/workflows"
WORKFLOWS_DIRECTORY: str = f"{CI_PATH}/workflows"
SETTINGS_DIRECTORY: str = f"{CI_PATH}/settings"
CI_CONFIG_JOB_NAME = "Config Workflow"
DOCKER_BUILD_JOB_NAME = "Docker Builds"
FINISH_WORKFLOW_JOB_NAME = "Finish Workflow"
READY_FOR_MERGE_STATUS_NAME = "Ready for Merge"
CI_CONFIG_RUNS_ON: Optional[List[str]] = None
DOCKER_BUILD_RUNS_ON: Optional[List[str]] = None
VALIDATE_FILE_PATHS: bool = True
######################################
# Runtime Settings #
######################################
MAX_RETRIES_S3 = 3
MAX_RETRIES_GH = 3
######################################
# S3 (artifact storage) settings #
######################################
S3_ARTIFACT_PATH: str = ""
######################################
# CI workspace settings #
######################################
TEMP_DIR: str = "/tmp/praktika"
OUTPUT_DIR: str = f"{TEMP_DIR}/output"
INPUT_DIR: str = f"{TEMP_DIR}/input"
PYTHON_INTERPRETER: str = "python3"
PYTHON_PACKET_MANAGER: str = "pip3"
PYTHON_VERSION: str = "3.9"
INSTALL_PYTHON_FOR_NATIVE_JOBS: bool = False
INSTALL_PYTHON_REQS_FOR_NATIVE_JOBS: str = "./ci/requirements.txt"
ENVIRONMENT_VAR_FILE: str = f"{TEMP_DIR}/environment.json"
RUN_LOG: str = f"{TEMP_DIR}/praktika_run.log"
SECRET_GH_APP_ID: str = "GH_APP_ID"
SECRET_GH_APP_PEM_KEY: str = "GH_APP_PEM_KEY"
ENV_SETUP_SCRIPT: str = "/tmp/praktika_setup_env.sh"
WORKFLOW_STATUS_FILE: str = f"{TEMP_DIR}/workflow_status.json"
######################################
# CI Cache settings #
######################################
CACHE_VERSION: int = 1
CACHE_DIGEST_LEN: int = 20
CACHE_S3_PATH: str = ""
CACHE_LOCAL_PATH: str = f"{TEMP_DIR}/ci_cache"
######################################
# Report settings #
######################################
HTML_S3_PATH: str = ""
HTML_PAGE_FILE: str = "./praktika/json.html"
TEXT_CONTENT_EXTENSIONS: Iterable[str] = frozenset([".txt", ".log"])
S3_BUCKET_TO_HTTP_ENDPOINT: Optional[Dict[str, str]] = None
DOCKERHUB_USERNAME: str = ""
DOCKERHUB_SECRET: str = ""
DOCKER_WD: str = "/wd"
######################################
# CI DB Settings #
######################################
SECRET_CI_DB_URL: str = "CI_DB_URL"
SECRET_CI_DB_PASSWORD: str = "CI_DB_PASSWORD"
CI_DB_DB_NAME = ""
CI_DB_TABLE_NAME = ""
CI_DB_INSERT_TIMEOUT_SEC = 5
DISABLE_MERGE_COMMIT = True
_USER_DEFINED_SETTINGS = [
"S3_ARTIFACT_PATH",
"CACHE_S3_PATH",
"HTML_S3_PATH",
"S3_BUCKET_TO_HTTP_ENDPOINT",
"TEXT_CONTENT_EXTENSIONS",
"TEMP_DIR",
"OUTPUT_DIR",
"INPUT_DIR",
"CI_CONFIG_RUNS_ON",
"DOCKER_BUILD_RUNS_ON",
"CI_CONFIG_JOB_NAME",
"PYTHON_INTERPRETER",
"PYTHON_VERSION",
"PYTHON_PACKET_MANAGER",
"INSTALL_PYTHON_FOR_NATIVE_JOBS",
"INSTALL_PYTHON_REQS_FOR_NATIVE_JOBS",
"MAX_RETRIES_S3",
"MAX_RETRIES_GH",
"VALIDATE_FILE_PATHS",
"DOCKERHUB_USERNAME",
"DOCKERHUB_SECRET",
"READY_FOR_MERGE_STATUS_NAME",
"SECRET_CI_DB_URL",
"SECRET_CI_DB_PASSWORD",
"CI_DB_DB_NAME",
"CI_DB_TABLE_NAME",
"CI_DB_INSERT_TIMEOUT_SEC",
"SECRET_GH_APP_PEM_KEY",
"SECRET_GH_APP_ID",
"MAIN_BRANCH",
"DISABLE_MERGE_COMMIT",
]
def _get_settings() -> _Settings:
res = _Settings()
directory = Path(_Settings.SETTINGS_DIRECTORY)
for py_file in directory.glob("*.py"):
module_name = py_file.name.removeprefix(".py")
spec = importlib.util.spec_from_file_location(
module_name, f"{_Settings.SETTINGS_DIRECTORY}/{module_name}"
)
assert spec
foo = importlib.util.module_from_spec(spec)
assert spec.loader
spec.loader.exec_module(foo)
for setting in _USER_DEFINED_SETTINGS:
try:
value = getattr(foo, setting)
res.__setattr__(setting, value)
# print(f"- read user defined setting [{setting} = {value}]")
except Exception as e:
# print(f"Exception while read user settings: {e}")
pass
return res
class GHRunners:
ubuntu = "ubuntu-latest"
Settings = _get_settings()

View File

@ -17,8 +17,6 @@ from threading import Thread
from types import SimpleNamespace
from typing import Any, Dict, Iterator, List, Optional, Type, TypeVar, Union
from praktika._settings import _Settings
T = TypeVar("T", bound="Serializable")
@ -81,24 +79,25 @@ class MetaClasses:
class ContextManager:
@staticmethod
@contextmanager
def cd(to: Optional[Union[Path, str]] = None) -> Iterator[None]:
def cd(to: Optional[Union[Path, str]]) -> Iterator[None]:
"""
changes current working directory to @path or `git root` if @path is None
:param to:
:return:
"""
if not to:
try:
to = Shell.get_output_or_raise("git rev-parse --show-toplevel")
except:
pass
if not to:
if Path(_Settings.DOCKER_WD).is_dir():
to = _Settings.DOCKER_WD
if not to:
assert False, "FIX IT"
assert to
# if not to:
# try:
# to = Shell.get_output_or_raise("git rev-parse --show-toplevel")
# except:
# pass
# if not to:
# if Path(_Settings.DOCKER_WD).is_dir():
# to = _Settings.DOCKER_WD
# if not to:
# assert False, "FIX IT"
# assert to
old_pwd = os.getcwd()
if to:
os.chdir(to)
try:
yield

View File

@ -4,10 +4,8 @@ from itertools import chain
from pathlib import Path
from praktika import Workflow
from praktika._settings import GHRunners
from praktika.mangle import _get_workflows
from praktika.settings import Settings
from praktika.utils import ContextManager
from praktika.settings import GHRunners, Settings
class Validator:
@ -119,7 +117,6 @@ class Validator:
def validate_file_paths_in_run_command(cls, workflow: Workflow.Config) -> None:
if not Settings.VALIDATE_FILE_PATHS:
return
with ContextManager.cd():
for job in workflow.jobs:
run_command = job.command
command_parts = run_command.split(" ")
@ -135,7 +132,6 @@ class Validator:
def validate_file_paths_in_digest_configs(cls, workflow: Workflow.Config) -> None:
if not Settings.VALIDATE_FILE_PATHS:
return
with ContextManager.cd():
for job in workflow.jobs:
if not job.digest_config:
continue
@ -153,7 +149,6 @@ class Validator:
@classmethod
def validate_requirements_txt_files(cls, workflow: Workflow.Config) -> None:
with ContextManager.cd():
for job in workflow.jobs:
if job.job_requirements:
if job.job_requirements.python_requirements_txt:
@ -171,9 +166,7 @@ class Validator:
"\n echo requests==2.32.3 >> ./ci/requirements.txt"
)
message += "\n echo https://clickhouse-builds.s3.amazonaws.com/packages/praktika-0.1-py3-none-any.whl >> ./ci/requirements.txt"
cls.evaluate_check(
path.is_file(), message, job.name, workflow.name
)
cls.evaluate_check(path.is_file(), message, job.name, workflow.name)
@classmethod
def validate_dockers(cls, workflow: Workflow.Config):

View File

@ -31,6 +31,7 @@ class Workflow:
enable_report: bool = False
enable_merge_ready_status: bool = False
enable_cidb: bool = False
enable_merge_commit: bool = False
def is_event_pull_request(self):
return self.event == Workflow.Event.PULL_REQUEST

View File

@ -80,6 +80,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{{{ github.head_ref }}}}
{JOB_ADDONS}
- name: Prepare env script
run: |
@ -102,7 +104,11 @@ jobs:
run: |
. /tmp/praktika_setup_env.sh
set -o pipefail
{PYTHON} -m praktika run --job '''{JOB_NAME}''' --workflow "{WORKFLOW_NAME}" --ci |& tee {RUN_LOG}
if command -v ts &> /dev/null; then
python3 -m praktika run --job '''{JOB_NAME}''' --workflow "{WORKFLOW_NAME}" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee /tmp/praktika/praktika_run.log
else
python3 -m praktika run --job '''{JOB_NAME}''' --workflow "{WORKFLOW_NAME}" --ci |& tee /tmp/praktika/praktika_run.log
fi
{UPLOADS_GITHUB}\
"""
@ -184,11 +190,9 @@ jobs:
False
), f"Workflow event not yet supported [{workflow_config.event}]"
with ContextManager.cd():
with open(self._get_workflow_file_name(workflow_config.name), "w") as f:
f.write(yaml_workflow_str)
with ContextManager.cd():
Shell.check("git add ./.github/workflows/*.yaml")

View File

@ -7,24 +7,33 @@ S3_BUCKET_HTTP_ENDPOINT = "clickhouse-builds.s3.amazonaws.com"
class RunnerLabels:
CI_SERVICES = "ci_services"
CI_SERVICES_EBS = "ci_services_ebs"
BUILDER = "builder"
BUILDER_AMD = "builder"
BUILDER_ARM = "builder-aarch64"
FUNC_TESTER_AMD = "func-tester"
FUNC_TESTER_ARM = "func-tester-aarch64"
BASE_BRANCH = "master"
azure_secret = Secret.Config(
name="azure_connection_string",
type=Secret.Type.AWS_SSM_VAR,
)
SECRETS = [
Secret.Config(
name="dockerhub_robot_password",
type=Secret.Type.AWS_SSM_VAR,
),
Secret.Config(
name="woolenwolf_gh_app.clickhouse-app-id",
type=Secret.Type.AWS_SSM_SECRET,
),
Secret.Config(
name="woolenwolf_gh_app.clickhouse-app-key",
type=Secret.Type.AWS_SSM_SECRET,
),
azure_secret,
# Secret.Config(
# name="woolenwolf_gh_app.clickhouse-app-id",
# type=Secret.Type.AWS_SSM_SECRET,
# ),
# Secret.Config(
# name="woolenwolf_gh_app.clickhouse-app-key",
# type=Secret.Type.AWS_SSM_SECRET,
# ),
]
DOCKERS = [
@ -118,18 +127,18 @@ DOCKERS = [
# platforms=Docker.Platforms.arm_amd,
# depends_on=["clickhouse/test-base"],
# ),
# Docker.Config(
# name="clickhouse/stateless-test",
# path="./ci/docker/test/stateless",
# platforms=Docker.Platforms.arm_amd,
# depends_on=["clickhouse/test-base"],
# ),
# Docker.Config(
# name="clickhouse/stateful-test",
# path="./ci/docker/test/stateful",
# platforms=Docker.Platforms.arm_amd,
# depends_on=["clickhouse/stateless-test"],
# ),
Docker.Config(
name="clickhouse/stateless-test",
path="./ci/docker/stateless-test",
platforms=Docker.Platforms.arm_amd,
depends_on=[],
),
Docker.Config(
name="clickhouse/stateful-test",
path="./ci/docker/stateful-test",
platforms=Docker.Platforms.arm_amd,
depends_on=["clickhouse/stateless-test"],
),
# Docker.Config(
# name="clickhouse/stress-test",
# path="./ci/docker/test/stress",
@ -230,4 +239,6 @@ DOCKERS = [
class JobNames:
STYLE_CHECK = "Style Check"
FAST_TEST = "Fast test"
BUILD_AMD_DEBUG = "Build amd64 debug"
BUILD = "Build"
STATELESS = "Stateless tests"
STATEFUL = "Stateful tests"

View File

@ -4,6 +4,8 @@ from ci.settings.definitions import (
RunnerLabels,
)
MAIN_BRANCH = "master"
S3_ARTIFACT_PATH = f"{S3_BUCKET_NAME}/artifacts"
CI_CONFIG_RUNS_ON = [RunnerLabels.CI_SERVICES]
DOCKER_BUILD_RUNS_ON = [RunnerLabels.CI_SERVICES_EBS]

View File

@ -1,5 +1,3 @@
from typing import List
from praktika import Artifact, Job, Workflow
from praktika.settings import Settings
@ -13,7 +11,10 @@ from ci.settings.definitions import (
class ArtifactNames:
ch_debug_binary = "clickhouse_debug_binary"
CH_AMD_DEBUG = "CH_AMD_DEBUG"
CH_AMD_RELEASE = "CH_AMD_RELEASE"
CH_ARM_RELEASE = "CH_ARM_RELEASE"
CH_ARM_ASAN = "CH_ARM_ASAN"
style_check_job = Job.Config(
@ -25,7 +26,7 @@ style_check_job = Job.Config(
fast_test_job = Job.Config(
name=JobNames.FAST_TEST,
runs_on=[RunnerLabels.BUILDER],
runs_on=[RunnerLabels.BUILDER_AMD],
command="python3 ./ci/jobs/fast_test.py",
run_in_docker="clickhouse/fasttest",
digest_config=Job.CacheDigestConfig(
@ -37,11 +38,13 @@ fast_test_job = Job.Config(
),
)
job_build_amd_debug = Job.Config(
name=JobNames.BUILD_AMD_DEBUG,
runs_on=[RunnerLabels.BUILDER],
command="python3 ./ci/jobs/build_clickhouse.py amd_debug",
build_jobs = Job.Config(
name=JobNames.BUILD,
runs_on=["...from params..."],
requires=[JobNames.FAST_TEST],
command="python3 ./ci/jobs/build_clickhouse.py --build-type {PARAMETER}",
run_in_docker="clickhouse/fasttest",
timeout=3600 * 2,
digest_config=Job.CacheDigestConfig(
include_paths=[
"./src",
@ -54,9 +57,85 @@ job_build_amd_debug = Job.Config(
"./docker/packager/packager",
"./rust",
"./tests/ci/version_helper.py",
"./ci/jobs/build_clickhouse.py",
],
),
provides=[ArtifactNames.ch_debug_binary],
).parametrize(
parameter=["amd_debug", "amd_release", "arm_release", "arm_asan"],
provides=[
[ArtifactNames.CH_AMD_DEBUG],
[ArtifactNames.CH_AMD_RELEASE],
[ArtifactNames.CH_ARM_RELEASE],
[ArtifactNames.CH_ARM_ASAN],
],
runs_on=[
[RunnerLabels.BUILDER_AMD],
[RunnerLabels.BUILDER_AMD],
[RunnerLabels.BUILDER_ARM],
[RunnerLabels.BUILDER_ARM],
],
)
stateless_tests_jobs = Job.Config(
name=JobNames.STATELESS,
runs_on=[RunnerLabels.BUILDER_AMD],
command="python3 ./ci/jobs/functional_stateless_tests.py --test-options {PARAMETER}",
# many tests expect to see "/var/lib/clickhouse" in various output lines - add mount for now, consider creating this dir in docker file
run_in_docker="clickhouse/stateless-test+--security-opt seccomp=unconfined",
digest_config=Job.CacheDigestConfig(
include_paths=[
"./ci/jobs/functional_stateless_tests.py",
],
),
).parametrize(
parameter=[
"amd_debug,parallel",
"amd_debug,non-parallel",
"amd_release,parallel",
"amd_release,non-parallel",
"arm_asan,parallel",
"arm_asan,non-parallel",
],
runs_on=[
[RunnerLabels.BUILDER_AMD],
[RunnerLabels.FUNC_TESTER_AMD],
[RunnerLabels.BUILDER_AMD],
[RunnerLabels.FUNC_TESTER_AMD],
[RunnerLabels.BUILDER_ARM],
[RunnerLabels.FUNC_TESTER_ARM],
],
requires=[
[ArtifactNames.CH_AMD_DEBUG],
[ArtifactNames.CH_AMD_DEBUG],
[ArtifactNames.CH_AMD_RELEASE],
[ArtifactNames.CH_AMD_RELEASE],
[ArtifactNames.CH_ARM_ASAN],
[ArtifactNames.CH_ARM_ASAN],
],
)
stateful_tests_jobs = Job.Config(
name=JobNames.STATEFUL,
runs_on=[RunnerLabels.BUILDER_AMD],
command="python3 ./ci/jobs/functional_stateful_tests.py --test-options {PARAMETER}",
# many tests expect to see "/var/lib/clickhouse"
# some tests expect to see "/var/log/clickhouse"
run_in_docker="clickhouse/stateless-test+--security-opt seccomp=unconfined",
digest_config=Job.CacheDigestConfig(
include_paths=[
"./ci/jobs/functional_stateful_tests.py",
],
),
).parametrize(
parameter=[
"amd_debug,parallel",
],
runs_on=[
[RunnerLabels.BUILDER_AMD],
],
requires=[
[ArtifactNames.CH_AMD_DEBUG],
],
)
workflow = Workflow.Config(
@ -66,14 +145,31 @@ workflow = Workflow.Config(
jobs=[
style_check_job,
fast_test_job,
job_build_amd_debug,
*build_jobs,
*stateless_tests_jobs,
*stateful_tests_jobs,
],
artifacts=[
Artifact.Config(
name=ArtifactNames.ch_debug_binary,
name=ArtifactNames.CH_AMD_DEBUG,
type=Artifact.Type.S3,
path=f"{Settings.TEMP_DIR}/build/programs/clickhouse",
)
),
Artifact.Config(
name=ArtifactNames.CH_AMD_RELEASE,
type=Artifact.Type.S3,
path=f"{Settings.TEMP_DIR}/build/programs/clickhouse",
),
Artifact.Config(
name=ArtifactNames.CH_ARM_RELEASE,
type=Artifact.Type.S3,
path=f"{Settings.TEMP_DIR}/build/programs/clickhouse",
),
Artifact.Config(
name=ArtifactNames.CH_ARM_ASAN,
type=Artifact.Type.S3,
path=f"{Settings.TEMP_DIR}/build/programs/clickhouse",
),
],
dockers=DOCKERS,
secrets=SECRETS,
@ -84,11 +180,14 @@ workflow = Workflow.Config(
WORKFLOWS = [
workflow,
] # type: List[Workflow.Config]
]
if __name__ == "__main__":
# local job test inside praktika environment
from praktika.runner import Runner
Runner().run(workflow, fast_test_job, docker="fasttest", dummy_env=True)
# if __name__ == "__main__":
# # local job test inside praktika environment
# from praktika.runner import Runner
# from praktika.digest import Digest
#
# print(Digest().calc_job_digest(amd_debug_build_job))
#
# Runner().run(workflow, fast_test_job, docker="fasttest", local_run=True)

View File

@ -74,6 +74,7 @@ elseif (ARCH_AARCH64)
# introduced as optional, either in v8.2 [7] or in v8.4 [8].
# rcpc: Load-Acquire RCpc Register. Better support of release/acquire of atomics. Good for allocators and high contention code.
# Optional in v8.2, mandatory in v8.3 [9]. Supported in Graviton >=2, Azure and GCP instances.
# bf16: Bfloat16, a half-precision floating point format developed by Google Brain. Optional in v8.2, mandatory in v8.6.
#
# [1] https://github.com/aws/aws-graviton-getting-started/blob/main/c-c%2B%2B.md
# [2] https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/making-the-most-of-the-arm-architecture-in-gcc-10
@ -85,7 +86,7 @@ elseif (ARCH_AARCH64)
# [8] https://developer.arm.com/documentation/102651/a/What-are-dot-product-intructions-
# [9] https://developer.arm.com/documentation/dui0801/g/A64-Data-Transfer-Instructions/LDAPR?lang=en
# [10] https://github.com/aws/aws-graviton-getting-started/blob/main/README.md
set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=armv8.2-a+simd+crypto+dotprod+ssbs+rcpc")
set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=armv8.2-a+simd+crypto+dotprod+ssbs+rcpc+bf16")
endif ()
# Best-effort check: The build generates and executes intermediate binaries, e.g. protoc and llvm-tablegen. If we build on ARM for ARM

View File

@ -3,8 +3,7 @@
set (DEFAULT_LIBS "-nodefaultlibs")
# We need builtins from Clang's RT even without libcxx - for ubsan+int128.
# See https://bugs.llvm.org/show_bug.cgi?id=16404
# We need builtins from Clang
execute_process (COMMAND
${CMAKE_CXX_COMPILER} --target=${CMAKE_CXX_COMPILER_TARGET} --print-libgcc-file-name --rtlib=compiler-rt
OUTPUT_VARIABLE BUILTINS_LIBRARY

View File

@ -217,7 +217,11 @@ add_contrib (libssh-cmake libssh)
add_contrib (prometheus-protobufs-cmake prometheus-protobufs prometheus-protobufs-gogo)
add_contrib(numactl-cmake numactl)
add_contrib (numactl-cmake numactl)
add_contrib (google-cloud-cpp-cmake google-cloud-cpp) # requires grpc, protobuf, absl
add_contrib (jwt-cpp-cmake jwt-cpp)
# Put all targets defined here and in subdirectories under "contrib/<immediate-subdir>" folders in GUI-based IDEs.
# Some of third-party projects may override CMAKE_FOLDER or FOLDER property of their targets, so they would not appear

2
contrib/SimSIMD vendored

@ -1 +1 @@
Subproject commit 935fef2964bc38e995c5f465b42259a35b8cf0d3
Subproject commit fa60f1b8e3582c50978f0ae86c2ebb6c9af957f3

View File

@ -1,4 +1,8 @@
set(SIMSIMD_PROJECT_DIR "${ClickHouse_SOURCE_DIR}/contrib/SimSIMD")
add_library(_simsimd INTERFACE)
target_include_directories(_simsimd SYSTEM INTERFACE "${SIMSIMD_PROJECT_DIR}/include")
# See contrib/usearch-cmake/CMakeLists.txt, why only enabled on x86
if (ARCH_AMD64)
set(SIMSIMD_PROJECT_DIR "${ClickHouse_SOURCE_DIR}/contrib/SimSIMD")
set(SIMSIMD_SRCS ${SIMSIMD_PROJECT_DIR}/c/lib.c)
add_library(_simsimd ${SIMSIMD_SRCS})
target_include_directories(_simsimd SYSTEM PUBLIC "${SIMSIMD_PROJECT_DIR}/include")
target_compile_definitions(_simsimd PUBLIC SIMSIMD_DYNAMIC_DISPATCH)
endif()

1
contrib/google-cloud-cpp vendored Submodule

@ -0,0 +1 @@
Subproject commit 83f30caadb8613fb5c408d8c2fd545291596b53f

View File

@ -0,0 +1,105 @@
set(ENABLE_GOOGLE_CLOUD_CPP_DEFAULT OFF)
if(ENABLE_LIBRARIES AND CLICKHOUSE_CLOUD AND OS_LINUX)
set(ENABLE_GOOGLE_CLOUD_CPP_DEFAULT ON)
endif()
option(ENABLE_GOOGLE_CLOUD_CPP "Enable Google Cloud Cpp" ${ENABLE_GOOGLE_CLOUD_CPP_DEFAULT})
if(NOT ENABLE_GOOGLE_CLOUD_CPP)
message(STATUS "Not using Google Cloud Cpp")
return()
endif()
if(NOT ENABLE_GRPC)
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use Google Cloud Cpp without gRPC")
endif()
if (NOT ENABLE_PROTOBUF)
message( ${RECONFIGURE_MESSAGE_LEVEL} "Can't use Google Cloud Cpp without protobuf")
endif()
# Gather sources and options.
set(GOOGLE_CLOUD_CPP_SOURCES)
set(GOOGLE_CLOUD_CPP_PUBLIC_INCLUDES)
set(GOOGLE_CLOUD_CPP_PRIVATE_INCLUDES)
set(GOOGLE_CLOUD_CPP_PRIVATE_LIBS)
# Directories.
SET(GOOGLE_CLOUD_CPP_DIR "${ClickHouse_SOURCE_DIR}/contrib/google-cloud-cpp" )
list(APPEND GOOGLE_CLOUD_CPP_PRIVATE_INCLUDES "${GOOGLE_CLOUD_CPP_DIR}")
# Set the PROJECT_SOURCE_DIR so that all Google Cloud cmake files work
set(PROJECT_SOURCE_DIR_BAK ${PROJECT_SOURCE_DIR})
set(PROJECT_SOURCE_DIR ${GOOGLE_CLOUD_CPP_DIR})
list(APPEND CMAKE_MODULE_PATH "${GOOGLE_CLOUD_CPP_DIR}/cmake")
# Building this target results in all protobufs being compiled.
add_custom_target(google-cloud-cpp-protos)
include("GoogleCloudCppLibrary")
# Set some variables required for googleapis CMakeLists.txt to work.
set(GOOGLE_CLOUD_CPP_ENABLE_GRPC ON)
set(PROJECT_VERSION "1")
set(PROJECT_VERSION_MAJOR "1")
set(PROTO_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/google-protobuf/src")
set(GOOGLE_CLOUD_CPP_GRPC_PLUGIN_EXECUTABLE $<TARGET_FILE:grpc_cpp_plugin>)
include(GoogleApis.cmake)
add_library(gRPC::grpc++ ALIAS _ch_contrib_grpc)
add_library(gRPC::grpc ALIAS _ch_contrib_grpc)
# google-cloud-cpp-kms.
google_cloud_cpp_add_library_protos(kms)
include(google_cloud_cpp_common.cmake)
include(google_cloud_cpp_grpc_utils.cmake)
SET(GOOGLE_CLOUD_CPP_KMS_DIR "${GOOGLE_CLOUD_CPP_DIR}/google/cloud/kms")
file(GLOB GOOGLE_CLOUD_CPP_KMS_SRC
"${GOOGLE_CLOUD_CPP_KMS_DIR}/v1/*.cc"
"${GOOGLE_CLOUD_CPP_KMS_DIR}/v1/internal/*.cc"
"${GOOGLE_CLOUD_CPP_KMS_DIR}/inventory/v1/*.cc"
)
list(APPEND GOOGLE_CLOUD_CPP_SOURCES ${GOOGLE_CLOUD_CPP_KMS_SRC})
list(APPEND GOOGLE_CLOUD_CPP_PUBLIC_INCLUDES "${GOOGLE_CLOUD_CPP_DIR}" "${CMAKE_CURRENT_BINARY_DIR}")
set(GRPC_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/grpc")
list(APPEND GOOGLE_CLOUD_CPP_PUBLIC_INCLUDES "${GRPC_INCLUDE_DIR}/include" "${GRPC_INCLUDE_DIR}/spm-cpp-include")
# Restore the PROJECT_SOURCE_DIR.
set(PROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR_BAK})
# Link against external libraries.
list(APPEND GOOGLE_CLOUD_CPP_PRIVATE_LIBS
google_cloud_cpp_common
google_cloud_cpp_grpc_utils
google_cloud_cpp_kms_protos
google_cloud_cpp_cloud_location_locations_protos
google_cloud_cpp_iam_v1_iam_policy_protos
gRPC::grpc++
absl::optional
)
list(APPEND GOOGLE_CLOUD_CPP_PUBLIC_LIBS
absl::optional
gRPC::grpc++
)
# Add library.
add_library(_gcloud ${GOOGLE_CLOUD_CPP_SOURCES})
target_include_directories(_gcloud SYSTEM PUBLIC ${GOOGLE_CLOUD_CPP_PUBLIC_INCLUDES})
target_include_directories(_gcloud SYSTEM PRIVATE ${GOOGLE_CLOUD_CPP_PRIVATE_INCLUDES})
target_link_libraries(_gcloud PRIVATE ${GOOGLE_CLOUD_CPP_PRIVATE_LIBS})
# The library is large - avoid bloat.
if (OMIT_HEAVY_DEBUG_SYMBOLS)
target_compile_options(_gcloud PRIVATE -g0)
endif()
add_library(ch_contrib::google_cloud_cpp ALIAS _gcloud)

View File

@ -0,0 +1,469 @@
# ~~~
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ~~~
# File copied from google-cloud-cpp/external/googleapis/CMakeLists.txt with minor modifications.
if (NOT GOOGLE_CLOUD_CPP_ENABLE_GRPC)
return()
endif ()
include(GoogleapisConfig)
set(GOOGLE_CLOUD_CPP_GOOGLEAPIS_URL
"https://github.com/googleapis/googleapis/archive/${_GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA}.tar.gz"
"https://storage.googleapis.com/cloud-cpp-community-archive/github.com/googleapis/googleapis/archive/${_GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA}.tar.gz"
)
set(GOOGLE_CLOUD_CPP_GOOGLEAPIS_URL_HASH
"${_GOOGLE_CLOUD_CPP_GOOGLEAPIS_SHA256}")
if (GOOGLE_CLOUD_CPP_OVERRIDE_GOOGLEAPIS_URL)
set(GOOGLE_CLOUD_CPP_GOOGLEAPIS_URL
${GOOGLE_CLOUD_CPP_OVERRIDE_GOOGLEAPIS_URL})
endif ()
if (GOOGLE_CLOUD_CPP_OVERRIDE_GOOGLEAPIS_URL_HASH)
set(GOOGLE_CLOUD_CPP_GOOGLEAPIS_URL_HASH
"${GOOGLE_CLOUD_CPP_OVERRIDE_GOOGLEAPIS_URL_HASH}")
endif ()
set(EXTERNAL_GOOGLEAPIS_PROTO_FILES
# cmake-format: sort
"google/api/annotations.proto"
"google/api/auth.proto"
"google/api/backend.proto"
"google/api/billing.proto"
"google/api/client.proto"
"google/api/config_change.proto"
"google/api/consumer.proto"
"google/api/context.proto"
"google/api/control.proto"
"google/api/distribution.proto"
"google/api/documentation.proto"
"google/api/endpoint.proto"
"google/api/error_reason.proto"
"google/api/field_behavior.proto"
"google/api/field_info.proto"
"google/api/http.proto"
"google/api/httpbody.proto"
"google/api/label.proto"
"google/api/launch_stage.proto"
"google/api/log.proto"
"google/api/logging.proto"
"google/api/metric.proto"
"google/api/monitored_resource.proto"
"google/api/monitoring.proto"
"google/api/policy.proto"
"google/api/quota.proto"
"google/api/resource.proto"
"google/api/routing.proto"
"google/api/service.proto"
"google/api/source_info.proto"
"google/api/system_parameter.proto"
"google/api/usage.proto"
"google/api/visibility.proto"
"google/cloud/extended_operations.proto"
"google/cloud/location/locations.proto"
# orgpolicy/v**1** is used *indirectly* by google/cloud/asset, therefore it
# does not appear in protolists/asset.list. In addition, it is not compiled
# by any other library. So, added manually.
"google/cloud/orgpolicy/v1/orgpolicy.proto"
# Some gRPC based authentication is implemented by the IAM Credentials
# service.
"google/iam/credentials/v1/common.proto"
"google/iam/credentials/v1/iamcredentials.proto"
# We expose google::iam::v1::Policy in our google::cloud::IAMUpdater
"google/iam/v1/iam_policy.proto"
"google/iam/v1/options.proto"
"google/iam/v1/policy.proto"
"google/longrunning/operations.proto"
"google/rpc/code.proto"
"google/rpc/context/attribute_context.proto"
"google/rpc/error_details.proto"
"google/rpc/status.proto"
"google/type/calendar_period.proto"
"google/type/color.proto"
"google/type/date.proto"
"google/type/datetime.proto"
"google/type/dayofweek.proto"
"google/type/decimal.proto"
"google/type/expr.proto"
"google/type/fraction.proto"
"google/type/interval.proto"
"google/type/latlng.proto"
"google/type/localized_text.proto"
"google/type/money.proto"
"google/type/month.proto"
"google/type/phone_number.proto"
"google/type/postal_address.proto"
"google/type/quaternion.proto"
"google/type/timeofday.proto")
include(GoogleCloudCppCommonOptions)
# Set EXTERNAL_GOOGLEAPIS_SOURCE in the parent directory, as it is used by all
# the generated libraries. The Conan packages (https://conan.io), will need to
# patch this value. Setting the value in a single place makes such patching
# easier.
set(EXTERNAL_GOOGLEAPIS_PREFIX "${PROJECT_BINARY_DIR}/external/googleapis")
set(EXTERNAL_GOOGLEAPIS_SOURCE
"${EXTERNAL_GOOGLEAPIS_PREFIX}/src/googleapis_download"
PARENT_SCOPE)
set(EXTERNAL_GOOGLEAPIS_SOURCE
"${EXTERNAL_GOOGLEAPIS_PREFIX}/src/googleapis_download")
# Include the functions to compile proto files and maintain proto libraries.
include(CompileProtos)
set(EXTERNAL_GOOGLEAPIS_BYPRODUCTS)
foreach (proto ${EXTERNAL_GOOGLEAPIS_PROTO_FILES})
list(APPEND EXTERNAL_GOOGLEAPIS_BYPRODUCTS
"${EXTERNAL_GOOGLEAPIS_SOURCE}/${proto}")
endforeach ()
file(GLOB protolists "protolists/*.list")
foreach (file IN LISTS protolists)
google_cloud_cpp_load_protolist(protos "${file}")
foreach (proto IN LISTS protos)
list(APPEND EXTERNAL_GOOGLEAPIS_BYPRODUCTS "${proto}")
endforeach ()
endforeach ()
include(ExternalProject)
# -- The build needs protobuf files. The original build scripts download them from a remote server (see target 'googleapis_download').
# This is too unreliable in the context of ClickHouse ... we instead ship the downloaded archive with the ClickHouse source and
# extract it into the build directory directly.
# Dummy googleapis_download target. This needs to exist because lots of other targets depend on it
# We however trick it a little bit saying this target generates the ${EXTERNAL_GOOGLEAPIS_BYPRODUCTS} BYPRODUCTS when
# actually the following section is the one actually providing such BYPRODUCTS.
externalproject_add(
googleapis_download
EXCLUDE_FROM_ALL ON
PREFIX "${EXTERNAL_GOOGLEAPIS_PREFIX}"
PATCH_COMMAND ""
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${EXTERNAL_GOOGLEAPIS_BYPRODUCTS}
LOG_DOWNLOAD OFF)
# Command that extracts the tarball into the proper dir
# Note: The hash must match the Google Cloud Api version, otherwise funny things will happen.
# Find the right hash in "strip-prefix" in MODULE.bazel in the subrepository
message(STATUS "Extracting googleapis tarball")
set(PB_HASH "e60db19f11f94175ac682c5898cce0f77cc508ea")
set(PB_ARCHIVE "${PB_HASH}.tar.gz")
set(PB_DIR "googleapis-${PB_HASH}")
file(ARCHIVE_EXTRACT INPUT
"${ClickHouse_SOURCE_DIR}/contrib/google-cloud-cpp-cmake/googleapis/${PB_ARCHIVE}"
DESTINATION
"${EXTERNAL_GOOGLEAPIS_PREFIX}/tmp")
file(REMOVE_RECURSE "${EXTERNAL_GOOGLEAPIS_SOURCE}")
file(RENAME
"${EXTERNAL_GOOGLEAPIS_PREFIX}/tmp/${PB_DIR}"
"${EXTERNAL_GOOGLEAPIS_SOURCE}"
)
google_cloud_cpp_find_proto_include_dir(PROTO_INCLUDE_DIR)
google_cloud_cpp_add_protos_property()
function (external_googleapis_short_name var proto)
string(REPLACE "google/" "" short_name "${proto}")
string(REPLACE "/" "_" short_name "${short_name}")
string(REPLACE ".proto" "_protos" short_name "${short_name}")
set("${var}"
"${short_name}"
PARENT_SCOPE)
endfunction ()
# Create a single source proto library.
#
# * proto: the filename for the proto source.
# * (optional) ARGN: proto libraries the new library depends on.
function (external_googleapis_add_library proto)
external_googleapis_short_name(short_name "${proto}")
google_cloud_cpp_grpcpp_library(
google_cloud_cpp_${short_name} "${EXTERNAL_GOOGLEAPIS_SOURCE}/${proto}"
PROTO_PATH_DIRECTORIES "${EXTERNAL_GOOGLEAPIS_SOURCE}"
"${PROTO_INCLUDE_DIR}")
external_googleapis_set_version_and_alias("${short_name}")
set(public_deps)
foreach (dep_short_name ${ARGN})
list(APPEND public_deps "google-cloud-cpp::${dep_short_name}")
endforeach ()
list(LENGTH public_deps public_deps_length)
if (public_deps_length EQUAL 0)
target_link_libraries("google_cloud_cpp_${short_name}")
else ()
target_link_libraries("google_cloud_cpp_${short_name}"
PUBLIC ${public_deps})
endif ()
endfunction ()
function (external_googleapis_set_version_and_alias short_name)
add_dependencies("google_cloud_cpp_${short_name}" googleapis_download)
set_target_properties(
"google_cloud_cpp_${short_name}"
PROPERTIES EXPORT_NAME google-cloud-cpp::${short_name}
VERSION "${PROJECT_VERSION}"
SOVERSION ${PROJECT_VERSION_MAJOR})
add_library("google-cloud-cpp::${short_name}" ALIAS
"google_cloud_cpp_${short_name}")
endfunction ()
if (GOOGLE_CLOUD_CPP_USE_INSTALLED_COMMON)
return()
endif ()
# Avoid adding new proto libraries to this list as these libraries are always
# installed, regardless of whether or not they are needed. See #8022 for more
# details.
set(external_googleapis_installed_libraries_list
# cmake-format: sort
google_cloud_cpp_cloud_common_common_protos
google_cloud_cpp_iam_credentials_v1_common_protos
google_cloud_cpp_iam_credentials_v1_iamcredentials_protos
google_cloud_cpp_iam_v1_iam_policy_protos
google_cloud_cpp_iam_v1_options_protos
google_cloud_cpp_iam_v1_policy_protos
google_cloud_cpp_longrunning_operations_protos)
# These proto files cannot be added in the foreach() loop because they have
# dependencies.
set(PROTO_FILES_WITH_DEPENDENCIES
# cmake-format: sort
"google/api/annotations.proto"
"google/api/auth.proto"
"google/api/billing.proto"
"google/api/client.proto"
"google/api/control.proto"
"google/api/distribution.proto"
"google/api/endpoint.proto"
"google/api/log.proto"
"google/api/logging.proto"
"google/api/metric.proto"
"google/api/monitored_resource.proto"
"google/api/monitoring.proto"
"google/api/quota.proto"
"google/api/service.proto"
"google/api/usage.proto"
"google/cloud/location/locations.proto"
"google/rpc/status.proto")
# For some directories *most* (but not all) the proto files are simple enough
# that the libraries can be generated with a foreach() loop.
foreach (proto IN LISTS EXTERNAL_GOOGLEAPIS_PROTO_FILES)
if (proto MATCHES "^google/api/"
OR proto MATCHES "^google/type"
OR proto MATCHES "^google/rpc/"
OR proto MATCHES "^google/cloud/")
external_googleapis_short_name(short_name "${proto}")
list(APPEND external_googleapis_installed_libraries_list
google_cloud_cpp_${short_name})
list(FIND PROTO_FILES_WITH_DEPENDENCIES "${proto}" has_dependency)
if (has_dependency EQUAL -1)
external_googleapis_add_library("${proto}")
endif ()
endif ()
endforeach ()
# Out of order because they have dependencies.
external_googleapis_add_library("google/api/annotations.proto" api_http_protos)
external_googleapis_add_library("google/api/auth.proto" api_annotations_protos)
external_googleapis_add_library("google/api/client.proto"
api_launch_stage_protos)
external_googleapis_add_library("google/api/control.proto" api_policy_protos)
external_googleapis_add_library("google/api/metric.proto"
api_launch_stage_protos api_label_protos)
external_googleapis_add_library("google/api/billing.proto"
api_annotations_protos api_metric_protos)
external_googleapis_add_library("google/api/distribution.proto"
api_annotations_protos)
external_googleapis_add_library("google/api/endpoint.proto"
api_annotations_protos)
external_googleapis_add_library("google/api/log.proto" api_label_protos)
external_googleapis_add_library("google/api/logging.proto"
api_annotations_protos api_label_protos)
external_googleapis_add_library("google/api/monitored_resource.proto"
api_launch_stage_protos api_label_protos)
external_googleapis_add_library("google/api/monitoring.proto"
api_annotations_protos)
external_googleapis_add_library("google/api/quota.proto" api_annotations_protos)
external_googleapis_add_library("google/api/usage.proto" api_annotations_protos
api_visibility_protos)
external_googleapis_add_library(
"google/api/service.proto"
api_annotations_protos
api_auth_protos
api_backend_protos
api_billing_protos
api_client_protos
api_context_protos
api_control_protos
api_documentation_protos
api_endpoint_protos
api_http_protos
api_label_protos
api_log_protos
api_logging_protos
api_metric_protos
api_monitored_resource_protos
api_monitoring_protos
api_quota_protos
api_resource_protos
api_source_info_protos
api_system_parameter_protos
api_usage_protos)
external_googleapis_add_library("google/cloud/location/locations.proto"
api_annotations_protos api_client_protos)
external_googleapis_add_library("google/iam/v1/options.proto"
api_annotations_protos)
external_googleapis_add_library("google/iam/v1/policy.proto"
api_annotations_protos type_expr_protos)
external_googleapis_add_library("google/rpc/status.proto"
rpc_error_details_protos)
external_googleapis_add_library(
"google/longrunning/operations.proto" api_annotations_protos
api_client_protos rpc_status_protos)
external_googleapis_add_library(
"google/iam/v1/iam_policy.proto"
api_annotations_protos
api_client_protos
api_field_behavior_protos
api_resource_protos
iam_v1_options_protos
iam_v1_policy_protos)
external_googleapis_add_library("google/iam/credentials/v1/common.proto"
api_field_behavior_protos api_resource_protos)
external_googleapis_add_library(
"google/iam/credentials/v1/iamcredentials.proto" api_annotations_protos
api_client_protos iam_credentials_v1_common_protos)
google_cloud_cpp_load_protolist(cloud_common_list "${GOOGLE_CLOUD_CPP_DIR}/external/googleapis/protolists/common.list")
google_cloud_cpp_load_protodeps(cloud_common_deps "${GOOGLE_CLOUD_CPP_DIR}/external/googleapis/protodeps/common.deps")
google_cloud_cpp_grpcpp_library(
google_cloud_cpp_cloud_common_common_protos ${cloud_common_list}
PROTO_PATH_DIRECTORIES "${EXTERNAL_GOOGLEAPIS_SOURCE}"
"${PROTO_INCLUDE_DIR}")
external_googleapis_set_version_and_alias(cloud_common_common_protos)
target_link_libraries(google_cloud_cpp_cloud_common_common_protos
PUBLIC ${cloud_common_deps})
# Install the libraries and headers in the locations determined by
# GNUInstallDirs
include(GNUInstallDirs)
install(
TARGETS ${external_googleapis_installed_libraries_list}
EXPORT googleapis-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT google_cloud_cpp_runtime
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT google_cloud_cpp_runtime
NAMELINK_COMPONENT google_cloud_cpp_development
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT google_cloud_cpp_development)
foreach (target ${external_googleapis_installed_libraries_list})
google_cloud_cpp_install_proto_library_headers("${target}")
google_cloud_cpp_install_proto_library_protos(
"${target}" "${EXTERNAL_GOOGLEAPIS_SOURCE}")
endforeach ()
# Create and install the pkg-config files.
foreach (target ${external_googleapis_installed_libraries_list})
external_googleapis_install_pc("${target}")
endforeach ()
# Create and install the googleapis pkg-config file for backwards compatibility.
set(GOOGLE_CLOUD_CPP_PC_LIBS "")
google_cloud_cpp_set_pkgconfig_paths()
set(GOOGLE_CLOUD_CPP_PC_NAME "The Google APIS C++ Proto Library")
set(GOOGLE_CLOUD_CPP_PC_DESCRIPTION
"Provides C++ APIs to access Google Cloud Platforms.")
# This list is for backwards compatibility purposes only. DO NOT add new
# libraries to it.
string(
JOIN
" "
GOOGLE_CLOUD_CPP_PC_REQUIRES
"google_cloud_cpp_bigtable_protos"
"google_cloud_cpp_cloud_bigquery_protos"
"google_cloud_cpp_iam_protos"
"google_cloud_cpp_pubsub_protos"
"google_cloud_cpp_storage_protos"
"google_cloud_cpp_logging_protos"
"google_cloud_cpp_iam_v1_iam_policy_protos"
"google_cloud_cpp_iam_v1_options_protos"
"google_cloud_cpp_iam_v1_policy_protos"
"google_cloud_cpp_longrunning_operations_protos"
"google_cloud_cpp_api_auth_protos"
"google_cloud_cpp_api_annotations_protos"
"google_cloud_cpp_api_client_protos"
"google_cloud_cpp_api_field_behavior_protos"
"google_cloud_cpp_api_http_protos"
"google_cloud_cpp_rpc_status_protos"
"google_cloud_cpp_rpc_error_details_protos"
"google_cloud_cpp_type_expr_protos"
"grpc++"
"grpc"
"openssl"
"protobuf"
"zlib"
"libcares")
set(GOOGLE_CLOUD_CPP_PC_LIBS "")
google_cloud_cpp_set_pkgconfig_paths()
configure_file("${PROJECT_SOURCE_DIR}/cmake/templates/config.pc.in"
"googleapis.pc" @ONLY)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/googleapis.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
COMPONENT google_cloud_cpp_development)
# Create and install the CMake configuration files.
# include(CMakePackageConfigHelpers)
# configure_file("${CMAKE_CURRENT_LIST_DIR}/config.cmake.in"
# "google_cloud_cpp_googleapis-config.cmake" @ONLY)
# write_basic_package_version_file(
# "google_cloud_cpp_googleapis-config-version.cmake"
# VERSION ${PROJECT_VERSION}
# COMPATIBILITY ExactVersion)
# Export the CMake targets to make it easy to create configuration files.
# install(
# EXPORT googleapis-targets
# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_googleapis"
# COMPONENT google_cloud_cpp_development)
# install(
# FILES
# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_googleapis-config.cmake"
# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_googleapis-config-version.cmake"
# "${PROJECT_SOURCE_DIR}/cmake/FindgRPC.cmake"
# "${PROJECT_SOURCE_DIR}/cmake/CompileProtos.cmake"
# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_googleapis"
# COMPONENT google_cloud_cpp_development)

View File

@ -0,0 +1,447 @@
# ~~~
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ~~~
# File copied from google-cloud-cpp/google-cloud-cpp/google_cloud_cpp_common.cmake with minor modifications.
set(GOOGLE_CLOUD_CPP_COMMON_DIR "${GOOGLE_CLOUD_CPP_DIR}/google/cloud")
# Generate the version information from the CMake values.
# configure_file(${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/version_info.h.in
# ${CMAKE_CURRENT_SOURCE_DIR}/internal/version_info.h)
# Create the file that captures build information. Having access to the compiler
# and build flags at runtime allows us to print better benchmark results.
string(TOUPPER "${CMAKE_BUILD_TYPE}" GOOGLE_CLOUD_CPP_BUILD_TYPE_UPPER)
configure_file(${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/build_info.cc.in internal/build_info.cc)
# the client library
add_library(
google_cloud_cpp_common # cmake-format: sort
${CMAKE_CURRENT_BINARY_DIR}/internal/build_info.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/access_token.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/access_token.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/backoff_policy.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/common_options.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/credentials.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/credentials.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/experimental_tag.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/future.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/future_generic.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/future_void.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/idempotency.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/absl_str_cat_quiet.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/absl_str_join_quiet.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/absl_str_replace_quiet.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/algorithm.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/api_client_header.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/api_client_header.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/attributes.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/auth_header_error.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/auth_header_error.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/backoff_policy.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/backoff_policy.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/base64_transforms.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/base64_transforms.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/big_endian.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/build_info.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/call_context.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/clock.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/compiler_info.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/compiler_info.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/compute_engine_util.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/compute_engine_util.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/credentials_impl.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/credentials_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_future_status.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_future_status.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_string.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_string.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/detect_gcp.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/detect_gcp_impl.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/detect_gcp_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/diagnostics_pop.inc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/diagnostics_push.inc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/disable_deprecation_warnings.inc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/disable_msvc_crt_secure_warnings.inc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/error_context.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/error_context.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/filesystem.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/filesystem.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/format_time_point.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/format_time_point.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_base.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_coroutines.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_fwd.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_impl.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_then_impl.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/future_then_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/getenv.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/getenv.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/group_options.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/invocation_id_generator.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/invocation_id_generator.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/invoke_result.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/ios_flags_saver.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/log_impl.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/log_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/make_status.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/make_status.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/noexcept_action.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/noexcept_action.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/non_constructible.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/opentelemetry.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/opentelemetry.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/opentelemetry_context.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/opentelemetry_context.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/pagination_range.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/parse_rfc3339.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/parse_rfc3339.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/populate_common_options.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/populate_common_options.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/port_platform.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/random.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/random.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/retry_info.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/retry_loop_helpers.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/retry_loop_helpers.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/retry_policy_impl.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/retry_policy_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/service_endpoint.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/service_endpoint.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/sha256_hash.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/sha256_hash.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/sha256_hmac.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/sha256_hmac.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/sha256_type.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/status_payload_keys.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/status_payload_keys.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/status_utils.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/status_utils.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/strerror.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/strerror.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/subject_token.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/subject_token.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/throw_delegate.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/throw_delegate.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/timer_queue.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/timer_queue.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/trace_propagator.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/trace_propagator.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/traced_stream_range.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/tuple.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/type_list.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/type_traits.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/url_encode.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/url_encode.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/user_agent_prefix.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/user_agent_prefix.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/utility.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/version_info.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/kms_key_name.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/kms_key_name.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/location.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/location.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/log.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/log.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/no_await_tag.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/opentelemetry_options.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/optional.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/options.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/options.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/polling_policy.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/project.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/project.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/retry_policy.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/rpc_metadata.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/status.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/status.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/status_or.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/stream_range.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/terminate_handler.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/terminate_handler.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/tracing_options.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/tracing_options.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/universe_domain_options.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/version.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/version.h)
target_link_libraries(
google_cloud_cpp_common
PUBLIC absl::base
absl::memory
absl::optional
absl::span
absl::str_format
absl::time
absl::variant
Threads::Threads)
if (WIN32)
target_compile_definitions(google_cloud_cpp_common
PRIVATE WIN32_LEAN_AND_MEAN)
target_link_libraries(google_cloud_cpp_common PUBLIC bcrypt)
else ()
target_link_libraries(google_cloud_cpp_common PUBLIC OpenSSL::Crypto ch_contrib::re2)
endif ()
google_cloud_cpp_add_common_options(google_cloud_cpp_common)
target_include_directories(
google_cloud_cpp_common PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>)
# We're putting generated code into ${PROJECT_BINARY_DIR} (e.g. compiled
# protobufs or build info), so we need it on the include path, however we don't
# want it checked by linters so we mark it as SYSTEM.
target_include_directories(google_cloud_cpp_common SYSTEM
PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>)
target_compile_options(google_cloud_cpp_common
PUBLIC ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG})
set_target_properties(
google_cloud_cpp_common
PROPERTIES EXPORT_NAME "google-cloud-cpp::common"
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR})
add_library(google-cloud-cpp::common ALIAS google_cloud_cpp_common)
#create_bazel_config(google_cloud_cpp_common YEAR 2018)
# # Export the CMake targets to make it easy to create configuration files.
# install(
# EXPORT google_cloud_cpp_common-targets
# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_common"
# COMPONENT google_cloud_cpp_development)
# # Install the libraries and headers in the locations determined by
# # GNUInstallDirs
# install(
# TARGETS google_cloud_cpp_common
# EXPORT google_cloud_cpp_common-targets
# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
# COMPONENT google_cloud_cpp_runtime
# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
# COMPONENT google_cloud_cpp_runtime
# NAMELINK_COMPONENT google_cloud_cpp_development
# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
# COMPONENT google_cloud_cpp_development)
#google_cloud_cpp_install_headers(google_cloud_cpp_common include/google/cloud)
# google_cloud_cpp_add_pkgconfig(
# "common"
# "Google Cloud C++ Client Library Common Components"
# "Common Components used by the Google Cloud C++ Client Libraries."
# "absl_optional"
# "absl_span"
# "absl_strings"
# "absl_time"
# "absl_time_zone"
# "absl_variant"
# "${GOOGLE_CLOUD_CPP_OPENTELEMETRY_API}"
# NON_WIN32_REQUIRES
# openssl
# WIN32_LIBS
# bcrypt)
# Create and install the CMake configuration files.
# configure_file("config.cmake.in" "google_cloud_cpp_common-config.cmake" @ONLY)
# write_basic_package_version_file(
# "google_cloud_cpp_common-config-version.cmake"
# VERSION ${PROJECT_VERSION}
# COMPATIBILITY ExactVersion)
# install(
# FILES
# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_common-config.cmake"
# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_common-config-version.cmake"
# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_common"
# COMPONENT google_cloud_cpp_development)
# if (GOOGLE_CLOUD_CPP_WITH_MOCKS)
# # Create a header-only library for the mocks. We use a CMake `INTERFACE`
# # library for these, a regular library would not work on macOS (where the
# # library needs at least one .o file).
# add_library(google_cloud_cpp_mocks INTERFACE)
# set(google_cloud_cpp_mocks_hdrs
# # cmake-format: sort
# mocks/current_options.h mocks/mock_async_streaming_read_write_rpc.h
# mocks/mock_stream_range.h)
# export_list_to_bazel("google_cloud_cpp_mocks.bzl"
# "google_cloud_cpp_mocks_hdrs" YEAR "2022")
# target_link_libraries(
# google_cloud_cpp_mocks INTERFACE google-cloud-cpp::common GTest::gmock
# GTest::gtest)
# set_target_properties(google_cloud_cpp_mocks
# PROPERTIES EXPORT_NAME google-cloud-cpp::mocks)
# target_include_directories(
# google_cloud_cpp_mocks
# INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
# $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
# $<INSTALL_INTERFACE:include>)
# target_compile_options(google_cloud_cpp_mocks
# INTERFACE ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG})
# add_library(google-cloud-cpp::mocks ALIAS google_cloud_cpp_mocks)
# install(
# FILES ${google_cloud_cpp_mocks_hdrs}
# DESTINATION "include/google/cloud/mocks"
# COMPONENT google_cloud_cpp_development)
# # Export the CMake targets to make it easy to create configuration files.
# install(
# EXPORT google_cloud_cpp_mocks-targets
# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_mocks"
# COMPONENT google_cloud_cpp_development)
# install(
# TARGETS google_cloud_cpp_mocks
# EXPORT google_cloud_cpp_mocks-targets
# COMPONENT google_cloud_cpp_development)
# google_cloud_cpp_add_pkgconfig(
# "mocks" "Google Cloud C++ Testing Library"
# "Helpers for testing the Google Cloud C++ Client Libraries"
# "google_cloud_cpp_common" "gmock")
# # Create and install the CMake configuration files.
# configure_file("mocks-config.cmake.in"
# "google_cloud_cpp_mocks-config.cmake" @ONLY)
# write_basic_package_version_file(
# "google_cloud_cpp_mocks-config-version.cmake"
# VERSION ${PROJECT_VERSION}
# COMPATIBILITY ExactVersion)
# install(
# FILES
# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_mocks-config.cmake"
# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_mocks-config-version.cmake"
# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_mocks"
# COMPONENT google_cloud_cpp_development)
# endif ()
# if (BUILD_TESTING)
# include(FindBenchmarkWithWorkarounds)
# set(google_cloud_cpp_common_unit_tests
# # cmake-format: sort
# access_token_test.cc
# common_options_test.cc
# future_coroutines_test.cc
# future_generic_test.cc
# future_generic_then_test.cc
# future_void_test.cc
# future_void_then_test.cc
# internal/algorithm_test.cc
# internal/api_client_header_test.cc
# internal/backoff_policy_test.cc
# internal/base64_transforms_test.cc
# internal/big_endian_test.cc
# internal/call_context_test.cc
# internal/clock_test.cc
# internal/compiler_info_test.cc
# internal/compute_engine_util_test.cc
# internal/credentials_impl_test.cc
# internal/debug_future_status_test.cc
# internal/debug_string_test.cc
# internal/detect_gcp_test.cc
# internal/error_context_test.cc
# internal/filesystem_test.cc
# internal/format_time_point_test.cc
# internal/future_impl_test.cc
# internal/future_then_impl_test.cc
# internal/group_options_test.cc
# internal/invocation_id_generator_test.cc
# internal/invoke_result_test.cc
# internal/log_impl_test.cc
# internal/make_status_test.cc
# internal/noexcept_action_test.cc
# internal/opentelemetry_context_test.cc
# internal/opentelemetry_test.cc
# internal/pagination_range_test.cc
# internal/parse_rfc3339_test.cc
# internal/populate_common_options_test.cc
# internal/random_test.cc
# internal/retry_loop_helpers_test.cc
# internal/retry_policy_impl_test.cc
# internal/service_endpoint_test.cc
# internal/sha256_hash_test.cc
# internal/sha256_hmac_test.cc
# internal/status_payload_keys_test.cc
# internal/status_utils_test.cc
# internal/strerror_test.cc
# internal/subject_token_test.cc
# internal/throw_delegate_test.cc
# internal/timer_queue_test.cc
# internal/trace_propagator_test.cc
# internal/traced_stream_range_test.cc
# internal/tuple_test.cc
# internal/type_list_test.cc
# internal/url_encode_test.cc
# internal/user_agent_prefix_test.cc
# internal/utility_test.cc
# kms_key_name_test.cc
# location_test.cc
# log_test.cc
# mocks/current_options_test.cc
# mocks/mock_stream_range_test.cc
# options_test.cc
# polling_policy_test.cc
# project_test.cc
# status_or_test.cc
# status_test.cc
# stream_range_test.cc
# terminate_handler_test.cc
# tracing_options_test.cc)
# # Export the list of unit tests so the Bazel BUILD file can pick it up.
# export_list_to_bazel("google_cloud_cpp_common_unit_tests.bzl"
# "google_cloud_cpp_common_unit_tests" YEAR "2018")
# foreach (fname ${google_cloud_cpp_common_unit_tests})
# google_cloud_cpp_add_executable(target "common" "${fname}")
# target_link_libraries(
# ${target}
# PRIVATE google_cloud_cpp_testing
# google-cloud-cpp::common
# google-cloud-cpp::mocks
# absl::variant
# GTest::gmock_main
# GTest::gmock
# GTest::gtest)
# google_cloud_cpp_add_common_options(${target})
# add_test(NAME ${target} COMMAND ${target})
# endforeach ()
# set(google_cloud_cpp_common_benchmarks # cmake-format: sort
# options_benchmark.cc)
# # Export the list of benchmarks to a .bzl file so we do not need to maintain
# # the list in two places.
# export_list_to_bazel("google_cloud_cpp_common_benchmarks.bzl"
# "google_cloud_cpp_common_benchmarks" YEAR "2020")
# # Generate a target for each benchmark.
# foreach (fname ${google_cloud_cpp_common_benchmarks})
# google_cloud_cpp_add_executable(target "common" "${fname}")
# add_test(NAME ${target} COMMAND ${target})
# target_link_libraries(${target} PRIVATE google-cloud-cpp::common
# benchmark::benchmark_main)
# google_cloud_cpp_add_common_options(${target})
# endforeach ()
# endif ()
# if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS)
# google_cloud_cpp_add_samples_relative("common" "samples/")
# endif ()

View File

@ -0,0 +1,350 @@
# ~~~
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ~~~
# File copied from google-cloud-cpp/google-cloud-cpp/google_cloud_cpp_grpc_utils.cmake with minor modifications.
set(GOOGLE_CLOUD_CPP_COMMON_DIR "${GOOGLE_CLOUD_CPP_DIR}/google/cloud")
# the library
add_library(
google_cloud_cpp_grpc_utils # cmake-format: sort
${GOOGLE_CLOUD_CPP_COMMON_DIR}/async_operation.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/async_streaming_read_write_rpc.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/background_threads.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/completion_queue.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/completion_queue.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/connection_options.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/connection_options.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_error_delegate.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_error_delegate.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_options.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_options.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_utils/async_operation.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_utils/completion_queue.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_utils/grpc_error_delegate.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/grpc_utils/version.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/iam_updater.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_connection_ready.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_connection_ready.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_long_running_operation.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_polling_loop.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_polling_loop.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_read_stream_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_read_write_stream_auth.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_read_write_stream_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_read_write_stream_logging.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_read_write_stream_timeout.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_read_write_stream_tracing.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_retry_loop.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_retry_unary_rpc.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_rpc_details.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_read_rpc.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_read_rpc_auth.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_read_rpc_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_read_rpc_logging.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_read_rpc_timeout.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_read_rpc_tracing.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_write_rpc.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_write_rpc_auth.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_write_rpc_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_write_rpc_logging.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_write_rpc_timeout.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/async_streaming_write_rpc_tracing.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/background_threads_impl.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/background_threads_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/completion_queue_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_string_protobuf.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_string_protobuf.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_string_status.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/debug_string_status.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/default_completion_queue_impl.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/default_completion_queue_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/extract_long_running_result.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/extract_long_running_result.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_access_token_authentication.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_access_token_authentication.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_api_key_authentication.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_api_key_authentication.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_async_access_token_cache.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_async_access_token_cache.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_channel_credentials_authentication.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_channel_credentials_authentication.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_impersonate_service_account.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_impersonate_service_account.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_metadata_view.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_opentelemetry.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_opentelemetry.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_request_metadata.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_request_metadata.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_service_account_authentication.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/grpc_service_account_authentication.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/log_wrapper.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/log_wrapper.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/minimal_iam_credentials_stub.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/minimal_iam_credentials_stub.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/populate_grpc_options.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/populate_grpc_options.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/resumable_streaming_read_rpc.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/retry_loop.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/routing_matcher.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/setup_context.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_read_rpc.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_read_rpc.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_read_rpc_logging.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_read_rpc_tracing.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_write_rpc.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_write_rpc_impl.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_write_rpc_impl.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_write_rpc_logging.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/streaming_write_rpc_tracing.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/time_utils.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/time_utils.h
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/unified_grpc_credentials.cc
${GOOGLE_CLOUD_CPP_COMMON_DIR}/internal/unified_grpc_credentials.h)
target_link_libraries(
google_cloud_cpp_grpc_utils
PUBLIC absl::function_ref
absl::memory
absl::time
absl::variant
google-cloud-cpp::iam_credentials_v1_iamcredentials_protos
google-cloud-cpp::iam_v1_policy_protos
google-cloud-cpp::longrunning_operations_protos
google-cloud-cpp::iam_v1_iam_policy_protos
google-cloud-cpp::rpc_error_details_protos
google-cloud-cpp::rpc_status_protos
google-cloud-cpp::common
gRPC::grpc++
gRPC::grpc)
google_cloud_cpp_add_common_options(google_cloud_cpp_grpc_utils)
target_include_directories(
google_cloud_cpp_grpc_utils PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>)
target_compile_options(google_cloud_cpp_grpc_utils
PUBLIC ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG})
set_target_properties(
google_cloud_cpp_grpc_utils
PROPERTIES EXPORT_NAME "google-cloud-cpp::grpc_utils"
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR})
add_library(google-cloud-cpp::grpc_utils ALIAS google_cloud_cpp_grpc_utils)
#create_bazel_config(google_cloud_cpp_grpc_utils YEAR 2019)
# # Install the libraries and headers in the locations determined by
# # GNUInstallDirs
# install(
# TARGETS
# EXPORT grpc_utils-targets
# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
# COMPONENT google_cloud_cpp_development)
# # Export the CMake targets to make it easy to create configuration files.
# install(
# EXPORT grpc_utils-targets
# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_grpc_utils"
# COMPONENT google_cloud_cpp_development)
# install(
# TARGETS google_cloud_cpp_grpc_utils
# EXPORT grpc_utils-targets
# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
# COMPONENT google_cloud_cpp_runtime
# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
# COMPONENT google_cloud_cpp_runtime
# NAMELINK_COMPONENT google_cloud_cpp_development
# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
# COMPONENT google_cloud_cpp_development)
# google_cloud_cpp_install_headers(google_cloud_cpp_grpc_utils
# include/google/cloud)
# google_cloud_cpp_add_pkgconfig(
# grpc_utils
# "gRPC Utilities for the Google Cloud C++ Client Library"
# "Provides gRPC Utilities for the Google Cloud C++ Client Library."
# "google_cloud_cpp_common"
# "google_cloud_cpp_iam_credentials_v1_iamcredentials_protos"
# "google_cloud_cpp_iam_v1_policy_protos"
# "google_cloud_cpp_iam_v1_iam_policy_protos"
# "google_cloud_cpp_longrunning_operations_protos"
# "google_cloud_cpp_rpc_status_protos"
# "absl_function_ref"
# "absl_strings"
# "absl_time"
# "absl_time_zone"
# "absl_variant"
# "openssl")
# # Create and install the CMake configuration files.
# configure_file("grpc_utils/config.cmake.in"
# "google_cloud_cpp_grpc_utils-config.cmake" @ONLY)
# write_basic_package_version_file(
# "google_cloud_cpp_grpc_utils-config-version.cmake"
# VERSION ${PROJECT_VERSION}
# COMPATIBILITY ExactVersion)
# install(
# FILES
# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_grpc_utils-config.cmake"
# "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_grpc_utils-config-version.cmake"
# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_grpc_utils"
# COMPONENT google_cloud_cpp_development)
# function (google_cloud_cpp_grpc_utils_add_test fname labels)
# google_cloud_cpp_add_executable(target "common" "${fname}")
# target_link_libraries(
# ${target}
# PRIVATE google-cloud-cpp::grpc_utils
# google_cloud_cpp_testing_grpc
# google_cloud_cpp_testing
# google-cloud-cpp::common
# absl::variant
# GTest::gmock_main
# GTest::gmock
# GTest::gtest
# gRPC::grpc++
# gRPC::grpc)
# google_cloud_cpp_add_common_options(${target})
# add_test(NAME ${target} COMMAND ${target})
# set_tests_properties(${target} PROPERTIES LABELS "${labels}")
# endfunction ()
# if (BUILD_TESTING)
# include(FindBenchmarkWithWorkarounds)
# # List the unit tests, then setup the targets and dependencies.
# set(google_cloud_cpp_grpc_utils_unit_tests
# # cmake-format: sort
# completion_queue_test.cc
# connection_options_test.cc
# grpc_error_delegate_test.cc
# grpc_options_test.cc
# internal/async_connection_ready_test.cc
# internal/async_long_running_operation_test.cc
# internal/async_polling_loop_test.cc
# internal/async_read_write_stream_auth_test.cc
# internal/async_read_write_stream_impl_test.cc
# internal/async_read_write_stream_logging_test.cc
# internal/async_read_write_stream_timeout_test.cc
# internal/async_read_write_stream_tracing_test.cc
# internal/async_retry_loop_test.cc
# internal/async_retry_unary_rpc_test.cc
# internal/async_streaming_read_rpc_auth_test.cc
# internal/async_streaming_read_rpc_impl_test.cc
# internal/async_streaming_read_rpc_logging_test.cc
# internal/async_streaming_read_rpc_timeout_test.cc
# internal/async_streaming_read_rpc_tracing_test.cc
# internal/async_streaming_write_rpc_auth_test.cc
# internal/async_streaming_write_rpc_impl_test.cc
# internal/async_streaming_write_rpc_logging_test.cc
# internal/async_streaming_write_rpc_timeout_test.cc
# internal/async_streaming_write_rpc_tracing_test.cc
# internal/background_threads_impl_test.cc
# internal/debug_string_protobuf_test.cc
# internal/debug_string_status_test.cc
# internal/extract_long_running_result_test.cc
# internal/grpc_access_token_authentication_test.cc
# internal/grpc_async_access_token_cache_test.cc
# internal/grpc_channel_credentials_authentication_test.cc
# internal/grpc_opentelemetry_test.cc
# internal/grpc_request_metadata_test.cc
# internal/grpc_service_account_authentication_test.cc
# internal/log_wrapper_test.cc
# internal/minimal_iam_credentials_stub_test.cc
# internal/populate_grpc_options_test.cc
# internal/resumable_streaming_read_rpc_test.cc
# internal/retry_loop_test.cc
# internal/routing_matcher_test.cc
# internal/streaming_read_rpc_logging_test.cc
# internal/streaming_read_rpc_test.cc
# internal/streaming_read_rpc_tracing_test.cc
# internal/streaming_write_rpc_logging_test.cc
# internal/streaming_write_rpc_test.cc
# internal/streaming_write_rpc_tracing_test.cc
# internal/time_utils_test.cc
# internal/unified_grpc_credentials_test.cc)
# # List the unit tests, then setup the targets and dependencies.
# set(google_cloud_cpp_grpc_utils_integration_tests
# # cmake-format: sort
# internal/grpc_impersonate_service_account_integration_test.cc)
# # Export the list of unit and integration tests so the Bazel BUILD file can
# # pick them up.
# export_list_to_bazel("google_cloud_cpp_grpc_utils_unit_tests.bzl"
# "google_cloud_cpp_grpc_utils_unit_tests" YEAR "2019")
# export_list_to_bazel(
# "google_cloud_cpp_grpc_utils_integration_tests.bzl"
# "google_cloud_cpp_grpc_utils_integration_tests" YEAR "2021")
# foreach (fname ${google_cloud_cpp_grpc_utils_unit_tests})
# google_cloud_cpp_grpc_utils_add_test("${fname}" "")
# endforeach ()
# # TODO(#12485) - remove dependency on bigtable in this integration test.
# if (NOT bigtable IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
# list(REMOVE_ITEM google_cloud_cpp_grpc_utils_integration_tests
# "internal/grpc_impersonate_service_account_integration_test.cc")
# endif ()
# foreach (fname ${google_cloud_cpp_grpc_utils_integration_tests})
# google_cloud_cpp_add_executable(target "common" "${fname}")
# target_link_libraries(
# ${target}
# PRIVATE google-cloud-cpp::grpc_utils
# google_cloud_cpp_testing_grpc
# google_cloud_cpp_testing
# google-cloud-cpp::common
# google-cloud-cpp::iam_credentials_v1_iamcredentials_protos
# absl::variant
# GTest::gmock_main
# GTest::gmock
# GTest::gtest
# gRPC::grpc++
# gRPC::grpc)
# google_cloud_cpp_add_common_options(${target})
# add_test(NAME ${target} COMMAND ${target})
# set_tests_properties(${target} PROPERTIES LABELS
# "integration-test-production")
# # TODO(12485) - remove dep on bigtable_protos
# if (bigtable IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
# target_link_libraries(${target}
# PRIVATE google-cloud-cpp::bigtable_protos)
# endif ()
# endforeach ()
# set(google_cloud_cpp_grpc_utils_benchmarks # cmake-format: sortable
# completion_queue_benchmark.cc)
# # Export the list of benchmarks to a .bzl file so we do not need to maintain
# # the list in two places.
# export_list_to_bazel("google_cloud_cpp_grpc_utils_benchmarks.bzl"
# "google_cloud_cpp_grpc_utils_benchmarks" YEAR "2020")
# # Generate a target for each benchmark.
# foreach (fname ${google_cloud_cpp_grpc_utils_benchmarks})
# google_cloud_cpp_add_executable(target "common" "${fname}")
# add_test(NAME ${target} COMMAND ${target})
# target_link_libraries(
# ${target}
# PRIVATE google-cloud-cpp::grpc_utils google-cloud-cpp::common
# benchmark::benchmark_main)
# google_cloud_cpp_add_common_options(${target})
# endforeach ()
# endif ()

1
contrib/jwt-cpp vendored Submodule

@ -0,0 +1 @@
Subproject commit a6927cb8140858c34e05d1a954626b9849fbcdfc

View File

@ -0,0 +1,23 @@
set(ENABLE_JWT_CPP_DEFAULT OFF)
if(ENABLE_LIBRARIES AND CLICKHOUSE_CLOUD)
set(ENABLE_JWT_CPP_DEFAULT ON)
endif()
option(ENABLE_JWT_CPP "Enable jwt-cpp library" ${ENABLE_JWT_CPP_DEFAULT})
if (NOT ENABLE_JWT_CPP)
message(STATUS "Not using jwt-cpp")
return()
endif()
if(ENABLE_JWT_CPP)
if(NOT TARGET OpenSSL::Crypto)
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use jwt-cpp without OpenSSL")
endif()
endif()
set (JWT_CPP_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/jwt-cpp/include")
add_library (_jwt-cpp INTERFACE)
target_include_directories(_jwt-cpp SYSTEM BEFORE INTERFACE ${JWT_CPP_INCLUDE_DIR})
add_library(ch_contrib::jwt-cpp ALIAS _jwt-cpp)

View File

@ -24,7 +24,7 @@ git config --file .gitmodules --get-regexp '.*path' | sed 's/[^ ]* //' | xargs -
# We don't want to depend on any third-party CMake files.
# To check it, find and delete them.
grep -o -P '"contrib/[^"]+"' .gitmodules |
grep -v -P 'contrib/(llvm-project|google-protobuf|grpc|abseil-cpp|corrosion|aws-crt-cpp)' |
grep -v -P 'contrib/(llvm-project|google-protobuf|grpc|abseil-cpp|corrosion|aws-crt-cpp|google-cloud-cpp)' |
xargs -I@ find @ \
-'(' -name 'CMakeLists.txt' -or -name '*.cmake' -')' -and -not -name '*.h.cmake' \
-delete

2
contrib/usearch vendored

@ -1 +1 @@
Subproject commit 53799b84ca9ad708b060d0b1cfa5f039371721cd
Subproject commit 7efe8b710c9831bfe06573b1df0fad001b04a2b5

View File

@ -6,12 +6,63 @@ target_include_directories(_usearch SYSTEM INTERFACE ${USEARCH_PROJECT_DIR}/incl
target_link_libraries(_usearch INTERFACE _fp16)
target_compile_definitions(_usearch INTERFACE USEARCH_USE_FP16LIB)
# target_compile_definitions(_usearch INTERFACE USEARCH_USE_SIMSIMD)
# ^^ simsimd is not enabled at the moment. Reasons:
# - Vectorization is important for raw scans but not so much for HNSW. We use usearch only for HNSW.
# - Simsimd does compile-time dispatch (choice of SIMD kernels determined by capabilities of the build machine) or dynamic dispatch (SIMD
# kernels chosen at runtime based on cpuid instruction). Since current builds are limited to SSE 4.2 (x86) and NEON (ARM), the speedup of
# the former would be moderate compared to AVX-512 / SVE. The latter is at the moment too fragile with respect to portability across x86
# and ARM machines ... certain conbinations of quantizations / distance functions / SIMD instructions are not implemented at the moment.
# Only x86 for now. On ARM, the linker goes down in flames. To make SimSIMD compile, I had to remove a macro checks in SimSIMD
# for AVX512 (x86, worked nicely) and __ARM_BF16_FORMAT_ALTERNATIVE. It is probably because of that.
if (ARCH_AMD64)
target_link_libraries(_usearch INTERFACE _simsimd)
target_compile_definitions(_usearch INTERFACE USEARCH_USE_SIMSIMD)
target_compile_definitions(_usearch INTERFACE USEARCH_CAN_COMPILE_FLOAT16)
target_compile_definitions(_usearch INTERFACE USEARCH_CAN_COMPILE_BF16)
endif ()
add_library(ch_contrib::usearch ALIAS _usearch)
# Cf. https://github.com/llvm/llvm-project/issues/107810 (though it is not 100% the same stack)
#
# LLVM ERROR: Cannot select: 0x7996e7a73150: f32,ch = load<(load (s16) from %ir.22, !tbaa !54231), anyext from bf16> 0x79961cb737c0, 0x7996e7a1a500, undef:i64, ./contrib/SimSIMD/include/simsimd/dot.h:215:1
# 0x7996e7a1a500: i64 = add 0x79961e770d00, Constant:i64<-16>, ./contrib/SimSIMD/include/simsimd/dot.h:215:1
# 0x79961e770d00: i64,ch = CopyFromReg 0x79961cb737c0, Register:i64 %4, ./contrib/SimSIMD/include/simsimd/dot.h:215:1
# 0x7996e7a1ae10: i64 = Register %4
# 0x7996e7a1b5f0: i64 = Constant<-16>
# 0x7996e7a1a730: i64 = undef
# In function: _ZL23simsimd_dot_bf16_serialPKu6__bf16S0_yPd
# PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# Stack dump:
# 0. Running pass 'Function Pass Manager' on module 'src/libdbms.a(MergeTreeIndexVectorSimilarity.cpp.o at 2312737440)'.
# 1. Running pass 'AArch64 Instruction Selection' on function '@_ZL23simsimd_dot_bf16_serialPKu6__bf16S0_yPd'
# #0 0x00007999e83a63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xda63bf)
# #1 0x00007999e83a44f9 llvm::sys::RunSignalHandlers() (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xda44f9)
# #2 0x00007999e83a6b00 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xda6b00)
# #3 0x00007999e6e45320 (/lib/x86_64-linux-gnu/libc.so.6+0x45320)
# #4 0x00007999e6e9eb1c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb1c)
# #5 0x00007999e6e4526e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4526e)
# #6 0x00007999e6e288ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# #7 0x00007999e82fe0c2 llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xcfe0c2)
# #8 0x00007999e8c2f8e3 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x162f8e3)
# #9 0x00007999e8c2ed76 llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x162ed76)
# #10 0x00007999ea1adbcb (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x2badbcb)
# #11 0x00007999e8c2611f llvm::SelectionDAGISel::DoInstructionSelection() (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x162611f)
# #12 0x00007999e8c25790 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x1625790)
# #13 0x00007999e8c248de llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x16248de)
# #14 0x00007999e8c22934 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x1622934)
# #15 0x00007999e87826b9 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x11826b9)
# #16 0x00007999e84f7772 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xef7772)
# #17 0x00007999e84fd2f4 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xefd2f4)
# #18 0x00007999e84f7e9f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xef7e9f)
# #19 0x00007999e99f7d61 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x23f7d61)
# #20 0x00007999e99f8c91 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x23f8c91)
# #21 0x00007999e99f8b10 llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::DenseMap<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::DenseMapInfo<llvm::StringRef, void
# >, llvm::detail::DenseMapPair<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>>> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::S
# tringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x23f8b10)
# #22 0x00007999e99f248d (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x23f248d)
# #23 0x00007999e99f1cd6 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x23f1cd6)
# #24 0x00007999e82c9beb (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xcc9beb)
# #25 0x00007999e834ebe3 llvm::ThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xd4ebe3)
# #26 0x00007999e834f704 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xd4f704)
# #27 0x00007999e6e9ca94 (/lib/x86_64-linux-gnu/libc.so.6+0x9ca94)
# #28 0x00007999e6f29c3c (/lib/x86_64-linux-gnu/libc.so.6+0x129c3c)
# clang++-18: error: unable to execute command: Aborted (core dumped)
# clang++-18: error: linker command failed due to signal (use -v to see invocation)
# ^[[A^Cninja: build stopped: interrupted by user.

View File

@ -1,7 +1,7 @@
# The Dockerfile.ubuntu exists for the tests/ci/docker_server.py script
# If the image is built from Dockerfile.alpine, then the `-alpine` suffix is added automatically,
# so the only purpose of Dockerfile.ubuntu is to push `latest`, `head` and so on w/o suffixes
FROM ubuntu:20.04 AS glibc-donor
FROM ubuntu:22.04 AS glibc-donor
ARG TARGETARCH
RUN arch=${TARGETARCH:-amd64} \
@ -9,7 +9,11 @@ RUN arch=${TARGETARCH:-amd64} \
amd64) rarch=x86_64 ;; \
arm64) rarch=aarch64 ;; \
esac \
&& ln -s "${rarch}-linux-gnu" /lib/linux-gnu
&& ln -s "${rarch}-linux-gnu" /lib/linux-gnu \
&& case $arch in \
amd64) ln /lib/linux-gnu/ld-linux-x86-64.so.2 /lib/linux-gnu/ld-2.35.so ;; \
arm64) ln /lib/linux-gnu/ld-linux-aarch64.so.1 /lib/linux-gnu/ld-2.35.so ;; \
esac
FROM alpine
@ -20,21 +24,21 @@ ENV LANG=en_US.UTF-8 \
TZ=UTC \
CLICKHOUSE_CONFIG=/etc/clickhouse-server/config.xml
COPY --from=glibc-donor /lib/linux-gnu/libc.so.6 /lib/linux-gnu/libdl.so.2 /lib/linux-gnu/libm.so.6 /lib/linux-gnu/libpthread.so.0 /lib/linux-gnu/librt.so.1 /lib/linux-gnu/libnss_dns.so.2 /lib/linux-gnu/libnss_files.so.2 /lib/linux-gnu/libresolv.so.2 /lib/linux-gnu/ld-2.31.so /lib/
COPY --from=glibc-donor /lib/linux-gnu/libc.so.6 /lib/linux-gnu/libdl.so.2 /lib/linux-gnu/libm.so.6 /lib/linux-gnu/libpthread.so.0 /lib/linux-gnu/librt.so.1 /lib/linux-gnu/libnss_dns.so.2 /lib/linux-gnu/libnss_files.so.2 /lib/linux-gnu/libresolv.so.2 /lib/linux-gnu/ld-2.35.so /lib/
COPY --from=glibc-donor /etc/nsswitch.conf /etc/
COPY entrypoint.sh /entrypoint.sh
ARG TARGETARCH
RUN arch=${TARGETARCH:-amd64} \
&& case $arch in \
amd64) mkdir -p /lib64 && ln -sf /lib/ld-2.31.so /lib64/ld-linux-x86-64.so.2 ;; \
arm64) ln -sf /lib/ld-2.31.so /lib/ld-linux-aarch64.so.1 ;; \
amd64) mkdir -p /lib64 && ln -sf /lib/ld-2.35.so /lib64/ld-linux-x86-64.so.2 ;; \
arm64) ln -sf /lib/ld-2.35.so /lib/ld-linux-aarch64.so.1 ;; \
esac
# lts / testing / prestable / etc
ARG REPO_CHANNEL="stable"
ARG REPOSITORY="https://packages.clickhouse.com/tgz/${REPO_CHANNEL}"
ARG VERSION="24.9.2.42"
ARG VERSION="24.10.2.80"
ARG PACKAGES="clickhouse-keeper"
ARG DIRECT_DOWNLOAD_URLS=""
@ -82,7 +86,8 @@ RUN arch=${TARGETARCH:-amd64} \
ARG DEFAULT_CONFIG_DIR="/etc/clickhouse-keeper"
ARG DEFAULT_DATA_DIR="/var/lib/clickhouse-keeper"
ARG DEFAULT_LOG_DIR="/var/log/clickhouse-keeper"
RUN mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_LOG_DIR}" "${DEFAULT_CONFIG_DIR}" \
RUN clickhouse-keeper --version \
&& mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_LOG_DIR}" "${DEFAULT_CONFIG_DIR}" \
&& chown clickhouse:clickhouse "${DEFAULT_DATA_DIR}" \
&& chown root:clickhouse "${DEFAULT_LOG_DIR}" \
&& chmod ugo+Xrw -R "${DEFAULT_DATA_DIR}" "${DEFAULT_LOG_DIR}" "${DEFAULT_CONFIG_DIR}"

View File

@ -1,21 +1,31 @@
#!/bin/bash
set +x
set -eo pipefail
shopt -s nullglob
DO_CHOWN=1
if [ "${CLICKHOUSE_DO_NOT_CHOWN:-0}" = "1" ]; then
if [[ "${CLICKHOUSE_RUN_AS_ROOT:=0}" = "1" || "${CLICKHOUSE_DO_NOT_CHOWN:-0}" = "1" ]]; then
DO_CHOWN=0
fi
CLICKHOUSE_UID="${CLICKHOUSE_UID:-"$(id -u clickhouse)"}"
CLICKHOUSE_GID="${CLICKHOUSE_GID:-"$(id -g clickhouse)"}"
# CLICKHOUSE_UID and CLICKHOUSE_GID are kept for backward compatibility, but deprecated
# One must use either "docker run --user" or CLICKHOUSE_RUN_AS_ROOT=1 to run the process as
# FIXME: Remove ALL CLICKHOUSE_UID CLICKHOUSE_GID before 25.3
if [[ "${CLICKHOUSE_UID:-}" || "${CLICKHOUSE_GID:-}" ]]; then
echo 'WARNING: Support for CLICKHOUSE_UID/CLICKHOUSE_GID will be removed in a couple of releases.' >&2
echo 'WARNING: Either use a proper "docker run --user=xxx:xxxx" argument instead of CLICKHOUSE_UID/CLICKHOUSE_GID' >&2
echo 'WARNING: or set "CLICKHOUSE_RUN_AS_ROOT=1" ENV to run the clickhouse-server as root:root' >&2
fi
# support --user
if [ "$(id -u)" = "0" ]; then
USER=$CLICKHOUSE_UID
GROUP=$CLICKHOUSE_GID
# support `docker run --user=xxx:xxxx`
if [[ "$(id -u)" = "0" ]]; then
if [[ "$CLICKHOUSE_RUN_AS_ROOT" = 1 ]]; then
USER=0
GROUP=0
else
USER="${CLICKHOUSE_UID:-"$(id -u clickhouse)"}"
GROUP="${CLICKHOUSE_GID:-"$(id -g clickhouse)"}"
fi
if command -v gosu &> /dev/null; then
gosu="gosu $USER:$GROUP"
elif command -v su-exec &> /dev/null; then
@ -82,11 +92,11 @@ if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
# There is a config file. It is already tested with gosu (if it is readably by keeper user)
if [ -f "$KEEPER_CONFIG" ]; then
exec $gosu /usr/bin/clickhouse-keeper --config-file="$KEEPER_CONFIG" "$@"
exec $gosu clickhouse-keeper --config-file="$KEEPER_CONFIG" "$@"
fi
# There is no config file. Will use embedded one
exec $gosu /usr/bin/clickhouse-keeper --log-file="$LOG_PATH" --errorlog-file="$ERROR_LOG_PATH" "$@"
exec $gosu clickhouse-keeper --log-file="$LOG_PATH" --errorlog-file="$ERROR_LOG_PATH" "$@"
fi
# Otherwise, we assume the user want to run his own process, for example a `bash` shell to explore this image

View File

@ -35,7 +35,7 @@ RUN arch=${TARGETARCH:-amd64} \
# lts / testing / prestable / etc
ARG REPO_CHANNEL="stable"
ARG REPOSITORY="https://packages.clickhouse.com/tgz/${REPO_CHANNEL}"
ARG VERSION="24.9.2.42"
ARG VERSION="24.10.2.80"
ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static"
ARG DIRECT_DOWNLOAD_URLS=""

View File

@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
# see https://github.com/moby/moby/issues/4032#issuecomment-192327844
# It could be removed after we move on a version 23:04+
@ -28,7 +28,7 @@ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list
ARG REPO_CHANNEL="stable"
ARG REPOSITORY="deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb ${REPO_CHANNEL} main"
ARG VERSION="24.9.2.42"
ARG VERSION="24.10.2.80"
ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static"
#docker-official-library:off
@ -88,10 +88,10 @@ RUN if [ -n "${single_binary_location_url}" ]; then \
#docker-official-library:on
# A fallback to installation from ClickHouse repository
RUN if ! clickhouse local -q "SELECT ''" > /dev/null 2>&1; then \
apt-get update \
# It works unless the clickhouse binary already exists
RUN clickhouse local -q 'SELECT 1' >/dev/null 2>&1 && exit 0 || : \
; apt-get update \
&& apt-get install --yes --no-install-recommends \
apt-transport-https \
dirmngr \
gnupg2 \
&& mkdir -p /etc/apt/sources.list.d \
@ -108,14 +108,14 @@ RUN if ! clickhouse local -q "SELECT ''" > /dev/null 2>&1; then \
&& for package in ${PACKAGES}; do \
packages="${packages} ${package}=${VERSION}" \
; done \
&& apt-get install --allow-unauthenticated --yes --no-install-recommends ${packages} || exit 1 \
&& apt-get install --yes --no-install-recommends ${packages} || exit 1 \
&& rm -rf \
/var/lib/apt/lists/* \
/var/cache/debconf \
/tmp/* \
&& apt-get autoremove --purge -yq libksba8 \
&& apt-get autoremove -yq \
; fi
&& apt-get autoremove --purge -yq dirmngr gnupg2 \
&& chmod ugo+Xrw -R /etc/clickhouse-server /etc/clickhouse-client
# The last chmod is here to make the next one is No-op in docker official library Dockerfile
# post install
# we need to allow "others" access to clickhouse folder, because docker container
@ -126,8 +126,6 @@ RUN clickhouse-local -q 'SELECT * FROM system.build_options' \
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV TZ UTC
RUN mkdir /docker-entrypoint-initdb.d

View File

@ -1,3 +1,11 @@
<!---
The README.md is generated by README.sh from the following sources:
- README.src/content.md
- README.src/license.md
If you want to change it, edit these files
-->
# ClickHouse Server Docker Image
## What is ClickHouse?
@ -8,6 +16,7 @@ ClickHouse works 100-1000x faster than traditional database management systems,
For more information and documentation see https://clickhouse.com/.
<!-- This is not related to the docker official library, remove it before commit to https://github.com/docker-library/docs -->
## Versions
- The `latest` tag points to the latest release of the latest stable branch.
@ -16,10 +25,12 @@ For more information and documentation see https://clickhouse.com/.
- The tag `head` is built from the latest commit to the default branch.
- Each tag has optional `-alpine` suffix to reflect that it's built on top of `alpine`.
<!-- REMOVE UNTIL HERE -->
### Compatibility
- The amd64 image requires support for [SSE3 instructions](https://en.wikipedia.org/wiki/SSE3). Virtually all x86 CPUs after 2005 support SSE3.
- The arm64 image requires support for the [ARMv8.2-A architecture](https://en.wikipedia.org/wiki/AArch64#ARMv8.2-A) and additionally the Load-Acquire RCpc register. The register is optional in version ARMv8.2-A and mandatory in [ARMv8.3-A](https://en.wikipedia.org/wiki/AArch64#ARMv8.3-A). Supported in Graviton >=2, Azure and GCP instances. Examples for unsupported devices are Raspberry Pi 4 (ARMv8.0-A) and Jetson AGX Xavier/Orin (ARMv8.2-A).
- Since the Clickhouse 24.11 Ubuntu images started using `ubuntu:22.04` as its base image. It requires docker version >= `20.10.10` containing [patch](https://github.com/moby/moby/commit/977283509f75303bc6612665a04abf76ff1d2468). As a workaround you could use `docker run --security-opt seccomp=unconfined` instead, however that has security implications.
## How to use this image
@ -29,7 +40,7 @@ For more information and documentation see https://clickhouse.com/.
docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server
```
By default, ClickHouse will be accessible only via the Docker network. See the [networking section below](#networking).
By default, ClickHouse will be accessible only via the Docker network. See the **networking** section below.
By default, starting above server instance will be run as the `default` user without password.
@ -46,7 +57,7 @@ More information about the [ClickHouse client](https://clickhouse.com/docs/en/in
### connect to it using curl
```bash
echo "SELECT 'Hello, ClickHouse!'" | docker run -i --rm --link some-clickhouse-server:clickhouse-server curlimages/curl 'http://clickhouse-server:8123/?query=' -s --data-binary @-
echo "SELECT 'Hello, ClickHouse!'" | docker run -i --rm --link some-clickhouse-server:clickhouse-server buildpack-deps:curl curl 'http://clickhouse-server:8123/?query=' -s --data-binary @-
```
More information about the [ClickHouse HTTP Interface](https://clickhouse.com/docs/en/interfaces/http/).
@ -69,7 +80,7 @@ echo 'SELECT version()' | curl 'http://localhost:18123/' --data-binary @-
`22.6.3.35`
or by allowing the container to use [host ports directly](https://docs.docker.com/network/host/) using `--network=host` (also allows achieving better network performance):
Or by allowing the container to use [host ports directly](https://docs.docker.com/network/host/) using `--network=host` (also allows achieving better network performance):
```bash
docker run -d --network=host --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server
@ -87,8 +98,8 @@ Typically you may want to mount the following folders inside your container to a
```bash
docker run -d \
-v $(realpath ./ch_data):/var/lib/clickhouse/ \
-v $(realpath ./ch_logs):/var/log/clickhouse-server/ \
-v "$PWD/ch_data:/var/lib/clickhouse/" \
-v "$PWD/ch_logs:/var/log/clickhouse-server/" \
--name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server
```
@ -110,6 +121,8 @@ docker run -d \
--name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server
```
Read more in [knowledge base](https://clickhouse.com/docs/knowledgebase/configure_cap_ipc_lock_and_cap_sys_nice_in_docker).
## Configuration
The container exposes port 8123 for the [HTTP interface](https://clickhouse.com/docs/en/interfaces/http_interface/) and port 9000 for the [native client](https://clickhouse.com/docs/en/interfaces/tcp/).
@ -125,8 +138,8 @@ docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 -v /pa
### Start server as custom user
```bash
# $(pwd)/data/clickhouse should exist and be owned by current user
docker run --rm --user ${UID}:${GID} --name some-clickhouse-server --ulimit nofile=262144:262144 -v "$(pwd)/logs/clickhouse:/var/log/clickhouse-server" -v "$(pwd)/data/clickhouse:/var/lib/clickhouse" clickhouse/clickhouse-server
# $PWD/data/clickhouse should exist and be owned by current user
docker run --rm --user "${UID}:${GID}" --name some-clickhouse-server --ulimit nofile=262144:262144 -v "$PWD/logs/clickhouse:/var/log/clickhouse-server" -v "$PWD/data/clickhouse:/var/lib/clickhouse" clickhouse/clickhouse-server
```
When you use the image with local directories mounted, you probably want to specify the user to maintain the proper file ownership. Use the `--user` argument and mount `/var/lib/clickhouse` and `/var/log/clickhouse-server` inside the container. Otherwise, the image will complain and not start.
@ -134,7 +147,7 @@ When you use the image with local directories mounted, you probably want to spec
### Start server from root (useful in case of enabled user namespace)
```bash
docker run --rm -e CLICKHOUSE_UID=0 -e CLICKHOUSE_GID=0 --name clickhouse-server-userns -v "$(pwd)/logs/clickhouse:/var/log/clickhouse-server" -v "$(pwd)/data/clickhouse:/var/lib/clickhouse" clickhouse/clickhouse-server
docker run --rm -e CLICKHOUSE_RUN_AS_ROOT=1 --name clickhouse-server-userns -v "$PWD/logs/clickhouse:/var/log/clickhouse-server" -v "$PWD/data/clickhouse:/var/lib/clickhouse" clickhouse/clickhouse-server
```
### How to create default database and user on starting

38
docker/server/README.sh Executable file
View File

@ -0,0 +1,38 @@
#!/usr/bin/env bash
set -ueo pipefail
# A script to generate README.sh close to as it done in https://github.com/docker-library/docs
WORKDIR=$(dirname "$0")
SCRIPT_NAME=$(basename "$0")
CONTENT=README.src/content.md
LICENSE=README.src/license.md
cd "$WORKDIR"
R=README.md
cat > "$R" <<EOD
<!---
The $R is generated by $SCRIPT_NAME from the following sources:
- $CONTENT
- $LICENSE
If you want to change it, edit these files
-->
EOD
cat "$CONTENT" >> "$R"
cat >> "$R" <<EOD
## License
$(cat $LICENSE)
EOD
# Remove %%LOGO%% from the file with one line below
sed -i '/^%%LOGO%%/,+1d' "$R"
# Replace each %%IMAGE%% with our `clickhouse/clickhouse-server`
sed -i '/%%IMAGE%%/s:%%IMAGE%%:clickhouse/clickhouse-server:g' $R

View File

@ -0,0 +1 @@
ClickHouse is the fastest and most resource efficient OSS database for real-time apps and analytics.

View File

@ -0,0 +1,170 @@
# ClickHouse Server Docker Image
## What is ClickHouse?
%%LOGO%%
ClickHouse is an open-source column-oriented DBMS (columnar database management system) for online analytical processing (OLAP) that allows users to generate analytical reports using SQL queries in real-time.
ClickHouse works 100-1000x faster than traditional database management systems, and processes hundreds of millions to over a billion rows and tens of gigabytes of data per server per second. With a widespread user base around the globe, the technology has received praise for its reliability, ease of use, and fault tolerance.
For more information and documentation see https://clickhouse.com/.
<!-- This is not related to the docker official library, remove it before commit to https://github.com/docker-library/docs -->
## Versions
- The `latest` tag points to the latest release of the latest stable branch.
- Branch tags like `22.2` point to the latest release of the corresponding branch.
- Full version tags like `22.2.3.5` point to the corresponding release.
- The tag `head` is built from the latest commit to the default branch.
- Each tag has optional `-alpine` suffix to reflect that it's built on top of `alpine`.
<!-- REMOVE UNTIL HERE -->
### Compatibility
- The amd64 image requires support for [SSE3 instructions](https://en.wikipedia.org/wiki/SSE3). Virtually all x86 CPUs after 2005 support SSE3.
- The arm64 image requires support for the [ARMv8.2-A architecture](https://en.wikipedia.org/wiki/AArch64#ARMv8.2-A) and additionally the Load-Acquire RCpc register. The register is optional in version ARMv8.2-A and mandatory in [ARMv8.3-A](https://en.wikipedia.org/wiki/AArch64#ARMv8.3-A). Supported in Graviton >=2, Azure and GCP instances. Examples for unsupported devices are Raspberry Pi 4 (ARMv8.0-A) and Jetson AGX Xavier/Orin (ARMv8.2-A).
- Since the Clickhouse 24.11 Ubuntu images started using `ubuntu:22.04` as its base image. It requires docker version >= `20.10.10` containing [patch](https://github.com/moby/moby/commit/977283509f75303bc6612665a04abf76ff1d2468). As a workaround you could use `docker run --security-opt seccomp=unconfined` instead, however that has security implications.
## How to use this image
### start server instance
```bash
docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 %%IMAGE%%
```
By default, ClickHouse will be accessible only via the Docker network. See the **networking** section below.
By default, starting above server instance will be run as the `default` user without password.
### connect to it from a native client
```bash
docker run -it --rm --link some-clickhouse-server:clickhouse-server --entrypoint clickhouse-client %%IMAGE%% --host clickhouse-server
# OR
docker exec -it some-clickhouse-server clickhouse-client
```
More information about the [ClickHouse client](https://clickhouse.com/docs/en/interfaces/cli/).
### connect to it using curl
```bash
echo "SELECT 'Hello, ClickHouse!'" | docker run -i --rm --link some-clickhouse-server:clickhouse-server buildpack-deps:curl curl 'http://clickhouse-server:8123/?query=' -s --data-binary @-
```
More information about the [ClickHouse HTTP Interface](https://clickhouse.com/docs/en/interfaces/http/).
### stopping / removing the container
```bash
docker stop some-clickhouse-server
docker rm some-clickhouse-server
```
### networking
You can expose your ClickHouse running in docker by [mapping a particular port](https://docs.docker.com/config/containers/container-networking/) from inside the container using host ports:
```bash
docker run -d -p 18123:8123 -p19000:9000 --name some-clickhouse-server --ulimit nofile=262144:262144 %%IMAGE%%
echo 'SELECT version()' | curl 'http://localhost:18123/' --data-binary @-
```
`22.6.3.35`
Or by allowing the container to use [host ports directly](https://docs.docker.com/network/host/) using `--network=host` (also allows achieving better network performance):
```bash
docker run -d --network=host --name some-clickhouse-server --ulimit nofile=262144:262144 %%IMAGE%%
echo 'SELECT version()' | curl 'http://localhost:8123/' --data-binary @-
```
`22.6.3.35`
### Volumes
Typically you may want to mount the following folders inside your container to achieve persistency:
- `/var/lib/clickhouse/` - main folder where ClickHouse stores the data
- `/var/log/clickhouse-server/` - logs
```bash
docker run -d \
-v "$PWD/ch_data:/var/lib/clickhouse/" \
-v "$PWD/ch_logs:/var/log/clickhouse-server/" \
--name some-clickhouse-server --ulimit nofile=262144:262144 %%IMAGE%%
```
You may also want to mount:
- `/etc/clickhouse-server/config.d/*.xml` - files with server configuration adjustments
- `/etc/clickhouse-server/users.d/*.xml` - files with user settings adjustments
- `/docker-entrypoint-initdb.d/` - folder with database initialization scripts (see below).
### Linux capabilities
ClickHouse has some advanced functionality, which requires enabling several [Linux capabilities](https://man7.org/linux/man-pages/man7/capabilities.7.html).
They are optional and can be enabled using the following [docker command-line arguments](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities):
```bash
docker run -d \
--cap-add=SYS_NICE --cap-add=NET_ADMIN --cap-add=IPC_LOCK \
--name some-clickhouse-server --ulimit nofile=262144:262144 %%IMAGE%%
```
Read more in [knowledge base](https://clickhouse.com/docs/knowledgebase/configure_cap_ipc_lock_and_cap_sys_nice_in_docker).
## Configuration
The container exposes port 8123 for the [HTTP interface](https://clickhouse.com/docs/en/interfaces/http_interface/) and port 9000 for the [native client](https://clickhouse.com/docs/en/interfaces/tcp/).
ClickHouse configuration is represented with a file "config.xml" ([documentation](https://clickhouse.com/docs/en/operations/configuration_files/))
### Start server instance with custom configuration
```bash
docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 -v /path/to/your/config.xml:/etc/clickhouse-server/config.xml %%IMAGE%%
```
### Start server as custom user
```bash
# $PWD/data/clickhouse should exist and be owned by current user
docker run --rm --user "${UID}:${GID}" --name some-clickhouse-server --ulimit nofile=262144:262144 -v "$PWD/logs/clickhouse:/var/log/clickhouse-server" -v "$PWD/data/clickhouse:/var/lib/clickhouse" %%IMAGE%%
```
When you use the image with local directories mounted, you probably want to specify the user to maintain the proper file ownership. Use the `--user` argument and mount `/var/lib/clickhouse` and `/var/log/clickhouse-server` inside the container. Otherwise, the image will complain and not start.
### Start server from root (useful in case of enabled user namespace)
```bash
docker run --rm -e CLICKHOUSE_RUN_AS_ROOT=1 --name clickhouse-server-userns -v "$PWD/logs/clickhouse:/var/log/clickhouse-server" -v "$PWD/data/clickhouse:/var/lib/clickhouse" %%IMAGE%%
```
### How to create default database and user on starting
Sometimes you may want to create a user (user named `default` is used by default) and database on a container start. You can do it using environment variables `CLICKHOUSE_DB`, `CLICKHOUSE_USER`, `CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT` and `CLICKHOUSE_PASSWORD`:
```bash
docker run --rm -e CLICKHOUSE_DB=my_database -e CLICKHOUSE_USER=username -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 -e CLICKHOUSE_PASSWORD=password -p 9000:9000/tcp %%IMAGE%%
```
## How to extend this image
To perform additional initialization in an image derived from this one, add one or more `*.sql`, `*.sql.gz`, or `*.sh` scripts under `/docker-entrypoint-initdb.d`. After the entrypoint calls `initdb`, it will run any `*.sql` files, run any executable `*.sh` scripts, and source any non-executable `*.sh` scripts found in that directory to do further initialization before starting the service.
Also, you can provide environment variables `CLICKHOUSE_USER` & `CLICKHOUSE_PASSWORD` that will be used for clickhouse-client during initialization.
For example, to add an additional user and database, add the following to `/docker-entrypoint-initdb.d/init-db.sh`:
```bash
#!/bin/bash
set -e
clickhouse client -n <<-EOSQL
CREATE DATABASE docker;
CREATE TABLE docker.docker (x Int32) ENGINE = Log;
EOSQL
```

View File

@ -0,0 +1 @@
https://github.com/ClickHouse/ClickHouse

View File

@ -0,0 +1 @@
View [license information](https://github.com/ClickHouse/ClickHouse/blob/master/LICENSE) for the software contained in this image.

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 616 616">
<defs>
<style>
.cls-1 {
clip-path: url(#clippath);
}
.cls-2 {
fill: none;
}
.cls-2, .cls-3, .cls-4 {
stroke-width: 0px;
}
.cls-3 {
fill: #1e1e1e;
}
.cls-4 {
fill: #faff69;
}
</style>
<clipPath id="clippath">
<rect class="cls-2" x="83.23" y="71.73" width="472.55" height="472.55"/>
</clipPath>
</defs>
<g id="Layer_2" data-name="Layer 2">
<rect class="cls-4" width="616" height="616"/>
</g>
<g id="Layer_1" data-name="Layer 1">
<g class="cls-1">
<g>
<path class="cls-3" d="m120.14,113.3c0-2.57,2.09-4.66,4.66-4.66h34.98c2.57,0,4.66,2.09,4.66,4.66v389.38c0,2.57-2.09,4.66-4.66,4.66h-34.98c-2.57,0-4.66-2.09-4.66-4.66V113.3Z"/>
<path class="cls-3" d="m208.75,113.3c0-2.57,2.09-4.66,4.66-4.66h34.98c2.57,0,4.66,2.09,4.66,4.66v389.38c0,2.57-2.09,4.66-4.66,4.66h-34.98c-2.57,0-4.66-2.09-4.66-4.66V113.3Z"/>
<path class="cls-3" d="m297.35,113.3c0-2.57,2.09-4.66,4.66-4.66h34.98c2.57,0,4.66,2.09,4.66,4.66v389.38c0,2.57-2.09,4.66-4.66,4.66h-34.98c-2.57,0-4.66-2.09-4.66-4.66V113.3Z"/>
<path class="cls-3" d="m385.94,113.3c0-2.57,2.09-4.66,4.66-4.66h34.98c2.57,0,4.66,2.09,4.66,4.66v389.38c0,2.57-2.09,4.66-4.66,4.66h-34.98c-2.57,0-4.66-2.09-4.66-4.66V113.3Z"/>
<path class="cls-3" d="m474.56,268.36c0-2.57,2.09-4.66,4.66-4.66h34.98c2.57,0,4.65,2.09,4.65,4.66v79.28c0,2.57-2.09,4.66-4.65,4.66h-34.98c-2.57,0-4.66-2.09-4.66-4.66v-79.28Z"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1 @@
[ClickHouse Inc.](%%GITHUB-REPO%%)

View File

@ -0,0 +1,7 @@
{
"hub": {
"categories": [
"databases-and-storage"
]
}
}

View File

@ -4,17 +4,28 @@ set -eo pipefail
shopt -s nullglob
DO_CHOWN=1
if [ "${CLICKHOUSE_DO_NOT_CHOWN:-0}" = "1" ]; then
if [[ "${CLICKHOUSE_RUN_AS_ROOT:=0}" = "1" || "${CLICKHOUSE_DO_NOT_CHOWN:-0}" = "1" ]]; then
DO_CHOWN=0
fi
CLICKHOUSE_UID="${CLICKHOUSE_UID:-"$(id -u clickhouse)"}"
CLICKHOUSE_GID="${CLICKHOUSE_GID:-"$(id -g clickhouse)"}"
# CLICKHOUSE_UID and CLICKHOUSE_GID are kept for backward compatibility, but deprecated
# One must use either "docker run --user" or CLICKHOUSE_RUN_AS_ROOT=1 to run the process as
# FIXME: Remove ALL CLICKHOUSE_UID CLICKHOUSE_GID before 25.3
if [[ "${CLICKHOUSE_UID:-}" || "${CLICKHOUSE_GID:-}" ]]; then
echo 'WARNING: Support for CLICKHOUSE_UID/CLICKHOUSE_GID will be removed in a couple of releases.' >&2
echo 'WARNING: Either use a proper "docker run --user=xxx:xxxx" argument instead of CLICKHOUSE_UID/CLICKHOUSE_GID' >&2
echo 'WARNING: or set "CLICKHOUSE_RUN_AS_ROOT=1" ENV to run the clickhouse-server as root:root' >&2
fi
# support --user
if [ "$(id -u)" = "0" ]; then
USER=$CLICKHOUSE_UID
GROUP=$CLICKHOUSE_GID
# support `docker run --user=xxx:xxxx`
if [[ "$(id -u)" = "0" ]]; then
if [[ "$CLICKHOUSE_RUN_AS_ROOT" = 1 ]]; then
USER=0
GROUP=0
else
USER="${CLICKHOUSE_UID:-"$(id -u clickhouse)"}"
GROUP="${CLICKHOUSE_GID:-"$(id -g clickhouse)"}"
fi
else
USER="$(id -u)"
GROUP="$(id -g)"
@ -55,14 +66,14 @@ function create_directory_and_do_chown() {
[ -z "$dir" ] && return
# ensure directories exist
if [ "$DO_CHOWN" = "1" ]; then
mkdir="mkdir"
mkdir=( mkdir )
else
# if DO_CHOWN=0 it means that the system does not map root user to "admin" permissions
# it mainly happens on NFS mounts where root==nobody for security reasons
# thus mkdir MUST run with user id/gid and not from nobody that has zero permissions
mkdir="/usr/bin/clickhouse su "${USER}:${GROUP}" mkdir"
mkdir=( clickhouse su "${USER}:${GROUP}" mkdir )
fi
if ! $mkdir -p "$dir"; then
if ! "${mkdir[@]}" -p "$dir"; then
echo "Couldn't create necessary directory: $dir"
exit 1
fi
@ -143,7 +154,7 @@ if [ -n "${RUN_INITDB_SCRIPTS}" ]; then
fi
# Listen only on localhost until the initialization is done
/usr/bin/clickhouse su "${USER}:${GROUP}" /usr/bin/clickhouse-server --config-file="$CLICKHOUSE_CONFIG" -- --listen_host=127.0.0.1 &
clickhouse su "${USER}:${GROUP}" clickhouse-server --config-file="$CLICKHOUSE_CONFIG" -- --listen_host=127.0.0.1 &
pid="$!"
# check if clickhouse is ready to accept connections
@ -151,7 +162,7 @@ if [ -n "${RUN_INITDB_SCRIPTS}" ]; then
tries=${CLICKHOUSE_INIT_TIMEOUT:-1000}
while ! wget --spider --no-check-certificate -T 1 -q "$URL" 2>/dev/null; do
if [ "$tries" -le "0" ]; then
echo >&2 'ClickHouse init process failed.'
echo >&2 'ClickHouse init process timeout.'
exit 1
fi
tries=$(( tries-1 ))
@ -203,18 +214,8 @@ if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
CLICKHOUSE_WATCHDOG_ENABLE=${CLICKHOUSE_WATCHDOG_ENABLE:-0}
export CLICKHOUSE_WATCHDOG_ENABLE
# An option for easy restarting and replacing clickhouse-server in a container, especially in Kubernetes.
# For example, you can replace the clickhouse-server binary to another and restart it while keeping the container running.
if [[ "${CLICKHOUSE_DOCKER_RESTART_ON_EXIT:-0}" -eq "1" ]]; then
while true; do
# This runs the server as a child process of the shell script:
/usr/bin/clickhouse su "${USER}:${GROUP}" /usr/bin/clickhouse-server --config-file="$CLICKHOUSE_CONFIG" "$@" ||:
echo >&2 'ClickHouse Server exited, and the environment variable CLICKHOUSE_DOCKER_RESTART_ON_EXIT is set to 1. Restarting the server.'
done
else
# This replaces the shell script with the server:
exec /usr/bin/clickhouse su "${USER}:${GROUP}" /usr/bin/clickhouse-server --config-file="$CLICKHOUSE_CONFIG" "$@"
fi
exec clickhouse su "${USER}:${GROUP}" clickhouse-server --config-file="$CLICKHOUSE_CONFIG" "$@"
fi
# Otherwise, we assume the user want to run his own process, for example a `bash` shell to explore this image

View File

@ -33,8 +33,6 @@ RUN apt-get update \
COPY requirements.txt /
RUN pip3 install --no-cache-dir -r /requirements.txt
ENV FUZZER_ARGS="-max_total_time=60"
SHELL ["/bin/bash", "-c"]
# docker run --network=host --volume <workspace>:/workspace -e PR_TO_TEST=<> -e SHA_TO_TEST=<> clickhouse/libfuzzer

View File

@ -1,16 +0,0 @@
# Since right now we can't set volumes to the docker during build, we split building container in stages:
# 1. build base container
# 2. run base conatiner with mounted volumes
# 3. commit container as image
FROM ubuntu:20.04 as clickhouse-test-runner-base
# A volume where directory with clickhouse packages to be mounted,
# for later installing.
VOLUME /packages
CMD apt-get update ;\
DEBIAN_FRONTEND=noninteractive \
apt install -y /packages/clickhouse-common-static_*.deb \
/packages/clickhouse-client_*.deb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More