Skip to content

Instantly share code, notes, and snippets.

View leshikus's full-sized avatar
💭
happy

Alexei Fedotov leshikus

💭
happy
View GitHub Profile
@leshikus
leshikus / about-me.txt
Created September 30, 2025 22:34
About Me
I am an experienced DevOps and Linux engineer with over 20 years' experience in automation, system reliability and operations. I have been involved in several open-source projects, including Apache Harmony, Apache OpenMeetings, and Astra Linux Orel. I am also a fan of the ClickHouse technology and the open-source culture behind the project. I hope to make CI and related services more useful and usable for the team.
@leshikus
leshikus / run-praktika.sh
Created August 27, 2025 18:10
02443_detach_attach_partition reproducer
#!/bin/bash
set -eu
cd $(dirname "$0")/ClickHouse
cur_dir=$(pwd -P)
mkdir -p ci/tmp
mv ci/tmp ci/tmp-del$RANDOM
@leshikus
leshikus / praktika.sh
Created August 21, 2025 19:29
Run a single test via `praktika`
#!/bin/bash
set -eu
#test=03540_system_dashboards
#test=02443_detach_attach_partition
test=01154_move_partition_long
test=01086_odbc_roundtrip
wf="Stateless tests (amd_debug, sequential)"
#wf="Stateless tests (amd_binary, old analyzer, s3 storage, DatabaseReplicated, parallel)"
Starting ClickHouse server replica 0, command: clickhouse-server --config-file /etc/clickhouse-server/config.xml --pid-file /etc/clickhouse-server/clickhouse-server.pid -- --path /home/aaf/ClickHouse/ci/tmp/run_r0 --user_files_path /home/aaf/ClickHouse/ci/tmp/run_r0/user_files --top_level_domains_path /etc/clickhouse-server/top_level_domains --logger.stderr /home/aaf/ClickHouse/ci/tmp/var/log/clickhouse-server/stderr.log
rm: cannot remove '/etc/clickhouse-server/clickhouse-server.pid': No such file or directory
Run command: [rm -rf /home/aaf/ClickHouse/ci/tmp/run_r0 && mkdir -p /home/aaf/ClickHouse/ci/tmp/run_r0]
Run command: [rm -rf /home/aaf/ClickHouse/ci/tmp/jemalloc_profiles && mkdir -p /home/aaf/ClickHouse/ci/tmp/jemalloc_profiles]
TSAN_OPTIONS = memory_limit_mb=5146
WARNING: stderr: cat: /etc/clickhouse-server/clickhouse-server.pid: No such file or directory
Got pid from fs [1591]
ClickHouse server replica 0 started successfully, pid [1591]
Run command [clickhouse-client --port 9000 --query "select 1"]
@leshikus
leshikus / 02443_detach_attach_partition.log
Created August 17, 2025 08:29
02443_detach_attach_partition test log
2025-08-16 13:00:04 Reason: result differs with reference:
2025-08-16 13:00:04 --- /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/tests/queries/0_stateless/02443_detach_attach_partition.reference 2025-08-16 12:50:58.728674382 -0400
2025-08-16 13:00:04 +++ /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/tests/queries/0_stateless/02443_detach_attach_partition.3922.stdout 2025-08-16 13:00:04.085598505 -0400
2025-08-16 13:00:04 @@ -1,17 +1,209 @@
2025-08-16 13:00:04 -cluster_1S_2R 1 1 clickhouse-01 9000 \N
2025-08-16 13:00:04 -cluster_1S_2R 1 2 clickhouse-02 9000 \N
2025-08-16 13:00:04 -default 1 1 localhost 9000 \N
2025-08-16 13:00:04 -cluster_1S_2R 1 1 clickhouse-01 9000 \N
2025-08-16 13:00:04 -cluster_1S_2R 1 2 clickhouse-02 9000 \N
2025-08-16 13:00:04 -default 1 1 localhost 9000 \N
@leshikus
leshikus / setup_wsl.sh
Created August 11, 2025 18:33
set env in wsl
# specific settings go here
export HTTPS_PROXY="$https_proxy"
export EDITOR=vim
cd
export PS1="\[\033]0;$TITLEPREFIX:$PWD\007\]\n\[\033[32m\]\u@\h \[\033[35m\]$MSYSTEM \[\033[33m\]\w\[\033[36m\] `pwd -P`\[\033[0m\]\n$ "
cat <<EOF >.vimrc
syntax on
@leshikus
leshikus / 02933_group_by_memory_usage.sql
Created August 10, 2025 21:15
get info on specific test failures
select test_status, check_start_time from checks where test_status = 'FAIL' and test_name = '02933_group_by_memory_usage' and pull_request_number = 0 and check_start_time > now() - interval 2 month order by check_start_time desc;
@leshikus
leshikus / get_failed.sql
Last active August 10, 2025 13:30
Get failed ClickHouse tests
select test_name, count(test_name) from checks where test_status = 'FAIL' and pull_request_number = 0 and check_start_time > now() - interval 1 month group by test_name order by count(test_name) desc;
@leshikus
leshikus / soft-skills.txt
Created July 25, 2025 12:40
Soft skills video transcript
00:00:00.080 такой человек, ну, как бы совсем ни разу
00:00:02.320 не командный игрок. Его все хотят
00:00:04.080 придушить. С другой стороны, ну, работа
00:00:05.759 нужна. Не сойдётся с командой, команда
00:00:07.680 не сойдётся с ним. С ним будет плохо
00:00:09.440 работать, он не сможет вписаться. И это
00:00:12.120 риски. Жун может быть
00:00:14.080 приятным обобщении, а Синер токсичным,
00:00:16.680 самоуверенным и вообще упырём. Там
00:00:19.160 тонкая грань. Да ну его нафиг. Петя
@leshikus
leshikus / setup-grafana-kube.yaml
Created July 16, 2025 18:01
Setup grafana in kube
---
- name: Setup local Kubernetes cluster with Grafana
hosts: localhost
vars:
arch: amd64
cluster_name: kind-grafana
kubectl_url: "https://dl.k8s.io/release/{{ lookup('url', 'https://dl.k8s.io/release/stable.txt') }}/bin/linux/{{ arch }}/kubectl"
kind_url: "https://kind.sigs.k8s.io/dl/latest/kind-linux-{{ arch }}"
helm_script_url: "https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3"
do_restart: true