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

feat(mvp): support MakeRestore #35

Merged
merged 1 commit into from
Aug 16, 2024
Merged

feat(mvp): support MakeRestore #35

merged 1 commit into from
Aug 16, 2024

Conversation

ulya-sidorina
Copy link
Collaborator

No description provided.

@ulya-sidorina ulya-sidorina force-pushed the feature/NBYDB-173 branch 2 times, most recently from 03031a5 to d0355d5 Compare August 15, 2024 11:51
Copy link

📝 Test results

ydbcp

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

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/queries40012ms
🧪 Tests
  • 🟢TestQueryBuilder_CreateCreate
  • 🟢TestQueryBuilder_Read
  • 🟢TestQueryBuilder_UpdateCreate
  • 🟢TestQueryBuilder_UpdateUpdate
🖨️ Output
=== RUN   TestQueryBuilder_Read
2024-08-15T11:53:35.319Z	DEBUG	queries/read.go:137	read query	{"yql": "SELECT column1, column2, column3 FROM table1 WHERE (column1 = $param0 OR column1 = $param1) AND (column2 = $param2 OR column2 = $param3)"}
--- PASS: TestQueryBuilder_Read (0.00s)
=== RUN   TestQueryBuilder_UpdateUpdate
2024-08-15T11:53:35.321Z	DEBUG	queries/write.go:240	write query	{"yql": "UPDATE Backups SET status = $status_0 WHERE id = $id_0;\nUPDATE Operations SET status = $status_1, message = $message_1 WHERE id = $id_1"}
--- PASS: TestQueryBuilder_UpdateUpdate (0.00s)
=== RUN   TestQueryBuilder_CreateCreate
2024-08-15T11:53:35.322Z	DEBUG	queries/write.go:240	write query	{"yql": "UPSERT INTO Backups (id, container_id, database, endpoint, initiated, s3_endpoint, s3_region, s3_bucket, s3_path_prefix, status, message) VALUES ($id_0, $container_id_0, $database_0, $endpoint_0, $initiated_0, $s3_endpoint_0, $s3_region_0, $s3_bucket_0, $s3_path_prefix_0, $status_0, $message_0);\nUPSERT INTO Operations (id, type, status, container_id, database, endpoint, backup_id, initiated, created_at, operation_id, message) VALUES ($id_1, $type_1, $status_1, $container_id_1, $database_1, $endpoint_1, $backup_id_1, $initiated_1, $created_at_1, $operation_id_1, $message_1)"}
--- PASS: TestQueryBuilder_CreateCreate (0.00s)
=== RUN   TestQueryBuilder_UpdateCreate
2024-08-15T11:53:35.322Z	DEBUG	queries/write.go:240	write query	{"yql": "UPDATE Backups SET status = $status_0 WHERE id = $id_0;\nUPSERT INTO Operations (id, type, status, container_id, database, endpoint, backup_id, initiated, created_at, operation_id, message) VALUES ($id_1, $type_1, $status_1, $container_id_1, $database_1, $endpoint_1, $backup_id_1, $initiated_1, $created_at_1, $operation_id_1, $message_1)"}
--- PASS: TestQueryBuilder_UpdateCreate (0.00s)
🟢 ydbcp/internal/handlers200021ms
🧪 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-08-15T11:53:36.061Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "3e9084e4-14bb-45a6-9fe0-16098c409c4d", "type": "RB", "state": "PENDING", "message": ""}
2024-08-15T11:53:36.061Z	INFO	handlers/utils.go:46	getting operation status	{"id": "3e9084e4-14bb-45a6-9fe0-16098c409c4d", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-08-15T11:53:36.061Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "23db4864-1854-4950-a68a-d7ec3d6ea1eb", "type": "RB", "state": "PENDING", "message": ""}
2024-08-15T11:53:36.061Z	INFO	handlers/utils.go:46	getting operation status	{"id": "23db4864-1854-4950-a68a-d7ec3d6ea1eb", "type": "RB", "ydb_operation_id": "1"}
2024-08-15T11:53:36.061Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "23db4864-1854-4950-a68a-d7ec3d6ea1eb", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-08-15T11:53:36.062Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "6d744bf6-794b-442a-b864-f9e92e2aae65", "type": "RB", "state": "PENDING", "message": ""}
2024-08-15T11:53:36.062Z	INFO	handlers/utils.go:46	getting operation status	{"id": "6d744bf6-794b-442a-b864-f9e92e2aae65", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-15T11:53:36.062Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "0ded53ae-6a6b-41d7-afe7-953382be3784", "type": "RB", "state": "PENDING", "message": ""}
2024-08-15T11:53:36.062Z	INFO	handlers/utils.go:46	getting operation status	{"id": "0ded53ae-6a6b-41d7-afe7-953382be3784", "type": "RB", "ydb_operation_id": "1"}
2024-08-15T11:53:36.062Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "0ded53ae-6a6b-41d7-afe7-953382be3784", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-08-15T11:53:36.062Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "9cb3ce10-baf4-4190-980a-c65019cceec2", "type": "RB", "state": "PENDING", "message": ""}
2024-08-15T11:53:36.062Z	INFO	handlers/utils.go:46	getting operation status	{"id": "9cb3ce10-baf4-4190-980a-c65019cceec2", "type": "RB", "ydb_operation_id": "1"}
2024-08-15T11:53:36.062Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "9cb3ce10-baf4-4190-980a-c65019cceec2", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-15T11:53:36.062Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "f888bc47-92a3-450e-8c8d-acdc72530bc1", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-15T11:53:36.062Z	INFO	handlers/utils.go:46	getting operation status	{"id": "f888bc47-92a3-450e-8c8d-acdc72530bc1", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-08-15T11:53:36.062Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "a4983aec-c1ac-4d99-b593-7dc5b04617dd", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-15T11:53:36.062Z	INFO	handlers/utils.go:46	getting operation status	{"id": "a4983aec-c1ac-4d99-b593-7dc5b04617dd", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-15T11:53:36.063Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "19028cff-58d9-4063-a270-163dd22c36a3", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "19028cff-58d9-4063-a270-163dd22c36a3", "type": "RB", "ydb_operation_id": "1"}
2024-08-15T11:53:36.063Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "19028cff-58d9-4063-a270-163dd22c36a3", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-08-15T11:53:36.063Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "1439c8a4-5c94-4d27-8b9c-7d24b45786d6", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "1439c8a4-5c94-4d27-8b9c-7d24b45786d6", "type": "RB", "ydb_operation_id": "1"}
2024-08-15T11:53:36.063Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "1439c8a4-5c94-4d27-8b9c-7d24b45786d6", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-08-15T11:53:36.063Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "23ad0599-d90f-4619-b3a2-a43c660f5e0a", "type": "RB", "state": "PENDING", "message": ""}
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "23ad0599-d90f-4619-b3a2-a43c660f5e0a", "type": "RB", "ydb_operation_id": "1"}
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:69	received retriable error	{"id": "23ad0599-d90f-4619-b3a2-a43c660f5e0a", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "0167845b-9ded-4ff5-801e-ffa0382f1396", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "5c76a529-628a-4c39-81f8-58c7b7ad6873", "type": "TB", "ydb_operation_id": "1"}
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "5c76a529-628a-4c39-81f8-58c7b7ad6873", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "d53d4d1a-587a-48f5-93ff-3910e7515620", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "cd099c1c-5dbe-4abf-ad37-8e147960d1bc", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "1e948b69-b19f-4ac7-8e28-b9866f25d4ad", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "39197cfc-b0b3-450f-bcb3-fb01a29af707", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "000ce86e-9ae0-4b40-9b77-b90c5502fc1c", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "114373ce-cd06-4721-bb9b-b844a4a0d228", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "5ca46942-9d95-4f33-8477-aec66cb012c7", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "908eb37b-960d-4812-8235-f9f18c02c0d4", "type": "TB", "ydb_operation_id": "1"}
2024-08-15T11:53:36.063Z	INFO	handlers/utils.go:69	received retriable error	{"id": "908eb37b-960d-4812-8235-f9f18c02c0d4", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor2009ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-08-15T11:53:36.051Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-08-15T11:53:36.051Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 86727d17-a551-42f2-a8ba-bc475c086b39, type TB, state PENDING"}
2024-08-15T11:53:36.051Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 86727d17-a551-42f2-a8ba-bc475c086b39, type TB, state PENDING"}
2024-08-15T11:53:36.051Z	DEBUG	processor/processor.go:120	start operation handler	{"operation": "Operation, id 86727d17-a551-42f2-a8ba-bc475c086b39, type TB, state PENDING"}
2024-08-15T11:53:36.051Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id 86727d17-a551-42f2-a8ba-bc475c086b39, type TB, state PENDING"}
2024-08-15T11:53:36.051Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "86727d17-a551-42f2-a8ba-bc475c086b39"}
2024-08-15T11:53:36.051Z	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

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

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/queries4008ms
🧪 Tests
  • 🟢TestQueryBuilder_CreateCreate
  • 🟢TestQueryBuilder_Read
  • 🟢TestQueryBuilder_UpdateCreate
  • 🟢TestQueryBuilder_UpdateUpdate
