Pass CHPC_DATABASE_URL to perf tests

This commit is contained in:
vdimir 2022-06-03 15:26:06 +00:00
parent 225c47a457
commit 0232c9267d
No known key found for this signature in database
GPG Key ID: 6EE4CE2BEDC51862
2 changed files with 18 additions and 3 deletions

View File

@ -1269,13 +1269,13 @@ void InterpreterSelectQuery::executeImpl(QueryPlan & query_plan, std::optional<P
if (expressions.need_aggregate) if (expressions.need_aggregate)
executeMergeAggregated(query_plan, aggregate_overflow_row, aggregate_final, use_grouping_set_key); executeMergeAggregated(query_plan, aggregate_overflow_row, aggregate_final, use_grouping_set_key);
} }
if (from_aggregation_stage) if (from_aggregation_stage)
{ {
if (intermediate_stage || expressions.first_stage || expressions.second_stage) if (intermediate_stage || expressions.first_stage || expressions.second_stage)
throw Exception("Query with after aggregation stage cannot have any other stages", ErrorCodes::LOGICAL_ERROR); throw Exception("Query with after aggregation stage cannot have any other stages", ErrorCodes::LOGICAL_ERROR);
} }
if (expressions.first_stage) if (expressions.first_stage)
{ {
// If there is a storage that supports prewhere, this will always be nullptr // If there is a storage that supports prewhere, this will always be nullptr

View File

@ -16,7 +16,7 @@ from commit_status_helper import get_commit, post_commit_status
from ci_config import CI_CONFIG from ci_config import CI_CONFIG
from docker_pull_helper import get_image_with_version from docker_pull_helper import get_image_with_version
from env_helper import GITHUB_EVENT_PATH, GITHUB_RUN_URL from env_helper import GITHUB_EVENT_PATH, GITHUB_RUN_URL
from get_robot_token import get_best_robot_token from get_robot_token import get_best_robot_token, get_parameter_from_ssm
from pr_info import PRInfo from pr_info import PRInfo
from rerun_helper import RerunHelper from rerun_helper import RerunHelper
from s3_helper import S3Helper from s3_helper import S3Helper
@ -133,6 +133,9 @@ if __name__ == "__main__":
if not os.path.exists(result_path): if not os.path.exists(result_path):
os.makedirs(result_path) os.makedirs(result_path)
docker_env += (
f" -e CHPC_DATABASE_URL -e CHPC_DATABASE_USER -e CHPC_DATABASE_PASSWORD"
)
run_command = get_run_command( run_command = get_run_command(
result_path, result_path,
result_path, result_path,
@ -143,8 +146,20 @@ if __name__ == "__main__":
docker_image, docker_image,
) )
logging.info("Going to run command %s", run_command) logging.info("Going to run command %s", run_command)
popen_env = os.environ.copy()
popen_env["CHPC_DATABASE_URL"] = (
get_parameter_from_ssm("clickhouse-test-stat-url"),
)
popen_env["CHPC_DATABASE_USER"] = (
get_parameter_from_ssm("clickhouse-test-stat-login"),
)
popen_env["CHPC_DATABASE_PASSWORD"] = (
get_parameter_from_ssm("clickhouse-test-stat-password"),
)
run_log_path = os.path.join(temp_path, "runlog.log") run_log_path = os.path.join(temp_path, "runlog.log")
with TeePopen(run_command, run_log_path) as process: with TeePopen(run_command, run_log_path, env=popen_env) as process:
retcode = process.wait() retcode = process.wait()
if retcode == 0: if retcode == 0:
logging.info("Run successfully") logging.info("Run successfully")