Rewrite clickhouse-test to use python clickhouse_driver#29856
Rewrite clickhouse-test to use python clickhouse_driver#29856alexey-milovidov merged 6 commits intoClickHouse:masterfrom
Conversation
|
Can some one add |
|
@Mergifyio update |
|
Command
|
|
But it does not test |
|
@alexey-milovidov this PR converts only service use of
Every |
Pros: - Using native protocol over executing binaries is always better - `clickhouse-client` in debug build takes almost a second to execute simple `SELECT 1` and `clickhouse-test` requires ~5 queries at start (determine some flags, zk, alive, create database) Notes: - `FORMAT Vertical` had been replaced with printing of `pandas.DataFrame` And after this patch tiny tests work with the speed of the test, and does not requires +-5 seconds of bootstrapping.
683dfc7 to
e2d6698
Compare
|
How about adding an option to run tests with |
Ok. |
This will too strange. Then, I would prefer to just leave it as-is (i.e. close this PR). I've converted it to python driver to make it faster since executing binaries (even from release build) will be always slower then simply connect+send+recv (i.e. native protocol). |
Ok. I think it's worth doing.
|
I missed this reply "this PR converts only service use of clickhouse-client" and thought it was to replace clickhouse-client for |
|
Btw, why don't we just use HTTP for this purpose instead? |
I don't see any benefits in using HTTP instead of TCP. |
|
BTW looks like everything related had been passed!
Requires image update (@alesapin I guess it will be done automatically after merge?). |
Ok, I haven't understand that clear enough. @amosbird is right, HTTP interface can be also used instead of clickhouse-driver (python). Cons:
Pros:
So maybe someone else has some opinion on this? |
|
I don't have stong opinion on that - let's use what will be more convenient. |
Also note, that this should make integration tests green. |
|
Some numbers:
DetailsSELECT DISTINCT
check_duration_ms,
if(report_url LIKE '%268c155b7d4b15524219ea48cf228bf140cf9cdd%', 'python-requests', '') AS mr
FROM checks
WHERE (check_start_time > today()) AND (pull_request_number = 0) AND (report_url LIKE '%stateless_tests_(debug)%')
ORDER BY check_start_time ASC
FORMAT PrettyCompactMonoBlock
Query id: e9252c81-fe1c-4387-b62c-1a4c69e72715
┌─check_duration_ms─┬─mr──────────────┐
│ 9168779 │ │
│ 11118219 │ │
│ 7965240 │ python-requests │
│ 8240968 │ │
│ 8505889 │ │
│ 8503848 │ │
│ 8318323 │ │
│ 8066711 │ │
└───────────────────┴─────────────────┘
DetailsSELECT DISTINCT
check_duration_ms,
if(report_url LIKE '%268c155b7d4b15524219ea48cf228bf140cf9cdd%', 'python-requests', '') AS mr
FROM checks
WHERE (check_start_time > today()) AND (pull_request_number = 0) AND (report_url LIKE '%stateless_tests_(memory)%')
ORDER BY check_start_time ASC
FORMAT PrettyCompactMonoBlock
Query id: bc1993e5-413f-4d6a-86e2-66e0c1465efb
┌─check_duration_ms─┬─mr──────────────┐
│ 7283462 │ │
│ 7491509 │ │
│ 7040965 │ python-requests │
│ 6817031 │ │
│ 6866696 │ │
│ 6504630 │ │
│ 6624146 │ │
│ 6728470 │ │
└───────────────────┴─────────────────┘ |
Should we fallback to using |
|
Another issue: |
Have a fallback for this code looks error prone and does not worth it to me. P.S. I also think that fallback for jinja is extra complexity that does not worth it.
@tavplubix what version of clickhouse-driver do you have? (It should not produce such warnings after mymarilyn/clickhouse-driver#142) Actually I've talked with @alesapin and he said his strong objections against using clickhouse-driver for clickhouse-test, so I'm planning to rewrite it to simple python requests (and using HTTP interface). |
+1. |
Before ClickHouse#29856 `CREATE DATABASE` overwrites it. Reported-by: @amosbird
| if args.replicated_database: | ||
| drop_database_query += " ON CLUSTER test_cluster_database_replicated" |
There was a problem hiding this comment.
These lines should not have been removed
Pros:
clickhouse-clientin debug build takes almost a second to execute simpleSELECT 1and
clickhouse-testrequires ~5 queries at start (determine someflags, zk, alive, create database)
Notes:
FORMAT Verticalhad been replaced with printing ofpandas.DataFrameAnd after this patch tiny tests work with the speed of the test, and
does not requires +-5 seconds of bootstrapping.
Changelog category (leave one):