🖨️ Output
=== RUN   TestQueryBuilder_Read
2024-08-15T11:57:13.610Z	DEBUG	queries/read.go:137	read query	{"yql": "SELECT column1, column2, column3 FROM table1 WHERE (column1 = $param0 OR column1 = $param1) AND (column2 = $param2 OR column2 = $param3)"}
--- PASS: TestQueryBuilder_Read (0.00s)
=== RUN   TestQueryBuilder_UpdateUpdate
2024-08-15T11:57:13.610Z	DEBUG	queries/write.go:240	write query	{"yql": "UPDATE Backups SET status = $status_0 WHERE id = $id_0;\nUPDATE Operations SET status = $status_1, message = $message_1 WHERE id = $id_1"}
--- PASS: TestQueryBuilder_UpdateUpdate (0.00s)
=== RUN   TestQueryBuilder_CreateCreate
2024-08-15T11:57:13.610Z	DEBUG	queries/write.go:240	write query	{"yql": "UPSERT INTO Backups (id, container_id, database, endpoint, initiated, s3_endpoint, s3_region, s3_bucket, s3_path_prefix, status, message) VALUES ($id_0, $container_id_0, $database_0, $endpoint_0, $initiated_0, $s3_endpoint_0, $s3_region_0, $s3_bucket_0, $s3_path_prefix_0, $status_0, $message_0);\nUPSERT INTO Operations (id, type, status, container_id, database, endpoint, backup_id, initiated, created_at, operation_id, message) VALUES ($id_1, $type_1, $status_1, $container_id_1, $database_1, $endpoint_1, $backup_id_1, $initiated_1, $created_at_1, $operation_id_1, $message_1)"}
--- PASS: TestQueryBuilder_CreateCreate (0.00s)
=== RUN   TestQueryBuilder_UpdateCreate
2024-08-15T11:57:13.610Z	DEBUG	queries/write.go:240	write query	{"yql": "UPDATE Backups SET status = $status_0 WHERE id = $id_0;\nUPSERT INTO Operations (id, type, status, container_id, database, endpoint, backup_id, initiated, created_at, operation_id, message) VALUES ($id_1, $type_1, $status_1, $container_id_1, $database_1, $endpoint_1, $backup_id_1, $initiated_1, $created_at_1, $operation_id_1, $message_1)"}
--- PASS: TestQueryBuilder_UpdateCreate (0.00s)
🟢 ydbcp/internal/handlers200016ms
🧪 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-08-15T11:57:14.232Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "fd202a3f-779a-45d8-a5b2-2449c79584d0", "type": "RB", "state": "PENDING", "message": ""}
2024-08-15T11:57:14.232Z	INFO	handlers/utils.go:46	getting operation status	{"id": "fd202a3f-779a-45d8-a5b2-2449c79584d0", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-08-15T11:57:14.232Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "5466710d-ed89-4386-9509-97b29cee259b", "type": "RB", "state": "PENDING", "message": ""}
2024-08-15T11:57:14.232Z	INFO	handlers/utils.go:46	getting operation status	{"id": "5466710d-ed89-4386-9509-97b29cee259b", "type": "RB", "ydb_operation_id": "1"}
2024-08-15T11:57:14.232Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "5466710d-ed89-4386-9509-97b29cee259b", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-08-15T11:57:14.232Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "9d97b8f2-5f0c-4950-9e5d-876b86d6c9c0", "type": "RB", "state": "PENDING", "message": ""}
2024-08-15T11:57:14.232Z	INFO	handlers/utils.go:46	getting operation status	{"id": "9d97b8f2-5f0c-4950-9e5d-876b86d6c9c0", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-15T11:57:14.232Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "1a3654ef-5fa9-4e2c-be79-d0d6e9722571", "type": "RB", "state": "PENDING", "message": ""}
2024-08-15T11:57:14.232Z	INFO	handlers/utils.go:46	getting operation status	{"id": "1a3654ef-5fa9-4e2c-be79-d0d6e9722571", "type": "RB", "ydb_operation_id": "1"}
2024-08-15T11:57:14.232Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "1a3654ef-5fa9-4e2c-be79-d0d6e9722571", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-08-15T11:57:14.232Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "8970fe2b-1890-4583-aa36-08fc39472afc", "type": "RB", "state": "PENDING", "message": ""}
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "8970fe2b-1890-4583-aa36-08fc39472afc", "type": "RB", "ydb_operation_id": "1"}
2024-08-15T11:57:14.233Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "8970fe2b-1890-4583-aa36-08fc39472afc", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-15T11:57:14.233Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "ba8cb5fd-82dc-4b96-99ab-1db57b2b81e5", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "ba8cb5fd-82dc-4b96-99ab-1db57b2b81e5", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-08-15T11:57:14.233Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "dcda0ba5-9d79-4ffc-b2ec-bb863d6c5a7b", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "dcda0ba5-9d79-4ffc-b2ec-bb863d6c5a7b", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-15T11:57:14.233Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "b3e64967-fee6-4b31-800d-8ae22eba53a7", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "b3e64967-fee6-4b31-800d-8ae22eba53a7", "type": "RB", "ydb_operation_id": "1"}
2024-08-15T11:57:14.233Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "b3e64967-fee6-4b31-800d-8ae22eba53a7", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-08-15T11:57:14.233Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "6401839b-e63d-4360-a8da-7454596ea40d", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "6401839b-e63d-4360-a8da-7454596ea40d", "type": "RB", "ydb_operation_id": "1"}
2024-08-15T11:57:14.233Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "6401839b-e63d-4360-a8da-7454596ea40d", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-08-15T11:57:14.233Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "2cd04734-5162-4d53-87d7-05323cc06e1c", "type": "RB", "state": "PENDING", "message": ""}
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "2cd04734-5162-4d53-87d7-05323cc06e1c", "type": "RB", "ydb_operation_id": "1"}
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:69	received retriable error	{"id": "2cd04734-5162-4d53-87d7-05323cc06e1c", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "6f9c354f-ca48-405c-a5e1-63bab4c9eb7f", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "1d2242f2-84a5-4693-bc76-af87923183f2", "type": "TB", "ydb_operation_id": "1"}
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "1d2242f2-84a5-4693-bc76-af87923183f2", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "da6cb8e0-12e6-47de-b8a9-d71ca3686400", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "462ab76c-d73b-4eac-bdb7-905663e46a52", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "25e0becb-6407-4855-9174-0608f6152267", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "639e9c59-2f6a-4fd5-92cb-73d2908ce4a4", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "985d5499-27b4-4538-87d4-b70d05d62c2d", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "d1fe81f8-07a4-4419-863c-94582ea66c7f", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "8dff39ec-7d61-43d6-a619-01c0b959de5b", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:46	getting operation status	{"id": "d19557dc-e5f0-4190-8d91-1fdab4591c41", "type": "TB", "ydb_operation_id": "1"}
2024-08-15T11:57:14.233Z	INFO	handlers/utils.go:69	received retriable error	{"id": "d19557dc-e5f0-4190-8d91-1fdab4591c41", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor2008ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-08-15T11:57:14.227Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-08-15T11:57:14.227Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 94a44301-27d3-49cd-a49a-4067af81bc11, type TB, state PENDING"}
2024-08-15T11:57:14.227Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 94a44301-27d3-49cd-a49a-4067af81bc11, type TB, state PENDING"}
2024-08-15T11:57:14.228Z	DEBUG	processor/processor.go:120	start operation handler	{"operation": "Operation, id 94a44301-27d3-49cd-a49a-4067af81bc11, type TB, state PENDING"}
2024-08-15T11:57:14.228Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id 94a44301-27d3-49cd-a49a-4067af81bc11, type TB, state PENDING"}
2024-08-15T11:57:14.228Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "94a44301-27d3-49cd-a49a-4067af81bc11"}
2024-08-15T11:57:14.228Z	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)

