Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Disk Manager] Fix disk manager tests after updating StatVolume behaviour #2924

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Rattysed
Copy link
Collaborator

@Rattysed Rattysed commented Jan 24, 2025

#2008 — Fixed Dm tests, that depend on StatVolume.

@Rattysed Rattysed added large-tests Launch large tests for PR disk_manager Add this label to run only cloud/disk_manager build and tests on PR blockstore Add this label to run only cloud/blockstore build and tests on PR labels Jan 24, 2025
@Rattysed Rattysed closed this Jan 24, 2025
@Rattysed Rattysed reopened this Feb 4, 2025
@Rattysed Rattysed force-pushed the user/rattysed/issue-2008 branch from 76e53ee to a2e5de5 Compare February 4, 2025 16:33
@Rattysed Rattysed changed the title [Blockstore] StatVolume should return checkpoints without data [Disk Manager] Fix disk manager tests after updating StatVolume behaviour Feb 5, 2025
@Rattysed Rattysed removed the blockstore Add this label to run only cloud/blockstore build and tests on PR label Feb 5, 2025
@Rattysed Rattysed force-pushed the user/rattysed/issue-2008 branch from d5c00e9 to 875bc6d Compare February 5, 2025 15:25
@Rattysed Rattysed force-pushed the user/rattysed/issue-2008 branch from 875bc6d to 15301c7 Compare February 5, 2025 15:29
Comment on lines 765 to 766
// Should wait here because checkpoint is deleted on |createOp| operation
// cancel (and exact time of this event is unknown).
Copy link
Collaborator

Choose a reason for hiding this comment

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

комментарий внутрь ифа

Comment on lines 765 to 766
// Should wait here because checkpoint is deleted on |createOp| operation
// cancel (and exact time of this event is unknown).
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • свеху ифа комментарий почему мы так делаем

@Rattysed Rattysed requested a review from BarkovBG February 5, 2025 19:19
@@ -758,13 +764,13 @@ func TestSnapshotServiceDeleteSnapshotWhenCreationIsInFlight(t *testing.T) {
err = internal_client.WaitOperation(ctx, client, operation.Id)
require.NoError(t, err)

_ = internal_client.WaitOperation(ctx, client, createOp.Id)
createErr := internal_client.WaitOperation(ctx, client, createOp.Id)
Copy link
Collaborator

Choose a reason for hiding this comment

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

просто err

// TODO: enable this check after resolving issue
// https://github.com/ydb-platform/nbs/issues/2008.
// testcommon.WaitForCheckpointsAreEmpty(t, ctx, diskID)
if createErr != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

выше ифа надо написать почему мы ждем чекпоинты только если создание успешное

@@ -604,17 +605,22 @@ func TestSnapshotServiceDeleteIncrementalSnapshotWhileCreating(t *testing.T) {
err = internal_client.WaitOperation(ctx, client, deleteOperation.Id)
require.NoError(t, err)

//nolint:sa9003
// TODO: remove line above after
// https://github.com/ydb-platform/nbs/issues/2008
if creationErr == nil {
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

Choose a reason for hiding this comment

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

1 - снапшот успел создастся, а затем удалиться - тогда чепоинта не должно быть

Comment on lines +617 to +618
// If there is a record about this disk left in incrementality table,
// checkpoint that corresponds to base snapshot should not be deleted.
Copy link
Collaborator

Choose a reason for hiding this comment

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

тут нужо рассказать, что в случае неуспешного создания может быть два сценария

если мы успели потереть данные про baseSnapshotID из таблицы инкрементальности или нет

типо:
// in case of snapshot creation failure baseSnapshot may be already deleted from incremental table and then checkpoint should not exist on the disk.
// Otherwise checkpoint should exist

что-то такое

из твоего комментария вообще не понятно что происходит и почему так

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disk_manager Add this label to run only cloud/disk_manager build and tests on PR large-tests Launch large tests for PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants