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

Improve TakeBackupOperation handler #26

Merged
merged 1 commit into from
Jul 29, 2024
Merged

Improve TakeBackupOperation handler #26

merged 1 commit into from
Jul 29, 2024

Conversation

qrort
Copy link
Collaborator

@qrort qrort commented Jul 24, 2024

No description provided.

Copy link

📝 Test results

ydbcp

24 tests (24 passed)
%%{init: {"theme":"base","themeVariables":{"fontFamily":"monospace","pieSectionTextSize":"24px","darkMode":true,"pie1":"#2da44e"}}}%%
pie showData
"Passed" : 24

Loading
📦 Package🟢 Passed🔴 Failed🟡 Skipped⏳ Duration
🟡 ydbcp/cmd/ydbcp0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/config0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/connectors/client0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/connectors/db0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟢 ydbcp/internal/connectors/db/yql/queries20033ms
🧪 Tests
  • 🟢TestQueryBuilder_Read
  • 🟢TestQueryBuilder_Write
🖨️ Output
=== RUN   TestQueryBuilder_Read
2024-07-24T16:03:07.897Z	DEBUG	queries/read.go:145	read query	{"yql": "DECLARE $param0 AS String;\nDECLARE $param1 AS String;\nDECLARE $param2 AS String;\nDECLARE $param3 AS String;\nSELECT column1, column2, column3 FROM table1 WHERE (column1 = $param0 OR column1 = $param1) AND (column2 = $param2 OR column2 = $param3)"}
--- PASS: TestQueryBuilder_Read (0.00s)
=== RUN   TestQueryBuilder_Write
2024-07-24T16:03:07.901Z	DEBUG	queries/write.go:192	write query	{"yql": "DECLARE $id_0 AS Uuid;\nDECLARE $status_0 AS String;\nUPSERT INTO Backups (id, status) VALUES ($id_0, $status_0);\nDECLARE $id_1 AS Uuid;\nDECLARE $status_1 AS String;\nDECLARE $message_1 AS String;\nUPSERT INTO Operations (id, status, message) VALUES ($id_1, $status_1, $message_1)"}
--- PASS: TestQueryBuilder_Write (0.00s)
🟢 ydbcp/internal/handlers20009ms
🧪 Tests
  • 🟢TestRBOperationHandlerCancellingOperationCancelled
  • 🟢TestRBOperationHandlerCancellingOperationCompletedSuccessfully
  • 🟢TestRBOperationHandlerCancellingOperationInProgress
  • 🟢TestRBOperationHandlerDeadlineExceededForCancellingOperation
  • 🟢TestRBOperationHandlerDeadlineExceededForPendingOperation
  • 🟢TestRBOperationHandlerInvalidOperationResponse
  • 🟢TestRBOperationHandlerPendingOperationCancelled
  • 🟢TestRBOperationHandlerPendingOperationCompletedSuccessfully
  • 🟢TestRBOperationHandlerPendingOperationInProgress
  • 🟢TestRBOperationHandlerRetriableErrorForPendingOperation
  • 🟢TestTBOperationHandlerCancellingOperationCancelled
  • 🟢TestTBOperationHandlerCancellingOperationCompletedSuccessfully
  • 🟢TestTBOperationHandlerCancellingOperationInProgress
  • 🟢TestTBOperationHandlerDeadlineExceededForCancellingOperation
  • 🟢TestTBOperationHandlerDeadlineExceededForPendingOperation
  • 🟢TestTBOperationHandlerInvalidOperationResponse
  • 🟢TestTBOperationHandlerPendingOperationCancelled
  • 🟢TestTBOperationHandlerPendingOperationCompletedSuccessfully
  • 🟢TestTBOperationHandlerPendingOperationInProgress
  • 🟢TestTBOperationHandlerRetriableErrorForPendingOperation
