ydb icon indicating copy to clipboard operation
ydb copied to clipboard

Cherry pick support merge commits

Open naspirato opened this issue 1 month ago • 12 comments

Changelog entry

Обновление: улучшенный cherry-pick скрипт и workflow

Коротко:

  • Рефакторинг .github/scripts/cherry_pick_v2.py (логирование, обработка ошибок) + поддержка merge-commit.
  • имя изменено на "Cherry-pick".
  • Удалены старые файлы cherry_pick.py и cherry_pick.yml.

Основные изменения:

  • run_git: централизованный запуск git с подробным логированием stdout/stderr и кода возврата.
  • Улучшена обработка cherry-pick:
    • Detect merge commits и выполнение cherry-pick с -m 1 для merge-коммитов.
    • Детекция конфликтов через отдельную ф-ю и commit с пометкой BACKPORT-CONFLICT при ручном разрешении.
    • Автоматический commit для неконфликтных изменений и поддержка пустых коммитов (--allow-empty).
  • При передаче SHA пропускается поиск связанного PR (skip_linked_pr), чтобы не подцепить неверный PR.
  • Клонирование репозитория теперь проверяет ошибки и даёт понятную ошибку при неудаче.

Последствия:

  • Надёжнее и информативнее при backport'ах, лучше логирует причины ошибок и корректно обрабатывает merge-коммиты и конфликтные сценарии.

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

...

naspirato avatar Dec 10 '25 12:12 naspirato

Run Extra Tests

Run additional tests for this PR. You can customize:

  • Test Size: small, medium, large (default: all)
  • Test Targets: any directory path (default: ydb/)
  • Sanitizers: ASAN, MSAN, TSAN
  • Coredumps: enable for debugging (default: off)
  • Additional args: custom ya make arguments

▶  Run tests

ydbot avatar Dec 10 '25 12:12 ydbot

:green_circle: 2025-12-11 10:34:40 UTC The validation of the Pull Request description is successful.

github-actions[bot] avatar Dec 10 '25 12:12 github-actions[bot]

:white_circle: 2025-12-10 12:14:40 UTC Pre-commit check linux-x86_64-relwithdebinfo for 45513a8aa6cbe454f7da75963f293357dd311431 has started. :white_circle: 2025-12-10 12:15:15 UTC Artifacts will be uploaded here :white_circle: 2025-12-10 12:17:08 UTC ya make is running... :green_circle: 2025-12-10 12:17:15 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

:green_circle: 2025-12-10 12:17:20 UTC Build successful.

github-actions[bot] avatar Dec 10 '25 12:12 github-actions[bot]

:white_circle: 2025-12-10 12:17:54 UTC Pre-commit check linux-x86_64-release-asan for 45513a8aa6cbe454f7da75963f293357dd311431 has started. :white_circle: 2025-12-10 12:18:10 UTC Artifacts will be uploaded here :white_circle: 2025-12-10 12:20:18 UTC ya make is running... :green_circle: 2025-12-10 12:20:24 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

:green_circle: 2025-12-10 12:20:29 UTC Build successful.

github-actions[bot] avatar Dec 10 '25 12:12 github-actions[bot]

:white_circle: 2025-12-10 12:24:39 UTC Pre-commit check linux-x86_64-release-asan for c4745a8108e4f853cbd8309e83676b5ee7367b68 has started. :white_circle: 2025-12-10 12:24:45 UTC Artifacts will be uploaded here :white_circle: 2025-12-10 12:25:58 UTC ya make is running... :green_circle: 2025-12-10 12:26:04 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

:green_circle: 2025-12-10 12:26:09 UTC Build successful.

github-actions[bot] avatar Dec 10 '25 12:12 github-actions[bot]

:white_circle: 2025-12-10 12:25:05 UTC Pre-commit check linux-x86_64-relwithdebinfo for c4745a8108e4f853cbd8309e83676b5ee7367b68 has started. :white_circle: 2025-12-10 12:25:11 UTC Artifacts will be uploaded here :white_circle: 2025-12-10 12:26:31 UTC ya make is running... :green_circle: 2025-12-10 12:26:36 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

:green_circle: 2025-12-10 12:26:42 UTC Build successful.

github-actions[bot] avatar Dec 10 '25 12:12 github-actions[bot]

:white_circle: 2025-12-10 12:30:03 UTC Pre-commit check linux-x86_64-relwithdebinfo for e0eb9fee1a66f12994db376aec762b87bfab2ee4 has started. :white_circle: 2025-12-10 12:30:21 UTC Artifacts will be uploaded here :white_circle: 2025-12-10 12:32:29 UTC ya make is running... :green_circle: 2025-12-10 12:32:34 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

:green_circle: 2025-12-10 12:32:40 UTC Build successful.

github-actions[bot] avatar Dec 10 '25 12:12 github-actions[bot]

:white_circle: 2025-12-10 12:30:54 UTC Pre-commit check linux-x86_64-release-asan for e0eb9fee1a66f12994db376aec762b87bfab2ee4 has started. :white_circle: 2025-12-10 12:31:11 UTC Artifacts will be uploaded here :white_circle: 2025-12-10 12:33:14 UTC ya make is running... :green_circle: 2025-12-10 12:33:20 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

:green_circle: 2025-12-10 12:33:25 UTC Build successful.

github-actions[bot] avatar Dec 10 '25 12:12 github-actions[bot]

:white_circle: 2025-12-10 12:35:07 UTC Pre-commit check linux-x86_64-relwithdebinfo for 3cbe8bc102508452072ab1a0b2554283fe3e6117 has started. :white_circle: 2025-12-10 12:35:25 UTC Artifacts will be uploaded here :white_circle: 2025-12-10 12:37:29 UTC ya make is running... :green_circle: 2025-12-10 12:37:35 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

:green_circle: 2025-12-10 12:37:40 UTC Build successful.

github-actions[bot] avatar Dec 10 '25 12:12 github-actions[bot]

:white_circle: 2025-12-10 12:35:10 UTC Pre-commit check linux-x86_64-release-asan for 3cbe8bc102508452072ab1a0b2554283fe3e6117 has started. :white_circle: 2025-12-10 12:35:31 UTC Artifacts will be uploaded here :white_circle: 2025-12-10 12:37:35 UTC ya make is running... :green_circle: 2025-12-10 12:37:41 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

:green_circle: 2025-12-10 12:37:47 UTC Build successful.

github-actions[bot] avatar Dec 10 '25 12:12 github-actions[bot]

:white_circle: 2025-12-10 12:44:32 UTC Pre-commit check linux-x86_64-relwithdebinfo for 5d18075e6400bc61a6f0d14398e14c71f732c59a has started. :white_circle: 2025-12-10 12:44:49 UTC Artifacts will be uploaded here :white_circle: 2025-12-10 12:46:59 UTC ya make is running... :green_circle: 2025-12-10 12:47:06 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

:green_circle: 2025-12-10 12:47:12 UTC Build successful.

github-actions[bot] avatar Dec 10 '25 12:12 github-actions[bot]

:white_circle: 2025-12-10 12:45:25 UTC Pre-commit check linux-x86_64-release-asan for 5d18075e6400bc61a6f0d14398e14c71f732c59a has started. :white_circle: 2025-12-10 12:45:36 UTC Artifacts will be uploaded here :white_circle: 2025-12-10 12:46:59 UTC ya make is running... :green_circle: 2025-12-10 12:47:06 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

:green_circle: 2025-12-10 12:47:12 UTC Build successful.

github-actions[bot] avatar Dec 10 '25 12:12 github-actions[bot]