Skip to content

fix: make incr backup py test a bit more reliable#35322

Open
Enjection wants to merge 1 commit intoydb-platform:mainfrom
Enjection:flaky-backup-incr
Open

fix: make incr backup py test a bit more reliable#35322
Enjection wants to merge 1 commit intoydb-platform:mainfrom
Enjection:flaky-backup-incr

Conversation

@Enjection
Copy link
Member

Replace global restore operation counting (poll_restore_by_count) with
operation ID-based polling (poll_restore_by_id). The old approach counted
ALL restore operations via 'ydb operation list restore' and detected
completion by count deltas, which was racy — a late status update from a
prior restore could cause a false positive, making the test think the
current restore completed before it actually did.

Now we capture baseline operation IDs before RESTORE, diff after to find
the new operation, and poll it specifically with 'ydb operation get'.
Also add a settling delay after _test_incremental_only_restore_failure
to let its failed operation finalize before the next test starts.

Changelog entry

...

Changelog category

  • New feature
  • Experimental feature
  • Improvement
  • Performance improvement
  • User Interface
  • Bugfix
  • Backward incompatible change
  • Documentation (changelog entry is not required)
  • Not for changelog (changelog entry is not required)

Description for reviewers

...

…on ID

Replace global restore operation counting (poll_restore_by_count) with
operation ID-based polling (poll_restore_by_id). The old approach counted
ALL restore operations via 'ydb operation list restore' and detected
completion by count deltas, which was racy — a late status update from a
prior restore could cause a false positive, making the test think the
current restore completed before it actually did.

Now we capture baseline operation IDs before RESTORE, diff after to find
the new operation, and poll it specifically with 'ydb operation get'.
Also add a settling delay after _test_incremental_only_restore_failure
to let its failed operation finalize before the next test starts.
@Enjection Enjection requested a review from a team as a code owner March 3, 2026 08:31
@ydbot
Copy link
Collaborator

ydbot commented Mar 3, 2026

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

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

2026-03-03 08:35:05 UTC Pre-commit check linux-x86_64-release-asan for feb334d has started.
2026-03-03 08:35:21 UTC Artifacts will be uploaded here
2026-03-03 08:37:38 UTC ya make is running...
🟢 2026-03-03 08:38:05 UTC Tests successful.

Ya make output | Test bloat

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

🟢 2026-03-03 08:38:12 UTC Build successful.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

2026-03-03 08:35:22 UTC Pre-commit check linux-x86_64-relwithdebinfo for feb334d has started.
2026-03-03 08:35:39 UTC Artifacts will be uploaded here
2026-03-03 08:38:01 UTC ya make is running...
🟢 2026-03-03 08:40:34 UTC Tests successful.

Ya make output | Test bloat

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

🟢 2026-03-03 08:40:41 UTC Build successful.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

🔴 2026-03-03 08:35:59 UTC The validation of the Pull Request description has failed. Please update the description.

Only one category can be selected at a time.

success_count += 1
ids = set()
for line in output.splitlines():
if "│" not in line or line.strip().startswith(("┌", "├", "└", "┬", "┴", "┼")):
Copy link
Member

Choose a reason for hiding this comment

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

эээ. Почему бы не обработать вывод утилиты в json?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants