Skip to content

Conversation

@maximyurchuk
Copy link
Collaborator

@maximyurchuk maximyurchuk commented May 16, 2025

This PR adds support for rolling updates in the compatibility tests by introducing a new fixture and test, and ensures that updated binaries are picked up when restarting cluster nodes.

@maximyurchuk maximyurchuk changed the title gRoll fixture Roll fixture May 16, 2025
@maximyurchuk maximyurchuk requested a review from Copilot May 16, 2025 16:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for rolling updates in the compatibility tests by introducing a new fixture and test, and ensures that updated binaries are picked up when restarting cluster nodes.

  • Added a binary_path setter and pre-start command update in KiKiMRNode
  • Introduced RollingUpdateFixture in compatibility fixtures to drive rolling updates
  • Added a new test_rolling.py and included it in the compatibility test suite

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
ydb/tests/library/harness/kikimr_runner.py Add binary_path setter and call update_command before node start
ydb/tests/library/compatibility/fixtures.py Add RollingUpdateFixture with setup_cluster and roll methods
ydb/tests/compatibility/ya.make Register test_rolling.py in the compatibility test targets
ydb/tests/compatibility/test_rolling.py New rolling update test using the RollingUpdateFixture
Comments suppressed due to low confidence (1)

ydb/tests/library/compatibility/fixtures.py:117

  • last_stable_binary_path is not defined or imported in this module, causing a NameError. Please import it or define it before use.
self.all_binary_paths = [last_stable_binary_path]

Comment on lines 122 to 123
binary_paths=self.all_binary_p
aths,
Copy link

Copilot AI May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The binary_paths argument is split across two lines resulting in invalid syntax. It should be a single identifier, e.g.: binary_paths=self.all_binary_paths,

Suggested change
binary_paths=self.all_binary_p
aths,
binary_paths=self.all_binary_paths,

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented May 16, 2025

🟢 2025-05-16 18:00:17 UTC The validation of the Pull Request description is successful.

@github-actions
Copy link

github-actions bot commented May 16, 2025

2025-05-16 16:20:11 UTC Pre-commit check linux-x86_64-relwithdebinfo for bcf49f4 has started.
2025-05-16 16:20:21 UTC Artifacts will be uploaded here
2025-05-16 16:21:05 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented May 16, 2025

2025-05-16 16:20:44 UTC Pre-commit check linux-x86_64-release-asan for bcf49f4 has started.
2025-05-16 16:20:58 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented May 16, 2025

2025-05-16 16:26:44 UTC Pre-commit check linux-x86_64-relwithdebinfo for c0abf33 has started.
2025-05-16 16:27:10 UTC Artifacts will be uploaded here
2025-05-16 16:29:36 UTC ya make is running...
2025-05-16 16:48:25 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented May 16, 2025

2025-05-16 16:32:26 UTC Pre-commit check linux-x86_64-release-asan for c0abf33 has started.
2025-05-16 16:32:37 UTC Artifacts will be uploaded here
2025-05-16 16:35:07 UTC ya make is running...
2025-05-16 16:48:24 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented May 16, 2025

2025-05-16 16:50:18 UTC Pre-commit check linux-x86_64-release-asan for 19a4f60 has started.
2025-05-16 16:50:30 UTC Artifacts will be uploaded here
2025-05-16 16:53:03 UTC ya make is running...
2025-05-16 17:22:11 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented May 16, 2025

2025-05-16 16:54:04 UTC Pre-commit check linux-x86_64-relwithdebinfo for 19a4f60 has started.
2025-05-16 16:54:08 UTC Artifacts will be uploaded here
2025-05-16 16:56:27 UTC ya make is running...
2025-05-16 17:22:09 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented May 16, 2025

2025-05-16 17:24:04 UTC Pre-commit check linux-x86_64-relwithdebinfo for 5ce85f4 has started.
2025-05-16 17:24:10 UTC Artifacts will be uploaded here
2025-05-16 17:26:50 UTC ya make is running...
2025-05-16 17:52:35 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented May 16, 2025

2025-05-16 17:24:46 UTC Pre-commit check linux-x86_64-release-asan for 5ce85f4 has started.
2025-05-16 17:25:18 UTC Artifacts will be uploaded here
2025-05-16 17:28:35 UTC ya make is running...
2025-05-16 17:52:35 UTC Check cancelled

@maximyurchuk maximyurchuk changed the title Roll fixture Rolling update fixture May 16, 2025
@github-actions
Copy link

github-actions bot commented May 16, 2025

2025-05-16 17:56:20 UTC Pre-commit check linux-x86_64-relwithdebinfo for 4fd3a6c has started.
2025-05-16 17:56:32 UTC Artifacts will be uploaded here
2025-05-16 17:58:57 UTC ya make is running...
🟢 2025-05-16 18:41:40 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
5602 5457 0 0 126 19

🟢 2025-05-16 18:42:12 UTC Build successful.
🟡 2025-05-16 18:42:23 UTC ydbd size 2.2 GiB changed* by +496.2 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 50acebb merge: 4fd3a6c diff diff %
ydbd size 2 353 875 912 Bytes 2 354 384 032 Bytes +496.2 KiB +0.022%
ydbd stripped size 494 648 808 Bytes 494 724 872 Bytes +74.3 KiB +0.015%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

github-actions bot commented May 16, 2025

2025-05-16 17:56:34 UTC Pre-commit check linux-x86_64-release-asan for 4fd3a6c has started.
2025-05-16 17:56:46 UTC Artifacts will be uploaded here
2025-05-16 17:59:14 UTC ya make is running...
🟡 2025-05-16 18:48:26 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
2308 2250 0 12 32 14

2025-05-16 18:48:47 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-16 19:11:46 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
346 (only retried tests) 315 0 11 8 12

2025-05-16 19:11:55 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-05-16 19:32:20 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
346 (only retried tests) 304 0 10 18 14

🟢 2025-05-16 19:32:27 UTC Build successful.
🟢 2025-05-16 19:32:47 UTC ydbd size 3.9 GiB changed* by +15.8 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 5fa10e1 merge: 4fd3a6c diff diff %
ydbd size 4 141 831 944 Bytes 4 141 848 112 Bytes +15.8 KiB +0.000%
ydbd stripped size 1 437 642 840 Bytes 1 437 659 128 Bytes +15.9 KiB +0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation


for _ in self.roll():
time.sleep(5)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я бы после roll предложил выполнить команды run, чтобы проверить что 1) таблицы не пропали 2) что все еще все работает

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Так run выполняется бесконечно пока кластер обновляется. + тут есть холостая итерация (см последний yield в реализации roll)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не понял =( т.е тест выглядит так?

  1. запускаемся на версии A
  2. init + run
  3. rolling update на версию B, потом обратно на версию A?

yield
self.cluster.stop()

def roll(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

если честно не понял механику: этот метод делает обновление два раза? сначала на новый потом на старый?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да. Типа сначала накат, потом откат. У меня есть дока с пояснениями, я ее выложу как текущий ПР волью

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

имхо это отличается от дефолтного понимания метода rolling_update. он должен как будто только с версии A на версию B переходить, а не откатывать потом еще обратно,
Это выглядит как другой сценарий/ класст тестов

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Давай назову
RollingUpgradeAndDowngradeFixture
-- кажется действительно более корректно
Норм?

@maximyurchuk maximyurchuk merged commit a487c8d into ydb-platform:main May 19, 2025
29 of 30 checks passed
nshestakov pushed a commit to nshestakov/ydb that referenced this pull request May 20, 2025
xyliganSereja pushed a commit to xyliganSereja/ydb_work that referenced this pull request Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants