Skip to content

Instantly share code, notes, and snippets.

View leshikus's full-sized avatar
💭
happy

Alexei Fedotov leshikus

💭
happy
View GitHub Profile
⏺ Here's a summary of all changes made in this session:
ci/jobs/scripts/clickhouse_service.py — main work landed here:
- Added collect_cores static method: compresses up to 3 core.* files with zstd, encrypts each with AES-256-CBC, wraps the AES key with RSA-OAEP using ci/defs/public.pem,
returns encrypted files + RSA-wrapped key. Added assert that the public key exists.
- Added collect_logs, collect_coordination_logs, collect_jemalloc_profiles — ported from ClickHouseProc, adapted for single-server paths.
- Added prepare_logs — combines all four collectors with error handling; replaces the scattered _get_logs_* + _collect_core_dumps pattern from ClickHouseProc.
- Added stdlib imports needed: glob, traceback, sys, defaultdict, List.
ci/jobs/scripts/clickhouse_proc.py:
@leshikus
leshikus / returned_emigrants_fate.md
Last active April 18, 2026 17:18
Returning migrants fate

Судьба вернувшихся эмигрантов первой волны

Полный аудит по категории Википедии «Вернувшиеся русские эмигранты первой волны» (153 человека).


1. Убиты государством или доведены до смерти (47 чел.)

Расстреляны (35 чел.)

| № | Имя | Ссылка | Год |

@leshikus
leshikus / remeslo.txt
Created March 20, 2026 22:08
Remeslo:Pluschev interview
Первый вопрос, который я хотел задать.
Скажите, Илья, действуете ли вы
добровольно вот всё, что происходит за
последние сутки? И, э, не находитесь ли,
например, под воздействием каких-то
третьих людей, ну, там, скажем,
мошенников?
>> Нет, я абсолютно добровольно действую.
Вот, то есть
я пишу, естественно, всё это, то есть, и
@leshikus
leshikus / sort-items.dhack
Last active March 3, 2026 21:34
Simple item sorting utilitities
# dump clothes to a stockpile
multicmd item dump -t armor -c cloth; item dump -t pants -c cloth; item dump -t gloves -c cloth; item dump -t shoes -c cloth
multicmd item dump -t armor -c yarn; item dump -t pants -c yarn; item dump -t gloves -c yarn; item dump -t shoes -c yarn
multicmd item dump -t armor -c silk; item dump -t pants -c silk; item dump -t gloves -c silk; item dump -t shoes -c silk
multicmd item dump -t armor -c plant; item dump -t pants -c plant; item dump -t gloves -c plant; item dump -t shoes -c plant
multicmd item dump -t armor -c silk; item dump -t pants -c leather; item dump -t gloves -c leather; item dump -t shoes -c leather
autodump
# dump unusable large clothes to the depot
multicmd item dump -t armor large; item dump -t pants large; item dump -t gloves large; item dump -t shoes large
@leshikus
leshikus / trade.au3
Last active February 9, 2026 14:03
Trade seeds for merchant leveling in Dwarf Fortress
Global $df_window = "Dwarf Fortress"
Global $sleep_time = 1000
AutoItSetOption("SendKeyDelay", 150)
AutoItSetOption("MouseClickDownDelay", 20)
; use standard scale
; center on your broker
For $i = 1 To 20
WinWaitActive($df_window)
@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