🖨️ Output
=== RUN   TestRBOperationHandlerInvalidOperationResponse
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "5708375f-875e-47bf-9d23-e06be0bc151d", "type": "RB", "state": "PENDING", "message": ""}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "5708375f-875e-47bf-9d23-e06be0bc151d", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "e99b5091-91c2-4d83-a9c8-a036fa69b872", "type": "RB", "state": "PENDING", "message": ""}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "e99b5091-91c2-4d83-a9c8-a036fa69b872", "type": "RB", "ydb_operation_id": "1"}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:100	cancelling operation	{"reason": "TTL", "id": "e99b5091-91c2-4d83-a9c8-a036fa69b872", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "ebadd8f5-032c-4016-afca-df35408ab4c7", "type": "RB", "state": "PENDING", "message": ""}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "ebadd8f5-032c-4016-afca-df35408ab4c7", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "19deefbb-9608-43a9-9b95-abde43fb3288", "type": "RB", "state": "PENDING", "message": ""}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "19deefbb-9608-43a9-9b95-abde43fb3288", "type": "RB", "ydb_operation_id": "1"}
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:116	forgetting operation	{"id": "19deefbb-9608-43a9-9b95-abde43fb3288", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "cb83b79f-75d9-43dc-ad46-1de31191b508", "type": "RB", "state": "PENDING", "message": ""}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "cb83b79f-75d9-43dc-ad46-1de31191b508", "type": "RB", "ydb_operation_id": "1"}
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:116	forgetting operation	{"id": "cb83b79f-75d9-43dc-ad46-1de31191b508", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "4a8b9ba0-fc3d-4fc3-aa4c-49504c565965", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "4a8b9ba0-fc3d-4fc3-aa4c-49504c565965", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "76d34af7-f97a-458b-bc29-dc0609c9e88b", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "76d34af7-f97a-458b-bc29-dc0609c9e88b", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "98fc3883-25cf-465d-bd26-277b0f41f359", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "98fc3883-25cf-465d-bd26-277b0f41f359", "type": "RB", "ydb_operation_id": "1"}
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:116	forgetting operation	{"id": "98fc3883-25cf-465d-bd26-277b0f41f359", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "de7f7f8b-34c0-45a6-991d-3979cd29241b", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "de7f7f8b-34c0-45a6-991d-3979cd29241b", "type": "RB", "ydb_operation_id": "1"}
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:116	forgetting operation	{"id": "de7f7f8b-34c0-45a6-991d-3979cd29241b", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-07-24T16:03:08.515Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "3aedf51c-1678-4757-9769-bfd815779899", "type": "RB", "state": "PENDING", "message": ""}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "3aedf51c-1678-4757-9769-bfd815779899", "type": "RB", "ydb_operation_id": "1"}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:69	received retriable error	{"id": "3aedf51c-1678-4757-9769-bfd815779899", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "c3da7948-0028-4a1d-82b7-e20f6ff2523e", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "f2fb633d-b171-400b-a851-1cefb294f9d9", "type": "TB", "ydb_operation_id": "1"}
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:100	cancelling operation	{"reason": "TTL", "id": "f2fb633d-b171-400b-a851-1cefb294f9d9", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "f7fae0f9-4eb4-422b-a1cf-8fa7954a9e12", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "67404bf9-3697-4513-8bbf-c01cdd5f9427", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-07-24T16:03:08.515Z	INFO	handlers/utils.go:43	getting operation status	{"id": "644af114-362f-4e2c-b0b4-6f73a26d158b", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-07-24T16:03:08.516Z	INFO	handlers/utils.go:43	getting operation status	{"id": "3b786560-a384-4db5-b4cc-84a6a10023ca", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-07-24T16:03:08.516Z	INFO	handlers/utils.go:43	getting operation status	{"id": "356d90af-489a-4eb9-b761-e512f22f9da1", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-07-24T16:03:08.516Z	INFO	handlers/utils.go:43	getting operation status	{"id": "9f33ca0f-005c-483d-894c-b3edad2a53f7", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-07-24T16:03:08.516Z	INFO	handlers/utils.go:43	getting operation status	{"id": "acd604aa-b3f2-4683-b50e-c48f05b3d5b0", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-07-24T16:03:08.516Z	INFO	handlers/utils.go:43	getting operation status	{"id": "e01279b7-0b97-4e9f-9cc0-6fc37f1e440b", "type": "TB", "ydb_operation_id": "1"}
2024-07-24T16:03:08.516Z	INFO	handlers/utils.go:69	received retriable error	{"id": "e01279b7-0b97-4e9f-9cc0-6fc37f1e440b", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor2008ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-07-24T16:03:08.514Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-07-24T16:03:08.514Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 60d16ece-87f8-4f62-9034-e12e2c94b060, type TB, state PENDING"}
2024-07-24T16:03:08.514Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 60d16ece-87f8-4f62-9034-e12e2c94b060, type TB, state PENDING"}
2024-07-24T16:03:08.515Z	DEBUG	processor/processor.go:118	start operation handler	{"operation": "Operation, id 60d16ece-87f8-4f62-9034-e12e2c94b060, type TB, state PENDING"}
2024-07-24T16:03:08.515Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id 60d16ece-87f8-4f62-9034-e12e2c94b060, type TB, state PENDING"}
2024-07-24T16:03:08.515Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "60d16ece-87f8-4f62-9034-e12e2c94b060"}
2024-07-24T16:03:08.515Z	DEBUG	processor/processor.go:83	Operation Processor stopped
--- PASS: TestProcessor (0.00s)
=== RUN   TestOperationHandlerRegistry
--- PASS: TestOperationHandlerRegistry (0.00s)
🟡 ydbcp/internal/types0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/ticker0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/timer0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/xlog0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/pkg/proto0000ms
🧪 Tests(none)
🖨️ Output
(none)

Copy link

📝 Test results

ydbcp

24 tests (24 passed)
%%{init: {"theme":"base","themeVariables":{"fontFamily":"monospace","pieSectionTextSize":"24px","darkMode":true,"pie1":"#2da44e"}}}%%
pie showData
"Passed" : 24

Loading
📦 Package🟢 Passed🔴 Failed🟡 Skipped⏳ Duration
🟡 ydbcp/cmd/ydbcp0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/config0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/connectors/client0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/connectors/db0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟢 ydbcp/internal/connectors/db/yql/queries2006ms
🧪 Tests
  • 🟢TestQueryBuilder_Read
  • 🟢TestQueryBuilder_Write
🖨️ Output
=== RUN   TestQueryBuilder_Read
2024-07-25T15:02:23.719Z	DEBUG	queries/read.go:145	read query	{"yql": "DECLARE $param0 AS String;\nDECLARE $param1 AS String;\nDECLARE $param2 AS String;\nDECLARE $param3 AS String;\nSELECT column1, column2, column3 FROM table1 WHERE (column1 = $param0 OR column1 = $param1) AND (column2 = $param2 OR column2 = $param3)"}
--- PASS: TestQueryBuilder_Read (0.00s)
=== RUN   TestQueryBuilder_Write
2024-07-25T15:02:23.720Z	DEBUG	queries/write.go:190	write query	{"yql": "DECLARE $id_0 AS Uuid;\nDECLARE $status_0 AS String;\nUPSERT INTO Backups (id, status) VALUES ($id_0, $status_0);\nDECLARE $id_1 AS Uuid;\nDECLARE $status_1 AS String;\nDECLARE $message_1 AS String;\nUPSERT INTO Operations (id, status, message) VALUES ($id_1, $status_1, $message_1)"}
--- PASS: TestQueryBuilder_Write (0.00s)
🟢 ydbcp/internal/handlers200018ms
🧪 Tests
  • 🟢TestRBOperationHandlerCancellingOperationCancelled
  • 🟢TestRBOperationHandlerCancellingOperationCompletedSuccessfully
  • 🟢TestRBOperationHandlerCancellingOperationInProgress
  • 🟢TestRBOperationHandlerDeadlineExceededForCancellingOperation
  • 🟢TestRBOperationHandlerDeadlineExceededForPendingOperation
  • 🟢TestRBOperationHandlerInvalidOperationResponse
  • 🟢TestRBOperationHandlerPendingOperationCancelled
  • 🟢TestRBOperationHandlerPendingOperationCompletedSuccessfully
  • 🟢TestRBOperationHandlerPendingOperationInProgress
  • 🟢TestRBOperationHandlerRetriableErrorForPendingOperation
  • 🟢TestTBOperationHandlerCancellingOperationCancelled
  • 🟢TestTBOperationHandlerCancellingOperationCompletedSuccessfully
  • 🟢TestTBOperationHandlerCancellingOperationInProgress
  • 🟢TestTBOperationHandlerDeadlineExceededForCancellingOperation
  • 🟢TestTBOperationHandlerDeadlineExceededForPendingOperation
  • 🟢TestTBOperationHandlerInvalidOperationResponse
  • 🟢TestTBOperationHandlerPendingOperationCancelled
  • 🟢TestTBOperationHandlerPendingOperationCompletedSuccessfully
  • 🟢TestTBOperationHandlerPendingOperationInProgress
  • 🟢TestTBOperationHandlerRetriableErrorForPendingOperation
🖨️ Output
=== RUN   TestRBOperationHandlerInvalidOperationResponse
2024-07-25T15:02:24.046Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "7d739738-3671-4c42-8ed4-4e20fdaea19e", "type": "RB", "state": "PENDING", "message": ""}
2024-07-25T15:02:24.047Z	INFO	handlers/utils.go:43	getting operation status	{"id": "7d739738-3671-4c42-8ed4-4e20fdaea19e", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-07-25T15:02:24.047Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "57b6118d-e081-411b-b3b6-3503ea21e811", "type": "RB", "state": "PENDING", "message": ""}
2024-07-25T15:02:24.047Z	INFO	handlers/utils.go:43	getting operation status	{"id": "57b6118d-e081-411b-b3b6-3503ea21e811", "type": "RB", "ydb_operation_id": "1"}
2024-07-25T15:02:24.047Z	INFO	handlers/utils.go:100	cancelling operation	{"reason": "TTL", "id": "57b6118d-e081-411b-b3b6-3503ea21e811", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-07-25T15:02:24.047Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "9f2c26d1-077d-42d5-a117-2d695066fa3d", "type": "RB", "state": "PENDING", "message": ""}
2024-07-25T15:02:24.047Z	INFO	handlers/utils.go:43	getting operation status	{"id": "9f2c26d1-077d-42d5-a117-2d695066fa3d", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-07-25T15:02:24.047Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "d535aa2c-d2d2-4557-8209-5301b928b3d9", "type": "RB", "state": "PENDING", "message": ""}
2024-07-25T15:02:24.047Z	INFO	handlers/utils.go:43	getting operation status	{"id": "d535aa2c-d2d2-4557-8209-5301b928b3d9", "type": "RB", "ydb_operation_id": "1"}
2024-07-25T15:02:24.047Z	INFO	handlers/restore_backup.go:116	forgetting operation	{"id": "d535aa2c-d2d2-4557-8209-5301b928b3d9", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-07-25T15:02:24.048Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "7016a678-1563-4719-abc0-40638fe6b4ac", "type": "RB", "state": "PENDING", "message": ""}
2024-07-25T15:02:24.048Z	INFO	handlers/utils.go:43	getting operation status	{"id": "7016a678-1563-4719-abc0-40638fe6b4ac", "type": "RB", "ydb_operation_id": "1"}
2024-07-25T15:02:24.048Z	INFO	handlers/restore_backup.go:116	forgetting operation	{"id": "7016a678-1563-4719-abc0-40638fe6b4ac", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-07-25T15:02:24.049Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "f8ba144c-f8c3-4fd4-b826-9a06f8157dbe", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-25T15:02:24.049Z	INFO	handlers/utils.go:43	getting operation status	{"id": "f8ba144c-f8c3-4fd4-b826-9a06f8157dbe", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-07-25T15:02:24.049Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "26e23969-eef8-408a-b213-c667439a7537", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-25T15:02:24.049Z	INFO	handlers/utils.go:43	getting operation status	{"id": "26e23969-eef8-408a-b213-c667439a7537", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-07-25T15:02:24.050Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "599861ca-a7c4-4dfb-8f12-371cc6d4492e", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-25T15:02:24.050Z	INFO	handlers/utils.go:43	getting operation status	{"id": "599861ca-a7c4-4dfb-8f12-371cc6d4492e", "type": "RB", "ydb_operation_id": "1"}
2024-07-25T15:02:24.050Z	INFO	handlers/restore_backup.go:116	forgetting operation	{"id": "599861ca-a7c4-4dfb-8f12-371cc6d4492e", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-07-25T15:02:24.051Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "5f638e79-4681-4465-b819-93ee6be5a607", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-25T15:02:24.051Z	INFO	handlers/utils.go:43	getting operation status	{"id": "5f638e79-4681-4465-b819-93ee6be5a607", "type": "RB", "ydb_operation_id": "1"}
2024-07-25T15:02:24.051Z	INFO	handlers/restore_backup.go:116	forgetting operation	{"id": "5f638e79-4681-4465-b819-93ee6be5a607", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-07-25T15:02:24.051Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "34453ac4-c2ef-4aee-a770-c3d07ac0c2a0", "type": "RB", "state": "PENDING", "message": ""}
2024-07-25T15:02:24.051Z	INFO	handlers/utils.go:43	getting operation status	{"id": "34453ac4-c2ef-4aee-a770-c3d07ac0c2a0", "type": "RB", "ydb_operation_id": "1"}
2024-07-25T15:02:24.052Z	INFO	handlers/utils.go:69	received retriable error	{"id": "34453ac4-c2ef-4aee-a770-c3d07ac0c2a0", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-07-25T15:02:24.052Z	INFO	handlers/utils.go:43	getting operation status	{"id": "f014256c-8488-447b-ba77-0bb401e9c474", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-07-25T15:02:24.053Z	INFO	handlers/utils.go:43	getting operation status	{"id": "b8295916-ff72-48f8-91cc-50e9b86bb2a1", "type": "TB", "ydb_operation_id": "1"}
2024-07-25T15:02:24.053Z	INFO	handlers/utils.go:100	cancelling operation	{"reason": "TTL", "id": "b8295916-ff72-48f8-91cc-50e9b86bb2a1", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-07-25T15:02:24.053Z	INFO	handlers/utils.go:43	getting operation status	{"id": "ecb1a026-a44f-49f5-8a77-b7fa670ed097", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-07-25T15:02:24.053Z	INFO	handlers/utils.go:43	getting operation status	{"id": "35bb34fa-b60e-4539-b8cf-a5008c1ec6c9", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-07-25T15:02:24.054Z	INFO	handlers/utils.go:43	getting operation status	{"id": "104b6921-e2c7-4d54-b88c-9b239f369fc7", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-07-25T15:02:24.054Z	INFO	handlers/utils.go:43	getting operation status	{"id": "035a50a4-ff1e-4f1b-8903-43f7ceaadd2b", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-07-25T15:02:24.055Z	INFO	handlers/utils.go:43	getting operation status	{"id": "6f27d48e-bd1c-4967-9353-4c177fadb25c", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-07-25T15:02:24.055Z	INFO	handlers/utils.go:43	getting operation status	{"id": "24570ed9-a5b9-4bb6-918b-8d396a460c52", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-07-25T15:02:24.056Z	INFO	handlers/utils.go:43	getting operation status	{"id": "f1c41886-596f-4be7-93e3-63126b91230e", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-07-25T15:02:24.057Z	INFO	handlers/utils.go:43	getting operation status	{"id": "e5ca8540-1165-4249-8221-73b8a37e49b7", "type": "TB", "ydb_operation_id": "1"}
2024-07-25T15:02:24.057Z	INFO	handlers/utils.go:69	received retriable error	{"id": "e5ca8540-1165-4249-8221-73b8a37e49b7", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor2008ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-07-25T15:02:24.324Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-07-25T15:02:24.324Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id e02f3a88-22d8-460e-814d-5508d9d1ccb2, type TB, state PENDING"}
2024-07-25T15:02:24.324Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id e02f3a88-22d8-460e-814d-5508d9d1ccb2, type TB, state PENDING"}
2024-07-25T15:02:24.324Z	DEBUG	processor/processor.go:118	start operation handler	{"operation": "Operation, id e02f3a88-22d8-460e-814d-5508d9d1ccb2, type TB, state PENDING"}
2024-07-25T15:02:24.324Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id e02f3a88-22d8-460e-814d-5508d9d1ccb2, type TB, state PENDING"}
2024-07-25T15:02:24.324Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "e02f3a88-22d8-460e-814d-5508d9d1ccb2"}
2024-07-25T15:02:24.324Z	DEBUG	processor/processor.go:83	Operation Processor stopped
--- PASS: TestProcessor (0.00s)
=== RUN   TestOperationHandlerRegistry
--- PASS: TestOperationHandlerRegistry (0.00s)
🟡 ydbcp/internal/types0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/ticker0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/timer0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/xlog0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/pkg/proto0000ms
🧪 Tests(none)
🖨️ Output
(none)

internal/connectors/db/yql/schema/create_tables.yql Outdated Show resolved Hide resolved
internal/connectors/db/yql/schema/create_tables.yql Outdated Show resolved Hide resolved
internal/handlers/restore_backup.go Outdated Show resolved Hide resolved
internal/handlers/take_backup.go Outdated Show resolved Hide resolved
internal/handlers/utils.go Outdated Show resolved Hide resolved
internal/handlers/utils.go Outdated Show resolved Hide resolved
internal/connectors/db/connector.go Outdated Show resolved Hide resolved
internal/connectors/db/mock.go Outdated Show resolved Hide resolved
internal/connectors/db/process_result_set.go Outdated Show resolved Hide resolved
Copy link

📝 Test results

ydbcp

24 tests (24 passed)
%%{init: {"theme":"base","themeVariables":{"fontFamily":"monospace","pieSectionTextSize":"24px","darkMode":true,"pie1":"#2da44e"}}}%%
pie showData
"Passed" : 24

Loading
📦 Package🟢 Passed🔴 Failed🟡 Skipped⏳ Duration
🟡 ydbcp/cmd/ydbcp0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/config0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/connectors/client0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/connectors/db0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟢 ydbcp/internal/connectors/db/yql/queries2008ms
🧪 Tests
  • 🟢TestQueryBuilder_Read
  • 🟢TestQueryBuilder_Write
🖨️ Output
=== RUN   TestQueryBuilder_Read
2024-07-29T10:46:51.768Z	DEBUG	queries/read.go:145	read query	{"yql": "DECLARE $param0 AS String;\nDECLARE $param1 AS String;\nDECLARE $param2 AS String;\nDECLARE $param3 AS String;\nSELECT column1, column2, column3 FROM table1 WHERE (column1 = $param0 OR column1 = $param1) AND (column2 = $param2 OR column2 = $param3)"}
--- PASS: TestQueryBuilder_Read (0.00s)
=== RUN   TestQueryBuilder_Write
2024-07-29T10:46:51.768Z	DEBUG	queries/write.go:190	write query	{"yql": "DECLARE $id_0 AS Uuid;\nDECLARE $status_0 AS String;\nUPSERT INTO Backups (id, status) VALUES ($id_0, $status_0);\nDECLARE $id_1 AS Uuid;\nDECLARE $status_1 AS String;\nDECLARE $message_1 AS String;\nUPSERT INTO Operations (id, status, message) VALUES ($id_1, $status_1, $message_1)"}
--- PASS: TestQueryBuilder_Write (0.00s)
🟢 ydbcp/internal/handlers20009ms
🧪 Tests
  • 🟢TestRBOperationHandlerCancellingOperationCancelled
  • 🟢TestRBOperationHandlerCancellingOperationCompletedSuccessfully
  • 🟢TestRBOperationHandlerCancellingOperationInProgress
  • 🟢TestRBOperationHandlerDeadlineExceededForCancellingOperation
  • 🟢TestRBOperationHandlerDeadlineExceededForPendingOperation
  • 🟢TestRBOperationHandlerInvalidOperationResponse
  • 🟢TestRBOperationHandlerPendingOperationCancelled
  • 🟢TestRBOperationHandlerPendingOperationCompletedSuccessfully
  • 🟢TestRBOperationHandlerPendingOperationInProgress
  • 🟢TestRBOperationHandlerRetriableErrorForPendingOperation
  • 🟢TestTBOperationHandlerCancellingOperationCancelled
  • 🟢TestTBOperationHandlerCancellingOperationCompletedSuccessfully
  • 🟢TestTBOperationHandlerCancellingOperationInProgress
  • 🟢TestTBOperationHandlerDeadlineExceededForCancellingOperation
  • 🟢TestTBOperationHandlerDeadlineExceededForPendingOperation
  • 🟢TestTBOperationHandlerInvalidOperationResponse
  • 🟢TestTBOperationHandlerPendingOperationCancelled
  • 🟢TestTBOperationHandlerPendingOperationCompletedSuccessfully
  • 🟢TestTBOperationHandlerPendingOperationInProgress
  • 🟢TestTBOperationHandlerRetriableErrorForPendingOperation
🖨️ Output
=== RUN   TestRBOperationHandlerInvalidOperationResponse
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "be7f9f20-e232-4035-8e59-3b654b96a22c", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T10:46:52.300Z	INFO	handlers/utils.go:43	getting operation status	{"id": "be7f9f20-e232-4035-8e59-3b654b96a22c", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "8a137e2d-637d-4825-8974-8c66592887d2", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T10:46:52.300Z	INFO	handlers/utils.go:43	getting operation status	{"id": "8a137e2d-637d-4825-8974-8c66592887d2", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T10:46:52.300Z	INFO	handlers/utils.go:100	cancelling operation	{"reason": "TTL", "id": "8a137e2d-637d-4825-8974-8c66592887d2", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "c75ea784-b4dc-46ee-bd66-606cbc97a036", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T10:46:52.300Z	INFO	handlers/utils.go:43	getting operation status	{"id": "c75ea784-b4dc-46ee-bd66-606cbc97a036", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "0075487d-fc18-4722-8e2b-d1f0b9632c51", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T10:46:52.300Z	INFO	handlers/utils.go:43	getting operation status	{"id": "0075487d-fc18-4722-8e2b-d1f0b9632c51", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:116	forgetting operation	{"id": "0075487d-fc18-4722-8e2b-d1f0b9632c51", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "39084f92-af67-48d3-b583-3486f5415f30", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T10:46:52.300Z	INFO	handlers/utils.go:43	getting operation status	{"id": "39084f92-af67-48d3-b583-3486f5415f30", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:116	forgetting operation	{"id": "39084f92-af67-48d3-b583-3486f5415f30", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "de5996be-a556-4d85-b55b-b648e8147940", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-29T10:46:52.300Z	INFO	handlers/utils.go:43	getting operation status	{"id": "de5996be-a556-4d85-b55b-b648e8147940", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "5fd1c246-945c-4409-8e1d-39dd8c91cc35", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-29T10:46:52.300Z	INFO	handlers/utils.go:43	getting operation status	{"id": "5fd1c246-945c-4409-8e1d-39dd8c91cc35", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "041eb634-0148-433b-ad5d-b4e18b1c21bd", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-29T10:46:52.300Z	INFO	handlers/utils.go:43	getting operation status	{"id": "041eb634-0148-433b-ad5d-b4e18b1c21bd", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:116	forgetting operation	{"id": "041eb634-0148-433b-ad5d-b4e18b1c21bd", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "2db3bb56-4a6f-4085-b261-868dbf50cc7e", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-29T10:46:52.300Z	INFO	handlers/utils.go:43	getting operation status	{"id": "2db3bb56-4a6f-4085-b261-868dbf50cc7e", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T10:46:52.300Z	INFO	handlers/restore_backup.go:116	forgetting operation	{"id": "2db3bb56-4a6f-4085-b261-868dbf50cc7e", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-07-29T10:46:52.301Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "f4cfcf68-9508-4294-9450-20a5393d97e5", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:43	getting operation status	{"id": "f4cfcf68-9508-4294-9450-20a5393d97e5", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:69	received retriable error	{"id": "f4cfcf68-9508-4294-9450-20a5393d97e5", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:43	getting operation status	{"id": "8d3ce627-b471-4cab-8f54-ffcc009b906b", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:43	getting operation status	{"id": "8be1f50c-695f-4707-b4fd-07d61cd3373b", "type": "TB", "ydb_operation_id": "1"}
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:100	cancelling operation	{"reason": "TTL", "id": "8be1f50c-695f-4707-b4fd-07d61cd3373b", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:43	getting operation status	{"id": "6a3f5578-0b73-44a2-b93f-1e85dd847976", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:43	getting operation status	{"id": "6959b8b3-b2da-47a7-b62a-1fdf1f11a62a", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:43	getting operation status	{"id": "79e45dda-cee9-4134-8cd0-2377b841c52e", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:43	getting operation status	{"id": "774216d2-f173-4e51-a0fb-cfb31ae35e92", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:43	getting operation status	{"id": "898e33d0-558a-4361-9bda-af0a1b918643", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:43	getting operation status	{"id": "edd85810-7f29-4a85-a120-47a77525baf0", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:43	getting operation status	{"id": "3b21f1da-1add-4571-b9f3-668146399056", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:43	getting operation status	{"id": "4ff7dd8c-d830-4837-a16f-7cc8f39d2d84", "type": "TB", "ydb_operation_id": "1"}
2024-07-29T10:46:52.301Z	INFO	handlers/utils.go:69	received retriable error	{"id": "4ff7dd8c-d830-4837-a16f-7cc8f39d2d84", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor2008ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-07-29T10:46:52.299Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-07-29T10:46:52.300Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 1a528034-f8b9-4cca-ada5-d201adfe98c4, type TB, state PENDING"}
2024-07-29T10:46:52.300Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 1a528034-f8b9-4cca-ada5-d201adfe98c4, type TB, state PENDING"}
2024-07-29T10:46:52.300Z	DEBUG	processor/processor.go:118	start operation handler	{"operation": "Operation, id 1a528034-f8b9-4cca-ada5-d201adfe98c4, type TB, state PENDING"}
2024-07-29T10:46:52.300Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id 1a528034-f8b9-4cca-ada5-d201adfe98c4, type TB, state PENDING"}
2024-07-29T10:46:52.300Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "1a528034-f8b9-4cca-ada5-d201adfe98c4"}
2024-07-29T10:46:52.300Z	DEBUG	processor/processor.go:83	Operation Processor stopped
--- PASS: TestProcessor (0.00s)
=== RUN   TestOperationHandlerRegistry
--- PASS: TestOperationHandlerRegistry (0.00s)
🟡 ydbcp/internal/types0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/ticker0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/timer0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/xlog0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/pkg/proto/ydbcp/v1alpha10000ms
🧪 Tests(none)
🖨️ Output
(none)

Copy link

📝 Test results

ydbcp

24 tests (24 passed)
%%{init: {"theme":"base","themeVariables":{"fontFamily":"monospace","pieSectionTextSize":"24px","darkMode":true,"pie1":"#2da44e"}}}%%
pie showData
"Passed" : 24

Loading
📦 Package🟢 Passed🔴 Failed🟡 Skipped⏳ Duration
🟡 ydbcp/cmd/ydbcp0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/config0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/connectors/client0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/connectors/db0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟢 ydbcp/internal/connectors/db/yql/queries2009ms
🧪 Tests
  • 🟢TestQueryBuilder_Read
  • 🟢TestQueryBuilder_Write
🖨️ Output
=== RUN   TestQueryBuilder_Read
2024-07-29T11:31:17.044Z	DEBUG	queries/read.go:145	read query	{"yql": "DECLARE $param0 AS String;\nDECLARE $param1 AS String;\nDECLARE $param2 AS String;\nDECLARE $param3 AS String;\nSELECT column1, column2, column3 FROM table1 WHERE (column1 = $param0 OR column1 = $param1) AND (column2 = $param2 OR column2 = $param3)"}
--- PASS: TestQueryBuilder_Read (0.00s)
=== RUN   TestQueryBuilder_Write
2024-07-29T11:31:17.044Z	DEBUG	queries/write.go:190	write query	{"yql": "DECLARE $id_0 AS Uuid;\nDECLARE $status_0 AS String;\nUPSERT INTO Backups (id, status) VALUES ($id_0, $status_0);\nDECLARE $id_1 AS Uuid;\nDECLARE $status_1 AS String;\nDECLARE $message_1 AS String;\nUPSERT INTO Operations (id, status, message) VALUES ($id_1, $status_1, $message_1)"}
--- PASS: TestQueryBuilder_Write (0.00s)
🟢 ydbcp/internal/handlers200010ms
🧪 Tests
  • 🟢TestRBOperationHandlerCancellingOperationCancelled
  • 🟢TestRBOperationHandlerCancellingOperationCompletedSuccessfully
  • 🟢TestRBOperationHandlerCancellingOperationInProgress
  • 🟢TestRBOperationHandlerDeadlineExceededForCancellingOperation
  • 🟢TestRBOperationHandlerDeadlineExceededForPendingOperation
  • 🟢TestRBOperationHandlerInvalidOperationResponse
  • 🟢TestRBOperationHandlerPendingOperationCancelled
  • 🟢TestRBOperationHandlerPendingOperationCompletedSuccessfully
  • 🟢TestRBOperationHandlerPendingOperationInProgress
  • 🟢TestRBOperationHandlerRetriableErrorForPendingOperation
  • 🟢TestTBOperationHandlerCancellingOperationCancelled
  • 🟢TestTBOperationHandlerCancellingOperationCompletedSuccessfully
  • 🟢TestTBOperationHandlerCancellingOperationInProgress
  • 🟢TestTBOperationHandlerDeadlineExceededForCancellingOperation
  • 🟢TestTBOperationHandlerDeadlineExceededForPendingOperation
  • 🟢TestTBOperationHandlerInvalidOperationResponse
  • 🟢TestTBOperationHandlerPendingOperationCancelled
  • 🟢TestTBOperationHandlerPendingOperationCompletedSuccessfully
  • 🟢TestTBOperationHandlerPendingOperationInProgress
  • 🟢TestTBOperationHandlerRetriableErrorForPendingOperation
🖨️ Output
=== RUN   TestRBOperationHandlerInvalidOperationResponse
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "5539620f-29a1-4890-8fbd-d941afc6b7b1", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T11:31:17.581Z	INFO	handlers/utils.go:45	getting operation status	{"id": "5539620f-29a1-4890-8fbd-d941afc6b7b1", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "14cc3a33-9fc7-46b0-836b-147c14676807", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T11:31:17.581Z	INFO	handlers/utils.go:45	getting operation status	{"id": "14cc3a33-9fc7-46b0-836b-147c14676807", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T11:31:17.581Z	INFO	handlers/utils.go:98	cancelling operation	{"reason": "TTL", "id": "14cc3a33-9fc7-46b0-836b-147c14676807", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "8d92805f-fca2-40b7-9fa9-107ffa793c87", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T11:31:17.581Z	INFO	handlers/utils.go:45	getting operation status	{"id": "8d92805f-fca2-40b7-9fa9-107ffa793c87", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "570d77ed-f41f-4418-98eb-ab43ea40d8b0", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T11:31:17.581Z	INFO	handlers/utils.go:45	getting operation status	{"id": "570d77ed-f41f-4418-98eb-ab43ea40d8b0", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:119	forgetting operation	{"id": "570d77ed-f41f-4418-98eb-ab43ea40d8b0", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "d4f7a290-b61c-469b-877a-1afbaf8004d1", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T11:31:17.581Z	INFO	handlers/utils.go:45	getting operation status	{"id": "d4f7a290-b61c-469b-877a-1afbaf8004d1", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:119	forgetting operation	{"id": "d4f7a290-b61c-469b-877a-1afbaf8004d1", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "72cf1614-ae92-4559-b4f5-c96c60b35b7d", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-29T11:31:17.581Z	INFO	handlers/utils.go:45	getting operation status	{"id": "72cf1614-ae92-4559-b4f5-c96c60b35b7d", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "102032a2-5aa2-4c4c-9416-0c1f3c42ea59", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-29T11:31:17.581Z	INFO	handlers/utils.go:45	getting operation status	{"id": "102032a2-5aa2-4c4c-9416-0c1f3c42ea59", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "97a41057-231b-45c3-97cd-b4aa7854908a", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-29T11:31:17.581Z	INFO	handlers/utils.go:45	getting operation status	{"id": "97a41057-231b-45c3-97cd-b4aa7854908a", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:119	forgetting operation	{"id": "97a41057-231b-45c3-97cd-b4aa7854908a", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "d29bd6bc-d6a6-4c24-9f6f-099ff0f293ee", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-29T11:31:17.581Z	INFO	handlers/utils.go:45	getting operation status	{"id": "d29bd6bc-d6a6-4c24-9f6f-099ff0f293ee", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:119	forgetting operation	{"id": "d29bd6bc-d6a6-4c24-9f6f-099ff0f293ee", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-07-29T11:31:17.581Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "e4df3690-a320-4529-818d-4159302fcbd5", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T11:31:17.581Z	INFO	handlers/utils.go:45	getting operation status	{"id": "e4df3690-a320-4529-818d-4159302fcbd5", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T11:31:17.581Z	INFO	handlers/utils.go:68	received retriable error	{"id": "e4df3690-a320-4529-818d-4159302fcbd5", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-07-29T11:31:17.582Z	INFO	handlers/utils.go:45	getting operation status	{"id": "09309b9f-d218-4832-bb81-a9e760f40398", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-07-29T11:31:17.582Z	INFO	handlers/utils.go:45	getting operation status	{"id": "c2fcb6a4-a101-4469-911e-2c82759dc0dd", "type": "TB", "ydb_operation_id": "1"}
2024-07-29T11:31:17.582Z	INFO	handlers/utils.go:98	cancelling operation	{"reason": "TTL", "id": "c2fcb6a4-a101-4469-911e-2c82759dc0dd", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-07-29T11:31:17.582Z	INFO	handlers/utils.go:45	getting operation status	{"id": "953457da-05f0-4c5e-98c7-f32d5259b358", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-07-29T11:31:17.582Z	INFO	handlers/utils.go:45	getting operation status	{"id": "c7c34dbe-a175-485c-af77-6019b521d0f8", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-07-29T11:31:17.582Z	INFO	handlers/utils.go:45	getting operation status	{"id": "08a80635-45d4-4272-9a6d-3d4089dad9bc", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-07-29T11:31:17.582Z	INFO	handlers/utils.go:45	getting operation status	{"id": "7d3d8795-8e7e-4334-a124-68227bf59b47", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-07-29T11:31:17.582Z	INFO	handlers/utils.go:45	getting operation status	{"id": "e7e7f7f7-4026-4b4b-8af9-9ab3e66325d5", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-07-29T11:31:17.582Z	INFO	handlers/utils.go:45	getting operation status	{"id": "3d2f698f-5d8b-40c3-a444-aa02a0bb4273", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-07-29T11:31:17.582Z	INFO	handlers/utils.go:45	getting operation status	{"id": "8d1b1b9b-eec5-4fb5-aa3f-3d6da978c36b", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-07-29T11:31:17.582Z	INFO	handlers/utils.go:45	getting operation status	{"id": "13e161ab-b0b6-45a7-9bd3-8c33e1d1853a", "type": "TB", "ydb_operation_id": "1"}
2024-07-29T11:31:17.582Z	INFO	handlers/utils.go:68	received retriable error	{"id": "13e161ab-b0b6-45a7-9bd3-8c33e1d1853a", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor2009ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-07-29T11:31:17.581Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-07-29T11:31:17.581Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 2ab10152-42c9-4e74-93a8-6089500c5ead, type TB, state PENDING"}
2024-07-29T11:31:17.581Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 2ab10152-42c9-4e74-93a8-6089500c5ead, type TB, state PENDING"}
2024-07-29T11:31:17.581Z	DEBUG	processor/processor.go:118	start operation handler	{"operation": "Operation, id 2ab10152-42c9-4e74-93a8-6089500c5ead, type TB, state PENDING"}
2024-07-29T11:31:17.581Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id 2ab10152-42c9-4e74-93a8-6089500c5ead, type TB, state PENDING"}
2024-07-29T11:31:17.581Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "2ab10152-42c9-4e74-93a8-6089500c5ead"}
2024-07-29T11:31:17.581Z	DEBUG	processor/processor.go:83	Operation Processor stopped
--- PASS: TestProcessor (0.00s)
=== RUN   TestOperationHandlerRegistry
--- PASS: TestOperationHandlerRegistry (0.00s)
🟡 ydbcp/internal/types0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/ticker0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/timer0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/xlog0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/pkg/proto/ydbcp/v1alpha10000ms
🧪 Tests(none)
🖨️ Output
(none)

Copy link

📝 Test results

ydbcp

24 tests (24 passed)
%%{init: {"theme":"base","themeVariables":{"fontFamily":"monospace","pieSectionTextSize":"24px","darkMode":true,"pie1":"#2da44e"}}}%%
pie showData
"Passed" : 24

Loading
📦 Package🟢 Passed🔴 Failed🟡 Skipped⏳ Duration
🟡 ydbcp/cmd/ydbcp0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/config0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/connectors/client0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/connectors/db0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟢 ydbcp/internal/connectors/db/yql/queries2008ms
🧪 Tests
  • 🟢TestQueryBuilder_Read
  • 🟢TestQueryBuilder_Write
🖨️ Output
=== RUN   TestQueryBuilder_Read
2024-07-29T13:55:45.298Z	DEBUG	queries/read.go:145	read query	{"yql": "DECLARE $param0 AS String;\nDECLARE $param1 AS String;\nDECLARE $param2 AS String;\nDECLARE $param3 AS String;\nSELECT column1, column2, column3 FROM table1 WHERE (column1 = $param0 OR column1 = $param1) AND (column2 = $param2 OR column2 = $param3)"}
--- PASS: TestQueryBuilder_Read (0.00s)
=== RUN   TestQueryBuilder_Write
2024-07-29T13:55:45.298Z	DEBUG	queries/write.go:195	write query	{"yql": "DECLARE $id_0 AS Uuid;\nDECLARE $status_0 AS String;\nUPDATE Backups SET status = $status_0 WHERE id = $id_0;\nDECLARE $id_1 AS Uuid;\nDECLARE $status_1 AS String;\nDECLARE $message_1 AS String;\nUPDATE Operations SET status = $status_1, message = $message_1 WHERE id = $id_1"}
--- PASS: TestQueryBuilder_Write (0.00s)
🟢 ydbcp/internal/handlers200012ms
🧪 Tests
  • 🟢TestRBOperationHandlerCancellingOperationCancelled
  • 🟢TestRBOperationHandlerCancellingOperationCompletedSuccessfully
  • 🟢TestRBOperationHandlerCancellingOperationInProgress
  • 🟢TestRBOperationHandlerDeadlineExceededForCancellingOperation
  • 🟢TestRBOperationHandlerDeadlineExceededForPendingOperation
  • 🟢TestRBOperationHandlerInvalidOperationResponse
  • 🟢TestRBOperationHandlerPendingOperationCancelled
  • 🟢TestRBOperationHandlerPendingOperationCompletedSuccessfully
  • 🟢TestRBOperationHandlerPendingOperationInProgress
  • 🟢TestRBOperationHandlerRetriableErrorForPendingOperation
  • 🟢TestTBOperationHandlerCancellingOperationCancelled
  • 🟢TestTBOperationHandlerCancellingOperationCompletedSuccessfully
  • 🟢TestTBOperationHandlerCancellingOperationInProgress
  • 🟢TestTBOperationHandlerDeadlineExceededForCancellingOperation
  • 🟢TestTBOperationHandlerDeadlineExceededForPendingOperation
  • 🟢TestTBOperationHandlerInvalidOperationResponse
  • 🟢TestTBOperationHandlerPendingOperationCancelled
  • 🟢TestTBOperationHandlerPendingOperationCompletedSuccessfully
  • 🟢TestTBOperationHandlerPendingOperationInProgress
  • 🟢TestTBOperationHandlerRetriableErrorForPendingOperation
🖨️ Output
=== RUN   TestRBOperationHandlerInvalidOperationResponse
2024-07-29T13:55:45.454Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "8f90307e-f1ad-4373-a521-b0c930f8cebc", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T13:55:45.454Z	INFO	handlers/utils.go:45	getting operation status	{"id": "8f90307e-f1ad-4373-a521-b0c930f8cebc", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-07-29T13:55:45.454Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "58bd030b-32e5-47b6-a530-aecd226b2e8e", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T13:55:45.454Z	INFO	handlers/utils.go:45	getting operation status	{"id": "58bd030b-32e5-47b6-a530-aecd226b2e8e", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T13:55:45.454Z	INFO	handlers/utils.go:98	cancelling operation	{"reason": "TTL", "id": "58bd030b-32e5-47b6-a530-aecd226b2e8e", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-07-29T13:55:45.454Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "d4668bbd-0c0c-4b40-9062-d55dc633fc81", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T13:55:45.455Z	INFO	handlers/utils.go:45	getting operation status	{"id": "d4668bbd-0c0c-4b40-9062-d55dc633fc81", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-07-29T13:55:45.455Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "8e666182-ed54-4307-bd5f-89118e93a99b", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T13:55:45.455Z	INFO	handlers/utils.go:45	getting operation status	{"id": "8e666182-ed54-4307-bd5f-89118e93a99b", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T13:55:45.455Z	INFO	handlers/restore_backup.go:119	forgetting operation	{"id": "8e666182-ed54-4307-bd5f-89118e93a99b", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-07-29T13:55:45.455Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "704e1192-3e84-46e5-9b92-d5306416ae7f", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T13:55:45.455Z	INFO	handlers/utils.go:45	getting operation status	{"id": "704e1192-3e84-46e5-9b92-d5306416ae7f", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T13:55:45.455Z	INFO	handlers/restore_backup.go:119	forgetting operation	{"id": "704e1192-3e84-46e5-9b92-d5306416ae7f", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-07-29T13:55:45.455Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "9aa37735-29b0-4578-82b5-7fd4768639ca", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-29T13:55:45.455Z	INFO	handlers/utils.go:45	getting operation status	{"id": "9aa37735-29b0-4578-82b5-7fd4768639ca", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-07-29T13:55:45.456Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "60063d5d-6acc-48ab-b496-48f4bd94a46d", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-29T13:55:45.456Z	INFO	handlers/utils.go:45	getting operation status	{"id": "60063d5d-6acc-48ab-b496-48f4bd94a46d", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-07-29T13:55:45.456Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "2322c79d-a4be-40ef-a96f-8680f79bb4cc", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-29T13:55:45.456Z	INFO	handlers/utils.go:45	getting operation status	{"id": "2322c79d-a4be-40ef-a96f-8680f79bb4cc", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T13:55:45.456Z	INFO	handlers/restore_backup.go:119	forgetting operation	{"id": "2322c79d-a4be-40ef-a96f-8680f79bb4cc", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-07-29T13:55:45.456Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "4d15096d-ec92-4309-9974-c7f2c650ed37", "type": "RB", "state": "CANCELLING", "message": ""}
2024-07-29T13:55:45.456Z	INFO	handlers/utils.go:45	getting operation status	{"id": "4d15096d-ec92-4309-9974-c7f2c650ed37", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T13:55:45.456Z	INFO	handlers/restore_backup.go:119	forgetting operation	{"id": "4d15096d-ec92-4309-9974-c7f2c650ed37", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-07-29T13:55:45.456Z	INFO	handlers/restore_backup.go:30	received operation	{"id": "c03a7e3d-f459-4ef7-ad90-e82d954f46a7", "type": "RB", "state": "PENDING", "message": ""}
2024-07-29T13:55:45.456Z	INFO	handlers/utils.go:45	getting operation status	{"id": "c03a7e3d-f459-4ef7-ad90-e82d954f46a7", "type": "RB", "ydb_operation_id": "1"}
2024-07-29T13:55:45.456Z	INFO	handlers/utils.go:68	received retriable error	{"id": "c03a7e3d-f459-4ef7-ad90-e82d954f46a7", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-07-29T13:55:45.457Z	INFO	handlers/utils.go:45	getting operation status	{"id": "fefe96e0-68ab-44c7-b1ef-ebb7d26edd39", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-07-29T13:55:45.457Z	INFO	handlers/utils.go:45	getting operation status	{"id": "cc122a15-7dba-4ea5-a4fe-12003ff98b0a", "type": "TB", "ydb_operation_id": "1"}
2024-07-29T13:55:45.457Z	INFO	handlers/utils.go:98	cancelling operation	{"reason": "TTL", "id": "cc122a15-7dba-4ea5-a4fe-12003ff98b0a", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-07-29T13:55:45.457Z	INFO	handlers/utils.go:45	getting operation status	{"id": "c979c9ed-375a-448a-acd2-59f83df7c4ca", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-07-29T13:55:45.457Z	INFO	handlers/utils.go:45	getting operation status	{"id": "39f27584-585c-4fea-95de-b8f5127d9a0b", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-07-29T13:55:45.457Z	INFO	handlers/utils.go:45	getting operation status	{"id": "931cfcfe-bd79-417d-9aa3-2d71eb8bed75", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-07-29T13:55:45.458Z	INFO	handlers/utils.go:45	getting operation status	{"id": "eb4cb746-e35d-4280-9548-9975a02b08a4", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-07-29T13:55:45.458Z	INFO	handlers/utils.go:45	getting operation status	{"id": "9725c761-6d3b-494d-8185-c58c1586b0d3", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-07-29T13:55:45.458Z	INFO	handlers/utils.go:45	getting operation status	{"id": "f214e493-6c43-4d98-9f7e-00f9ed980f5b", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-07-29T13:55:45.458Z	INFO	handlers/utils.go:45	getting operation status	{"id": "5d7d652a-9257-45bd-a2b7-238acdbcea7d", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-07-29T13:55:45.458Z	INFO	handlers/utils.go:45	getting operation status	{"id": "23c9b180-eee2-48d0-88d3-1a371b98ff75", "type": "TB", "ydb_operation_id": "1"}
2024-07-29T13:55:45.459Z	INFO	handlers/utils.go:68	received retriable error	{"id": "23c9b180-eee2-48d0-88d3-1a371b98ff75", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor2007ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-07-29T13:55:45.483Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-07-29T13:55:45.483Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 9d7faceb-638f-4c67-8889-3ed3d277a80f, type TB, state PENDING"}
2024-07-29T13:55:45.483Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 9d7faceb-638f-4c67-8889-3ed3d277a80f, type TB, state PENDING"}
2024-07-29T13:55:45.483Z	DEBUG	processor/processor.go:118	start operation handler	{"operation": "Operation, id 9d7faceb-638f-4c67-8889-3ed3d277a80f, type TB, state PENDING"}
2024-07-29T13:55:45.483Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id 9d7faceb-638f-4c67-8889-3ed3d277a80f, type TB, state PENDING"}
2024-07-29T13:55:45.483Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "9d7faceb-638f-4c67-8889-3ed3d277a80f"}
2024-07-29T13:55:45.483Z	DEBUG	processor/processor.go:83	Operation Processor stopped
--- PASS: TestProcessor (0.00s)
=== RUN   TestOperationHandlerRegistry
--- PASS: TestOperationHandlerRegistry (0.00s)
🟡 ydbcp/internal/types0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/ticker0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/timer0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/util/xlog0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/pkg/proto/ydbcp/v1alpha10000ms
🧪 Tests(none)
🖨️ Output
(none)

@bma13 bma13 merged commit 3ca6dc1 into main Jul 29, 2024
1 check passed
@bma13 bma13 deleted the tb-handler-up branch July 29, 2024 14:23
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