@ulya-sidorina ulya-sidorina force-pushed the feature/NBYDB-173 branch 2 times, most recently from beb0433 to 444c3d7 Compare August 16, 2024 10:58
@ulya-sidorina ulya-sidorina marked this pull request as ready for review August 16, 2024 10:58
Copy link

📝 Test results

ydbcp

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

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/queries4008ms
🧪 Tests
  • 🟢TestQueryBuilder_CreateCreate
  • 🟢TestQueryBuilder_Read
  • 🟢TestQueryBuilder_UpdateCreate
  • 🟢TestQueryBuilder_UpdateUpdate
🖨️ Output
=== RUN   TestQueryBuilder_Read
2024-08-16T10:59:24.222Z	DEBUG	queries/read.go:137	read query	{"yql": "SELECT column1, column2, column3 FROM table1 WHERE (column1 = $param0 OR column1 = $param1) AND (column2 = $param2 OR column2 = $param3)"}
--- PASS: TestQueryBuilder_Read (0.00s)
=== RUN   TestQueryBuilder_UpdateUpdate
2024-08-16T10:59:24.222Z	DEBUG	queries/write.go:240	write query	{"yql": "UPDATE Backups SET status = $status_0 WHERE id = $id_0;\nUPDATE Operations SET status = $status_1, message = $message_1 WHERE id = $id_1"}
--- PASS: TestQueryBuilder_UpdateUpdate (0.00s)
=== RUN   TestQueryBuilder_CreateCreate
2024-08-16T10:59:24.222Z	DEBUG	queries/write.go:240	write query	{"yql": "UPSERT INTO Backups (id, container_id, database, endpoint, initiated, s3_endpoint, s3_region, s3_bucket, s3_path_prefix, status, message) VALUES ($id_0, $container_id_0, $database_0, $endpoint_0, $initiated_0, $s3_endpoint_0, $s3_region_0, $s3_bucket_0, $s3_path_prefix_0, $status_0, $message_0);\nUPSERT INTO Operations (id, type, status, container_id, database, endpoint, backup_id, initiated, created_at, operation_id, message) VALUES ($id_1, $type_1, $status_1, $container_id_1, $database_1, $endpoint_1, $backup_id_1, $initiated_1, $created_at_1, $operation_id_1, $message_1)"}
--- PASS: TestQueryBuilder_CreateCreate (0.00s)
=== RUN   TestQueryBuilder_UpdateCreate
2024-08-16T10:59:24.222Z	DEBUG	queries/write.go:240	write query	{"yql": "UPDATE Backups SET status = $status_0 WHERE id = $id_0;\nUPSERT INTO Operations (id, type, status, container_id, database, endpoint, backup_id, initiated, created_at, operation_id, message) VALUES ($id_1, $type_1, $status_1, $container_id_1, $database_1, $endpoint_1, $backup_id_1, $initiated_1, $created_at_1, $operation_id_1, $message_1)"}
--- PASS: TestQueryBuilder_UpdateCreate (0.00s)
🟢 ydbcp/internal/handlers200014ms
🧪 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-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "4e67912c-f464-4e03-9c52-5612de57eaa9", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "4e67912c-f464-4e03-9c52-5612de57eaa9", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "d6e44f4a-6e8f-48c7-895a-8f401fec5327", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "d6e44f4a-6e8f-48c7-895a-8f401fec5327", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "d6e44f4a-6e8f-48c7-895a-8f401fec5327", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "bc7ae166-61e8-47a3-932d-80c1ab00191d", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "bc7ae166-61e8-47a3-932d-80c1ab00191d", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "1ebff2db-b4eb-4c53-af42-80b5f8ac0bab", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "1ebff2db-b4eb-4c53-af42-80b5f8ac0bab", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "1ebff2db-b4eb-4c53-af42-80b5f8ac0bab", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "dea4b0df-6ff4-4c5c-8b11-2acae769de58", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "dea4b0df-6ff4-4c5c-8b11-2acae769de58", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "dea4b0df-6ff4-4c5c-8b11-2acae769de58", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "77b6e2b9-7063-4a98-bf08-02da0a2927d5", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "77b6e2b9-7063-4a98-bf08-02da0a2927d5", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "9d1922da-65bb-42bd-8d35-7bbd6b35111a", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "9d1922da-65bb-42bd-8d35-7bbd6b35111a", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "5fe1e395-b74e-47c1-8e7f-fc8c27d3110b", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "5fe1e395-b74e-47c1-8e7f-fc8c27d3110b", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "5fe1e395-b74e-47c1-8e7f-fc8c27d3110b", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "05170477-671d-4eef-89a2-f25e131c9010", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "05170477-671d-4eef-89a2-f25e131c9010", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "05170477-671d-4eef-89a2-f25e131c9010", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-08-16T10:59:24.443Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "e4fc3d2d-341e-4be2-89ae-1caee38afeb5", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "e4fc3d2d-341e-4be2-89ae-1caee38afeb5", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:69	received retriable error	{"id": "e4fc3d2d-341e-4be2-89ae-1caee38afeb5", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "4d3e84fa-1e8e-4cc6-9612-975184e23b58", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "bbf4021d-9224-4bcb-afc8-18f2f391577c", "type": "TB", "ydb_operation_id": "1"}
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "bbf4021d-9224-4bcb-afc8-18f2f391577c", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "f9fad3d8-85e0-4b45-8711-0f1fe88e728c", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-16T10:59:24.443Z	INFO	handlers/utils.go:46	getting operation status	{"id": "ff78d00f-6e29-4f1e-8af2-db348c670209", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-08-16T10:59:24.444Z	INFO	handlers/utils.go:46	getting operation status	{"id": "24919f7f-b62d-4cdb-a920-c0d900f1633c", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-16T10:59:24.444Z	INFO	handlers/utils.go:46	getting operation status	{"id": "ff90e890-42c3-4190-b979-dbd65f7c62d2", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-08-16T10:59:24.444Z	INFO	handlers/utils.go:46	getting operation status	{"id": "7af28eca-e57c-4650-bf27-5cb36671dbeb", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-16T10:59:24.444Z	INFO	handlers/utils.go:46	getting operation status	{"id": "5f974bc1-c494-445d-a68f-d232b198e0c8", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-08-16T10:59:24.444Z	INFO	handlers/utils.go:46	getting operation status	{"id": "c3a752b0-8bc2-48cf-bc30-1c32f26edfbc", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-08-16T10:59:24.444Z	INFO	handlers/utils.go:46	getting operation status	{"id": "265bdb47-4376-48eb-95cb-fbef3164304b", "type": "TB", "ydb_operation_id": "1"}
2024-08-16T10:59:24.444Z	INFO	handlers/utils.go:69	received retriable error	{"id": "265bdb47-4376-48eb-95cb-fbef3164304b", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor2009ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-08-16T10:59:24.440Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-08-16T10:59:24.440Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id e7b8b763-efd1-442d-bd61-443ee3f2e17e, type TB, state PENDING"}
2024-08-16T10:59:24.440Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id e7b8b763-efd1-442d-bd61-443ee3f2e17e, type TB, state PENDING"}
2024-08-16T10:59:24.440Z	DEBUG	processor/processor.go:120	start operation handler	{"operation": "Operation, id e7b8b763-efd1-442d-bd61-443ee3f2e17e, type TB, state PENDING"}
2024-08-16T10:59:24.440Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id e7b8b763-efd1-442d-bd61-443ee3f2e17e, type TB, state PENDING"}
2024-08-16T10:59:24.440Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "e7b8b763-efd1-442d-bd61-443ee3f2e17e"}
2024-08-16T10:59:24.440Z	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

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

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/queries40020ms
🧪 Tests
  • 🟢TestQueryBuilder_CreateCreate
  • 🟢TestQueryBuilder_Read
  • 🟢TestQueryBuilder_UpdateCreate
  • 🟢TestQueryBuilder_UpdateUpdate
🖨️ Output
=== RUN   TestQueryBuilder_Read
2024-08-16T11:12:38.446Z	DEBUG	queries/read.go:137	read query	{"yql": "SELECT column1, column2, column3 FROM table1 WHERE (column1 = $param0 OR column1 = $param1) AND (column2 = $param2 OR column2 = $param3)"}
--- PASS: TestQueryBuilder_Read (0.00s)
=== RUN   TestQueryBuilder_UpdateUpdate
2024-08-16T11:12:38.446Z	DEBUG	queries/write.go:240	write query	{"yql": "UPDATE Backups SET status = $status_0 WHERE id = $id_0;\nUPDATE Operations SET status = $status_1, message = $message_1 WHERE id = $id_1"}
--- PASS: TestQueryBuilder_UpdateUpdate (0.00s)
=== RUN   TestQueryBuilder_CreateCreate
2024-08-16T11:12:38.447Z	DEBUG	queries/write.go:240	write query	{"yql": "UPSERT INTO Backups (id, container_id, database, endpoint, initiated, s3_endpoint, s3_region, s3_bucket, s3_path_prefix, status, message) VALUES ($id_0, $container_id_0, $database_0, $endpoint_0, $initiated_0, $s3_endpoint_0, $s3_region_0, $s3_bucket_0, $s3_path_prefix_0, $status_0, $message_0);\nUPSERT INTO Operations (id, type, status, container_id, database, endpoint, backup_id, initiated, created_at, operation_id, message) VALUES ($id_1, $type_1, $status_1, $container_id_1, $database_1, $endpoint_1, $backup_id_1, $initiated_1, $created_at_1, $operation_id_1, $message_1)"}
--- PASS: TestQueryBuilder_CreateCreate (0.00s)
=== RUN   TestQueryBuilder_UpdateCreate
2024-08-16T11:12:38.447Z	DEBUG	queries/write.go:240	write query	{"yql": "UPDATE Backups SET status = $status_0 WHERE id = $id_0;\nUPSERT INTO Operations (id, type, status, container_id, database, endpoint, backup_id, initiated, created_at, operation_id, message) VALUES ($id_1, $type_1, $status_1, $container_id_1, $database_1, $endpoint_1, $backup_id_1, $initiated_1, $created_at_1, $operation_id_1, $message_1)"}
--- PASS: TestQueryBuilder_UpdateCreate (0.00s)
🟢 ydbcp/internal/handlers200019ms
🧪 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-08-16T11:12:39.062Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "200e4977-6440-4bc7-8740-8ea0ce8b9f31", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T11:12:39.062Z	INFO	handlers/utils.go:46	getting operation status	{"id": "200e4977-6440-4bc7-8740-8ea0ce8b9f31", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-08-16T11:12:39.063Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "94f88bb3-6ee0-47b4-8d08-cf367749426d", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T11:12:39.063Z	INFO	handlers/utils.go:46	getting operation status	{"id": "94f88bb3-6ee0-47b4-8d08-cf367749426d", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T11:12:39.064Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "94f88bb3-6ee0-47b4-8d08-cf367749426d", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-08-16T11:12:39.064Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "e75d8db4-9d57-42df-8390-54aec4c879a8", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T11:12:39.064Z	INFO	handlers/utils.go:46	getting operation status	{"id": "e75d8db4-9d57-42df-8390-54aec4c879a8", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-16T11:12:39.065Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "942cb14f-3c12-4385-b675-0f4858529547", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T11:12:39.065Z	INFO	handlers/utils.go:46	getting operation status	{"id": "942cb14f-3c12-4385-b675-0f4858529547", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T11:12:39.065Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "942cb14f-3c12-4385-b675-0f4858529547", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-08-16T11:12:39.066Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "38253710-8e0e-4344-b872-b8d22b5f941e", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T11:12:39.066Z	INFO	handlers/utils.go:46	getting operation status	{"id": "38253710-8e0e-4344-b872-b8d22b5f941e", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T11:12:39.066Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "38253710-8e0e-4344-b872-b8d22b5f941e", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-16T11:12:39.067Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "f0e57cc2-18cd-4002-9dc8-b4dddeb34d35", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "f0e57cc2-18cd-4002-9dc8-b4dddeb34d35", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-08-16T11:12:39.067Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "c605edf2-6abe-403d-b115-7e0ee1f4028b", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "c605edf2-6abe-403d-b115-7e0ee1f4028b", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-16T11:12:39.067Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "05b15fb6-44bd-4d1a-a61e-3feec32e2b7a", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "05b15fb6-44bd-4d1a-a61e-3feec32e2b7a", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T11:12:39.067Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "05b15fb6-44bd-4d1a-a61e-3feec32e2b7a", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-08-16T11:12:39.067Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "710bf74d-09f2-42e4-ba16-9665418dcbd6", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "710bf74d-09f2-42e4-ba16-9665418dcbd6", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T11:12:39.067Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "710bf74d-09f2-42e4-ba16-9665418dcbd6", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-08-16T11:12:39.067Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "082ae7d7-f73c-4395-8f57-168ba2057d50", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "082ae7d7-f73c-4395-8f57-168ba2057d50", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:69	received retriable error	{"id": "082ae7d7-f73c-4395-8f57-168ba2057d50", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "61370e14-26f0-4402-b88d-b8b1dcd1781d", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "9af54bbc-d271-4277-bf8e-a34458bad53c", "type": "TB", "ydb_operation_id": "1"}
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "9af54bbc-d271-4277-bf8e-a34458bad53c", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "50e24f44-597e-40f6-957c-6a8740ac08da", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "5e842074-8b24-4d10-bca0-3f16e2fc9dae", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "f3daadf0-4f06-42ab-9c1d-7ff0fe58b1d9", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "afc00b38-f901-42b7-b031-11f81d70e75d", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "68387a77-5a3e-49f3-a342-a350fe3ab28c", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-16T11:12:39.067Z	INFO	handlers/utils.go:46	getting operation status	{"id": "22391704-20b1-4593-aa46-1473dc7d3dbb", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-08-16T11:12:39.068Z	INFO	handlers/utils.go:46	getting operation status	{"id": "0845486b-1606-4a9e-a97b-cef7c6e12af1", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-08-16T11:12:39.068Z	INFO	handlers/utils.go:46	getting operation status	{"id": "4adba9c2-53bf-4b83-9faa-2e89b346e08e", "type": "TB", "ydb_operation_id": "1"}
2024-08-16T11:12:39.068Z	INFO	handlers/utils.go:69	received retriable error	{"id": "4adba9c2-53bf-4b83-9faa-2e89b346e08e", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor2009ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-08-16T11:12:39.058Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-08-16T11:12:39.058Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 51fda53a-d558-4d00-934f-881f5b18f9e8, type TB, state PENDING"}
2024-08-16T11:12:39.058Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 51fda53a-d558-4d00-934f-881f5b18f9e8, type TB, state PENDING"}
2024-08-16T11:12:39.058Z	DEBUG	processor/processor.go:120	start operation handler	{"operation": "Operation, id 51fda53a-d558-4d00-934f-881f5b18f9e8, type TB, state PENDING"}
2024-08-16T11:12:39.058Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id 51fda53a-d558-4d00-934f-881f5b18f9e8, type TB, state PENDING"}
2024-08-16T11:12:39.058Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "51fda53a-d558-4d00-934f-881f5b18f9e8"}
2024-08-16T11:12:39.058Z	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

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

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/queries4008ms
🧪 Tests
  • 🟢TestQueryBuilder_CreateCreate
  • 🟢TestQueryBuilder_Read
  • 🟢TestQueryBuilder_UpdateCreate
  • 🟢TestQueryBuilder_UpdateUpdate
🖨️ Output
=== RUN   TestQueryBuilder_Read
2024-08-16T12:03:01.658Z	DEBUG	queries/read.go:137	read query	{"yql": "SELECT column1, column2, column3 FROM table1 WHERE (column1 = $param0 OR column1 = $param1) AND (column2 = $param2 OR column2 = $param3)"}
--- PASS: TestQueryBuilder_Read (0.00s)
=== RUN   TestQueryBuilder_UpdateUpdate
2024-08-16T12:03:01.658Z	DEBUG	queries/write.go:240	write query	{"yql": "UPDATE Backups SET status = $status_0 WHERE id = $id_0;\nUPDATE Operations SET status = $status_1, message = $message_1 WHERE id = $id_1"}
--- PASS: TestQueryBuilder_UpdateUpdate (0.00s)
=== RUN   TestQueryBuilder_CreateCreate
2024-08-16T12:03:01.658Z	DEBUG	queries/write.go:240	write query	{"yql": "UPSERT INTO Backups (id, container_id, database, endpoint, initiated, s3_endpoint, s3_region, s3_bucket, s3_path_prefix, status, message) VALUES ($id_0, $container_id_0, $database_0, $endpoint_0, $initiated_0, $s3_endpoint_0, $s3_region_0, $s3_bucket_0, $s3_path_prefix_0, $status_0, $message_0);\nUPSERT INTO Operations (id, type, status, container_id, database, endpoint, backup_id, initiated, created_at, operation_id, message) VALUES ($id_1, $type_1, $status_1, $container_id_1, $database_1, $endpoint_1, $backup_id_1, $initiated_1, $created_at_1, $operation_id_1, $message_1)"}
--- PASS: TestQueryBuilder_CreateCreate (0.00s)
=== RUN   TestQueryBuilder_UpdateCreate
2024-08-16T12:03:01.658Z	DEBUG	queries/write.go:240	write query	{"yql": "UPDATE Backups SET status = $status_0 WHERE id = $id_0;\nUPSERT INTO Operations (id, type, status, container_id, database, endpoint, backup_id, initiated, created_at, operation_id, message) VALUES ($id_1, $type_1, $status_1, $container_id_1, $database_1, $endpoint_1, $backup_id_1, $initiated_1, $created_at_1, $operation_id_1, $message_1)"}
--- PASS: TestQueryBuilder_UpdateCreate (0.00s)
🟢 ydbcp/internal/handlers200017ms
🧪 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-08-16T12:03:02.087Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "b488e9ba-4436-44b3-b013-66b21aa67e96", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T12:03:02.087Z	INFO	handlers/utils.go:46	getting operation status	{"id": "b488e9ba-4436-44b3-b013-66b21aa67e96", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-08-16T12:03:02.087Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "eebceb5b-773d-428d-b324-dddf3b70023c", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T12:03:02.087Z	INFO	handlers/utils.go:46	getting operation status	{"id": "eebceb5b-773d-428d-b324-dddf3b70023c", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T12:03:02.087Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "eebceb5b-773d-428d-b324-dddf3b70023c", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-08-16T12:03:02.088Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "38e155a9-13c3-43c9-a9cd-644f09147bce", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T12:03:02.088Z	INFO	handlers/utils.go:46	getting operation status	{"id": "38e155a9-13c3-43c9-a9cd-644f09147bce", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-16T12:03:02.088Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "100485ae-2125-46b5-866f-ee1bc18fa17d", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T12:03:02.088Z	INFO	handlers/utils.go:46	getting operation status	{"id": "100485ae-2125-46b5-866f-ee1bc18fa17d", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T12:03:02.088Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "100485ae-2125-46b5-866f-ee1bc18fa17d", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-08-16T12:03:02.088Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "66a00220-7b39-4744-bdc0-31d4377d2a83", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T12:03:02.088Z	INFO	handlers/utils.go:46	getting operation status	{"id": "66a00220-7b39-4744-bdc0-31d4377d2a83", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T12:03:02.089Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "66a00220-7b39-4744-bdc0-31d4377d2a83", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-16T12:03:02.089Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "22f94574-abdb-4e04-b7bb-daf90bae4ae3", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-16T12:03:02.089Z	INFO	handlers/utils.go:46	getting operation status	{"id": "22f94574-abdb-4e04-b7bb-daf90bae4ae3", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-08-16T12:03:02.090Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "b30da659-f387-4cfb-8050-e0ccf88864be", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-16T12:03:02.090Z	INFO	handlers/utils.go:46	getting operation status	{"id": "b30da659-f387-4cfb-8050-e0ccf88864be", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-16T12:03:02.090Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "695e444b-d512-4096-8f70-0fac60c560c4", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-16T12:03:02.090Z	INFO	handlers/utils.go:46	getting operation status	{"id": "695e444b-d512-4096-8f70-0fac60c560c4", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T12:03:02.090Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "695e444b-d512-4096-8f70-0fac60c560c4", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-08-16T12:03:02.090Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "f306c95d-3d35-40f1-8785-f7bac11ce4c2", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-16T12:03:02.090Z	INFO	handlers/utils.go:46	getting operation status	{"id": "f306c95d-3d35-40f1-8785-f7bac11ce4c2", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T12:03:02.090Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "f306c95d-3d35-40f1-8785-f7bac11ce4c2", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-08-16T12:03:02.090Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "1ca3d76b-5eeb-4fd8-849f-87d0dbada405", "type": "RB", "state": "PENDING", "message": ""}
2024-08-16T12:03:02.090Z	INFO	handlers/utils.go:46	getting operation status	{"id": "1ca3d76b-5eeb-4fd8-849f-87d0dbada405", "type": "RB", "ydb_operation_id": "1"}
2024-08-16T12:03:02.090Z	INFO	handlers/utils.go:69	received retriable error	{"id": "1ca3d76b-5eeb-4fd8-849f-87d0dbada405", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-08-16T12:03:02.090Z	INFO	handlers/utils.go:46	getting operation status	{"id": "4c62304c-922d-46b0-bef8-b9603a424cbf", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-08-16T12:03:02.090Z	INFO	handlers/utils.go:46	getting operation status	{"id": "f60decbf-27cc-42cb-b7a7-b3e413f4a64e", "type": "TB", "ydb_operation_id": "1"}
2024-08-16T12:03:02.090Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "f60decbf-27cc-42cb-b7a7-b3e413f4a64e", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-08-16T12:03:02.091Z	INFO	handlers/utils.go:46	getting operation status	{"id": "84eee27c-5b50-4059-95d5-31e87443057f", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-16T12:03:02.091Z	INFO	handlers/utils.go:46	getting operation status	{"id": "a0555258-ea39-4002-807c-67f12f3cae0f", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-08-16T12:03:02.091Z	INFO	handlers/utils.go:46	getting operation status	{"id": "fa9ee781-7f8c-46e2-b5f2-cdfd10134762", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-16T12:03:02.091Z	INFO	handlers/utils.go:46	getting operation status	{"id": "a6de3b3c-371e-40b1-9cb2-3155739ee064", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-08-16T12:03:02.091Z	INFO	handlers/utils.go:46	getting operation status	{"id": "04ec3e0b-f35d-4d58-9089-4e93b7dac514", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-16T12:03:02.091Z	INFO	handlers/utils.go:46	getting operation status	{"id": "5ca8497e-759b-43a0-94c6-5d0aa5999aa7", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-08-16T12:03:02.091Z	INFO	handlers/utils.go:46	getting operation status	{"id": "dab32a73-8b5c-4e6d-84cb-f4f5aebbeae9", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-08-16T12:03:02.091Z	INFO	handlers/utils.go:46	getting operation status	{"id": "82999676-4d86-49fd-8bbb-be1635654ec6", "type": "TB", "ydb_operation_id": "1"}
2024-08-16T12:03:02.091Z	INFO	handlers/utils.go:69	received retriable error	{"id": "82999676-4d86-49fd-8bbb-be1635654ec6", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor2009ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-08-16T12:03:02.083Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-08-16T12:03:02.083Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id d73ef7a8-7421-4879-9aaf-d2d354b69191, type TB, state PENDING"}
2024-08-16T12:03:02.083Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id d73ef7a8-7421-4879-9aaf-d2d354b69191, type TB, state PENDING"}
2024-08-16T12:03:02.083Z	DEBUG	processor/processor.go:120	start operation handler	{"operation": "Operation, id d73ef7a8-7421-4879-9aaf-d2d354b69191, type TB, state PENDING"}
2024-08-16T12:03:02.083Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id d73ef7a8-7421-4879-9aaf-d2d354b69191, type TB, state PENDING"}
2024-08-16T12:03:02.083Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "d73ef7a8-7421-4879-9aaf-d2d354b69191"}
2024-08-16T12:03:02.083Z	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)

@ulya-sidorina ulya-sidorina requested a review from qrort August 16, 2024 12:10
@ulya-sidorina ulya-sidorina merged commit 35c0f72 into main Aug 16, 2024
1 check passed
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