mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Leave only simplifications
This commit is contained in:
parent
64c829807c
commit
857856b8b6
@ -63,25 +63,6 @@ function left_or_right()
|
|||||||
|
|
||||||
function configure
|
function configure
|
||||||
{
|
{
|
||||||
# Setup a cluster for logs export to ClickHouse Cloud
|
|
||||||
# Note: these variables are provided to the Docker run command by the Python script in tests/ci
|
|
||||||
if [ -n "${CLICKHOUSE_CI_LOGS_HOST}" ]
|
|
||||||
then
|
|
||||||
set +x
|
|
||||||
echo "
|
|
||||||
remote_servers:
|
|
||||||
system_logs_export:
|
|
||||||
shard:
|
|
||||||
replica:
|
|
||||||
secure: 1
|
|
||||||
user: ci
|
|
||||||
host: '${CLICKHOUSE_CI_LOGS_HOST}'
|
|
||||||
port: 9440
|
|
||||||
password: '${CLICKHOUSE_CI_LOGS_PASSWORD}'
|
|
||||||
" > right/config/config.d/system_logs_export.yaml
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use the new config for both servers, so that we can change it in a PR.
|
# Use the new config for both servers, so that we can change it in a PR.
|
||||||
rm right/config/config.d/text_log.xml ||:
|
rm right/config/config.d/text_log.xml ||:
|
||||||
cp -rv right/config left ||:
|
cp -rv right/config left ||:
|
||||||
@ -111,25 +92,6 @@ remote_servers:
|
|||||||
wait_for_server $LEFT_SERVER_PORT $left_pid
|
wait_for_server $LEFT_SERVER_PORT $left_pid
|
||||||
echo "Server for setup started"
|
echo "Server for setup started"
|
||||||
|
|
||||||
# Initialize export of system logs to ClickHouse Cloud
|
|
||||||
# Note: it is set up for the "left" server, and its database is then cloned to the "right" server.
|
|
||||||
if [ -n "${CLICKHOUSE_CI_LOGS_HOST}" ]
|
|
||||||
then
|
|
||||||
(
|
|
||||||
set +x
|
|
||||||
export EXTRA_COLUMNS_EXPRESSION="$PR_TO_TEST AS pull_request_number, '$SHA_TO_TEST' AS commit_sha, '$CHECK_START_TIME' AS check_start_time, '$CHECK_NAME' AS check_name, '$INSTANCE_TYPE' AS instance_type"
|
|
||||||
export CONNECTION_PARAMETERS="--secure --user ci --host ${CLICKHOUSE_CI_LOGS_HOST} --password ${CLICKHOUSE_CI_LOGS_PASSWORD}"
|
|
||||||
|
|
||||||
/setup_export_logs.sh "--port $LEFT_SERVER_PORT"
|
|
||||||
|
|
||||||
# Unset variables after use
|
|
||||||
export CONNECTION_PARAMETERS=''
|
|
||||||
export CLICKHOUSE_CI_LOGS_HOST=''
|
|
||||||
export CLICKHOUSE_CI_LOGS_PASSWORD=''
|
|
||||||
set -x
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
clickhouse-client --port $LEFT_SERVER_PORT --query "create database test" ||:
|
clickhouse-client --port $LEFT_SERVER_PORT --query "create database test" ||:
|
||||||
clickhouse-client --port $LEFT_SERVER_PORT --query "rename table datasets.hits_v1 to test.hits" ||:
|
clickhouse-client --port $LEFT_SERVER_PORT --query "rename table datasets.hits_v1 to test.hits" ||:
|
||||||
|
|
||||||
|
@ -39,8 +39,6 @@ def get_run_command(
|
|||||||
instance_type = get_instance_type()
|
instance_type = get_instance_type()
|
||||||
|
|
||||||
envs = [
|
envs = [
|
||||||
"-e CLICKHOUSE_CI_LOGS_HOST",
|
|
||||||
"-e CLICKHOUSE_CI_LOGS_PASSWORD",
|
|
||||||
f"-e CHECK_START_TIME='{check_start_time}'",
|
f"-e CHECK_START_TIME='{check_start_time}'",
|
||||||
f"-e CHECK_NAME='{check_name}'",
|
f"-e CHECK_NAME='{check_name}'",
|
||||||
f"-e INSTANCE_TYPE='{instance_type}'",
|
f"-e INSTANCE_TYPE='{instance_type}'",
|
||||||
@ -203,22 +201,6 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
subprocess.check_call(f"sudo chown -R ubuntu:ubuntu {temp_path}", shell=True)
|
subprocess.check_call(f"sudo chown -R ubuntu:ubuntu {temp_path}", shell=True)
|
||||||
|
|
||||||
# Cleanup run log from the credentials of CI logs database.
|
|
||||||
# Note: a malicious user can still print them by splitting the value into parts.
|
|
||||||
# But we will be warned when a malicious user modifies CI script.
|
|
||||||
# Although they can also print them from inside tests.
|
|
||||||
# Nevertheless, the credentials of the CI logs have limited scope
|
|
||||||
# and does not provide access to sensitive info.
|
|
||||||
|
|
||||||
ci_logs_host = os.getenv("CLICKHOUSE_CI_LOGS_HOST", "CLICKHOUSE_CI_LOGS_HOST")
|
|
||||||
ci_logs_password = os.getenv(
|
|
||||||
"CLICKHOUSE_CI_LOGS_PASSWORD", "CLICKHOUSE_CI_LOGS_PASSWORD"
|
|
||||||
)
|
|
||||||
subprocess.check_call(
|
|
||||||
f"sed -i -r -e 's!{ci_logs_host}!CLICKHOUSE_CI_LOGS_HOST!g; s!{ci_logs_password}!CLICKHOUSE_CI_LOGS_PASSWORD!g;' '{run_log_path}' '{compare_log_path}'",
|
|
||||||
shell=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
paths = {
|
paths = {
|
||||||
"compare.log": compare_log_path,
|
"compare.log": compare_log_path,
|
||||||
"output.7z": os.path.join(result_path, "output.7z"),
|
"output.7z": os.path.join(result_path, "output.7z"),
|
||||||
|
Loading…
Reference in New Issue
Block a user