Skip to content

Commit b11abdb

Browse files
committed
ci: add a message when the command is killed with timeout (add --verbose)
This should make things clear
1 parent f7b89bd commit b11abdb

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

ci/jobs/scripts/functional_tests/setup_log_cluster.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function stop_logs_replication
193193
clickhouse-client --query "select database||'.'||table from system.tables where database = 'system' and (table like '%_sender' or table like '%_watcher')" | {
194194
tee /dev/stderr
195195
} | {
196-
timeout --preserve-status --signal TERM --kill-after 5m 15m xargs -n1 -P10 -r -i clickhouse-client --query "drop table {}"
196+
timeout --verbose --preserve-status --signal TERM --kill-after 5m 15m xargs -n1 -P10 -r -i clickhouse-client --query "drop table {}"
197197
}
198198
}
199199

ci/jobs/scripts/fuzzer/runner.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ EOF
6666
# Allow the fuzzer to run for some time, giving it a grace period of 5m to finish once the time
6767
# out triggers. After that, it'll send a SIGKILL to the fuzzer to make sure it finishes within
6868
# a reasonable time.
69-
timeout -s TERM --kill-after=5m --preserve-status 30m clickhouse-client \
69+
timeout --verbose --signal TERM --kill-after=5m --preserve-status 30m clickhouse-client \
7070
--max_memory_usage_in_client=1000000000 \
7171
--receive_timeout=10 \
7272
--receive_data_timeout_ms=10000 \

docker/test/base/setup_export_logs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,6 @@ function stop_logs_replication
216216
clickhouse-client --query "select database||'.'||table from system.tables where database = 'system' and (table like '%_sender' or table like '%_watcher')" | {
217217
tee /dev/stderr
218218
} | {
219-
timeout --preserve-status --signal TERM --kill-after 5m 15m xargs -n1 -P10 -r -i clickhouse-client --query "drop table {}"
219+
timeout --verbose --preserve-status --signal TERM --kill-after 5m 15m xargs -n1 -P10 -r -i clickhouse-client --query "drop table {}"
220220
}
221221
}

docker/test/fuzzer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ COPY * /
3939
SHELL ["/bin/bash", "-c"]
4040
CMD set -o pipefail \
4141
&& cd /workspace \
42-
&& timeout -s 9 1h /run-fuzzer.sh 2>&1 | ts "$(printf '%%Y-%%m-%%d %%H:%%M:%%S\t')" | tee main.log
42+
&& timeout --verbose --signal 9 1h /run-fuzzer.sh 2>&1 | ts "$(printf '%%Y-%%m-%%d %%H:%%M:%%S\t')" | tee main.log
4343

4444
# docker run --network=host --volume <workspace>:/workspace -e PR_TO_TEST=<> -e SHA_TO_TEST=<> clickhouse/fuzzer
4545

docker/test/fuzzer/run-fuzzer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ EOF
288288
# Allow the fuzzer to run for some time, giving it a grace period of 5m to finish once the time
289289
# out triggers. After that, it'll send a SIGKILL to the fuzzer to make sure it finishes within
290290
# a reasonable time.
291-
timeout -s TERM --kill-after=5m --preserve-status 30m clickhouse-client \
291+
timeout --verbose --signal TERM --kill-after=5m --preserve-status 30m clickhouse-client \
292292
--max_memory_usage_in_client=1000000000 \
293293
--receive_timeout=10 \
294294
--receive_data_timeout_ms=10000 \

tests/ci/integration_tests_runner.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def clear_ip_tables_and_restart_daemons():
106106
try:
107107
logging.info("Killing all alive docker containers")
108108
subprocess.check_output(
109-
"timeout --signal=KILL 10m docker ps --quiet | xargs --no-run-if-empty docker kill",
109+
"timeout --verbose --signal=KILL 10m docker ps --quiet | xargs --no-run-if-empty docker kill",
110110
shell=True,
111111
)
112112
except subprocess.CalledProcessError as err:
@@ -115,7 +115,7 @@ def clear_ip_tables_and_restart_daemons():
115115
try:
116116
logging.info("Removing all docker containers")
117117
subprocess.check_output(
118-
"timeout --signal=KILL 10m docker ps --all --quiet | xargs --no-run-if-empty docker rm --force",
118+
"timeout --verbose --signal=KILL 10m docker ps --all --quiet | xargs --no-run-if-empty docker rm --force",
119119
shell=True,
120120
)
121121
except subprocess.CalledProcessError as err:
@@ -230,7 +230,7 @@ def _pre_pull_images(self):
230230

231231
cmd = (
232232
f"cd {self.repo_path}/tests/integration && "
233-
f"timeout --signal=KILL 1h ./runner {self._get_runner_opts()} {image_cmd} "
233+
f"timeout --verbose --signal=KILL 1h ./runner {self._get_runner_opts()} {image_cmd} "
234234
"--command ' echo Pre Pull finished ' "
235235
)
236236

@@ -364,7 +364,7 @@ def all_tests(self) -> List[str]:
364364
report_file = "runner_get_all_tests.jsonl"
365365
cmd = (
366366
f"cd {self.repo_path}/tests/integration && "
367-
f"timeout --signal=KILL 1h ./runner {runner_opts} {image_cmd} -- "
367+
f"timeout --verbose --signal=KILL 1h ./runner {runner_opts} {image_cmd} -- "
368368
f"--setup-plan --report-log={report_file}"
369369
)
370370

@@ -603,7 +603,7 @@ def run_test_group(
603603
# -s -- (s)kipped
604604
cmd = (
605605
f"cd {self.repo_path}/tests/integration && "
606-
f"timeout --signal=KILL {timeout} ./runner {self._get_runner_opts()} "
606+
f"timeout --verbose --signal=KILL {timeout} ./runner {self._get_runner_opts()} "
607607
f"{image_cmd} -t {test_cmd} {parallel_cmd} {repeat_cmd} -- "
608608
f"-rfEps --run-id={i} --color=no --durations=0 "
609609
f"--report-log={report_name} --report-log-exclude-logs-on-passed-tests "

0 commit comments

Comments
 (0)