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

Use grpc status codes #41

Merged
merged 2 commits into from
Aug 21, 2024
Merged

Use grpc status codes #41

merged 2 commits into from
Aug 21, 2024

Conversation

bma13
Copy link
Collaborator

@bma13 bma13 commented Aug 21, 2024

No description provided.

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/auth0000ms
🧪 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-21T10:36:50.080Z	DEBUG	queries/read.go:135	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-21T10:36:50.080Z	DEBUG	queries/write.go:236	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-21T10:36:50.081Z	DEBUG	queries/write.go:236	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-21T10:36:50.081Z	DEBUG	queries/write.go:236	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-21T10:36:50.486Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "9f5c0c05-3685-4ff1-b6d8-d3b7b1aed2ed", "type": "RB", "state": "PENDING", "message": ""}
2024-08-21T10:36:50.486Z	INFO	handlers/utils.go:46	getting operation status	{"id": "9f5c0c05-3685-4ff1-b6d8-d3b7b1aed2ed", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-08-21T10:36:50.486Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "a14a7dd9-d383-4fc4-b907-2aab1f103e59", "type": "RB", "state": "PENDING", "message": ""}
2024-08-21T10:36:50.486Z	INFO	handlers/utils.go:46	getting operation status	{"id": "a14a7dd9-d383-4fc4-b907-2aab1f103e59", "type": "RB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.486Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "a14a7dd9-d383-4fc4-b907-2aab1f103e59", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-08-21T10:36:50.486Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "3c96cd71-ce0e-4e39-9cd3-fa176569a4bc", "type": "RB", "state": "PENDING", "message": ""}
2024-08-21T10:36:50.486Z	INFO	handlers/utils.go:46	getting operation status	{"id": "3c96cd71-ce0e-4e39-9cd3-fa176569a4bc", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-21T10:36:50.486Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "fe201d7b-c799-430f-a686-5ed9418f0ceb", "type": "RB", "state": "PENDING", "message": ""}
2024-08-21T10:36:50.486Z	INFO	handlers/utils.go:46	getting operation status	{"id": "fe201d7b-c799-430f-a686-5ed9418f0ceb", "type": "RB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.486Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "fe201d7b-c799-430f-a686-5ed9418f0ceb", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-08-21T10:36:50.486Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "8b13bee3-8610-4f3c-8ba8-31eb3858af4d", "type": "RB", "state": "PENDING", "message": ""}
2024-08-21T10:36:50.486Z	INFO	handlers/utils.go:46	getting operation status	{"id": "8b13bee3-8610-4f3c-8ba8-31eb3858af4d", "type": "RB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.486Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "8b13bee3-8610-4f3c-8ba8-31eb3858af4d", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "5ed1636d-1e54-4e35-bd4b-eabd4d03c488", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "5ed1636d-1e54-4e35-bd4b-eabd4d03c488", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "d2dbf5ef-829d-4822-a6b3-a710c6b59f16", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "d2dbf5ef-829d-4822-a6b3-a710c6b59f16", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "c55ea067-915d-4ea0-b529-087edbce2eb6", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "c55ea067-915d-4ea0-b529-087edbce2eb6", "type": "RB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "c55ea067-915d-4ea0-b529-087edbce2eb6", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "f8bb4ff0-253a-48f4-978c-fd83f9ef8234", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "f8bb4ff0-253a-48f4-978c-fd83f9ef8234", "type": "RB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "f8bb4ff0-253a-48f4-978c-fd83f9ef8234", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "8c99b1d5-0e49-4581-bc9e-908596d0115e", "type": "RB", "state": "PENDING", "message": ""}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "8c99b1d5-0e49-4581-bc9e-908596d0115e", "type": "RB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:69	received retriable error	{"id": "8c99b1d5-0e49-4581-bc9e-908596d0115e", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "ed008850-2fb3-4d0d-973b-05a894ad4c1e", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "35b02a6a-31c9-40a7-873e-f47f2633e4f6", "type": "TB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "35b02a6a-31c9-40a7-873e-f47f2633e4f6", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "22a7997b-413f-49da-99cd-72a45435b1af", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "73e530f6-ca82-42dd-9c5c-3525678d5a8e", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "df578495-c2ae-4b89-aadf-cc7faab59481", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "81c3aa6d-793b-4094-ba09-155ddf52775a", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "9ae7201f-9b7b-404c-b931-7aed531ac7fb", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "1d672327-f3e9-44f8-a288-24ffd138505f", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "0ba14d82-3e4c-48bb-b894-a510936dd941", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "5d18bb88-a1d1-427a-8923-06f5774b59ed", "type": "TB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:69	received retriable error	{"id": "5d18bb88-a1d1-427a-8923-06f5774b59ed", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor2009ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-08-21T10:36:50.482Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-08-21T10:36:50.482Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id b360e8a2-3c1f-4697-8bac-9e0142f1a326, type TB, state PENDING"}
2024-08-21T10:36:50.482Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id b360e8a2-3c1f-4697-8bac-9e0142f1a326, type TB, state PENDING"}
2024-08-21T10:36:50.483Z	DEBUG	processor/processor.go:120	start operation handler	{"operation": "Operation, id b360e8a2-3c1f-4697-8bac-9e0142f1a326, type TB, state PENDING"}
2024-08-21T10:36:50.483Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id b360e8a2-3c1f-4697-8bac-9e0142f1a326, type TB, state PENDING"}
2024-08-21T10:36:50.483Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "b360e8a2-3c1f-4697-8bac-9e0142f1a326"}
2024-08-21T10:36:50.483Z	DEBUG	processor/processor.go:83	Operation Processor stopped
--- PASS: TestProcessor (0.00s)
=== RUN   TestOperationHandlerRegistry
--- PASS: TestOperationHandlerRegistry (0.00s)
🟡 ydbcp/internal/server0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/server/services/backup0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/server/services/operation0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 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/plugins/auth0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/pkg/proto/ydbcp/v1alpha10000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/plugins/auth_nebius0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/plugins/auth_nebius/proto/iam/v10000ms
🧪 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/auth0000ms
🧪 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/queries4000ms
🧪 Tests
  • 🟢TestQueryBuilder_CreateCreate
  • 🟢TestQueryBuilder_Read
  • 🟢TestQueryBuilder_UpdateCreate
  • 🟢TestQueryBuilder_UpdateUpdate
🖨️ Output
=== RUN   TestQueryBuilder_Read
2024-08-21T10:36:50.080Z	DEBUG	queries/read.go:135	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-21T10:36:50.080Z	DEBUG	queries/write.go:236	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-21T10:36:50.081Z	DEBUG	queries/write.go:236	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-21T10:36:50.081Z	DEBUG	queries/write.go:236	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/handlers20001ms
🧪 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-21T10:36:50.486Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "9f5c0c05-3685-4ff1-b6d8-d3b7b1aed2ed", "type": "RB", "state": "PENDING", "message": ""}
2024-08-21T10:36:50.486Z	INFO	handlers/utils.go:46	getting operation status	{"id": "9f5c0c05-3685-4ff1-b6d8-d3b7b1aed2ed", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-08-21T10:36:50.486Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "a14a7dd9-d383-4fc4-b907-2aab1f103e59", "type": "RB", "state": "PENDING", "message": ""}
2024-08-21T10:36:50.486Z	INFO	handlers/utils.go:46	getting operation status	{"id": "a14a7dd9-d383-4fc4-b907-2aab1f103e59", "type": "RB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.486Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "a14a7dd9-d383-4fc4-b907-2aab1f103e59", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-08-21T10:36:50.486Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "3c96cd71-ce0e-4e39-9cd3-fa176569a4bc", "type": "RB", "state": "PENDING", "message": ""}
2024-08-21T10:36:50.486Z	INFO	handlers/utils.go:46	getting operation status	{"id": "3c96cd71-ce0e-4e39-9cd3-fa176569a4bc", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-21T10:36:50.486Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "fe201d7b-c799-430f-a686-5ed9418f0ceb", "type": "RB", "state": "PENDING", "message": ""}
2024-08-21T10:36:50.486Z	INFO	handlers/utils.go:46	getting operation status	{"id": "fe201d7b-c799-430f-a686-5ed9418f0ceb", "type": "RB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.486Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "fe201d7b-c799-430f-a686-5ed9418f0ceb", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-08-21T10:36:50.486Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "8b13bee3-8610-4f3c-8ba8-31eb3858af4d", "type": "RB", "state": "PENDING", "message": ""}
2024-08-21T10:36:50.486Z	INFO	handlers/utils.go:46	getting operation status	{"id": "8b13bee3-8610-4f3c-8ba8-31eb3858af4d", "type": "RB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.486Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "8b13bee3-8610-4f3c-8ba8-31eb3858af4d", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "5ed1636d-1e54-4e35-bd4b-eabd4d03c488", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "5ed1636d-1e54-4e35-bd4b-eabd4d03c488", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "d2dbf5ef-829d-4822-a6b3-a710c6b59f16", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "d2dbf5ef-829d-4822-a6b3-a710c6b59f16", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "c55ea067-915d-4ea0-b529-087edbce2eb6", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "c55ea067-915d-4ea0-b529-087edbce2eb6", "type": "RB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "c55ea067-915d-4ea0-b529-087edbce2eb6", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "f8bb4ff0-253a-48f4-978c-fd83f9ef8234", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "f8bb4ff0-253a-48f4-978c-fd83f9ef8234", "type": "RB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "f8bb4ff0-253a-48f4-978c-fd83f9ef8234", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-08-21T10:36:50.487Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "8c99b1d5-0e49-4581-bc9e-908596d0115e", "type": "RB", "state": "PENDING", "message": ""}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "8c99b1d5-0e49-4581-bc9e-908596d0115e", "type": "RB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:69	received retriable error	{"id": "8c99b1d5-0e49-4581-bc9e-908596d0115e", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "ed008850-2fb3-4d0d-973b-05a894ad4c1e", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "35b02a6a-31c9-40a7-873e-f47f2633e4f6", "type": "TB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "35b02a6a-31c9-40a7-873e-f47f2633e4f6", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "22a7997b-413f-49da-99cd-72a45435b1af", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "73e530f6-ca82-42dd-9c5c-3525678d5a8e", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "df578495-c2ae-4b89-aadf-cc7faab59481", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "81c3aa6d-793b-4094-ba09-155ddf52775a", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "9ae7201f-9b7b-404c-b931-7aed531ac7fb", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "1d672327-f3e9-44f8-a288-24ffd138505f", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "0ba14d82-3e4c-48bb-b894-a510936dd941", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:46	getting operation status	{"id": "5d18bb88-a1d1-427a-8923-06f5774b59ed", "type": "TB", "ydb_operation_id": "1"}
2024-08-21T10:36:50.487Z	INFO	handlers/utils.go:69	received retriable error	{"id": "5d18bb88-a1d1-427a-8923-06f5774b59ed", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor2000ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-08-21T10:36:50.482Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-08-21T10:36:50.482Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id b360e8a2-3c1f-4697-8bac-9e0142f1a326, type TB, state PENDING"}
2024-08-21T10:36:50.482Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id b360e8a2-3c1f-4697-8bac-9e0142f1a326, type TB, state PENDING"}
2024-08-21T10:36:50.483Z	DEBUG	processor/processor.go:120	start operation handler	{"operation": "Operation, id b360e8a2-3c1f-4697-8bac-9e0142f1a326, type TB, state PENDING"}
2024-08-21T10:36:50.483Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id b360e8a2-3c1f-4697-8bac-9e0142f1a326, type TB, state PENDING"}
2024-08-21T10:36:50.483Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "b360e8a2-3c1f-4697-8bac-9e0142f1a326"}
2024-08-21T10:36:50.483Z	DEBUG	processor/processor.go:83	Operation Processor stopped
--- PASS: TestProcessor (0.00s)
=== RUN   TestOperationHandlerRegistry
--- PASS: TestOperationHandlerRegistry (0.00s)
🟡 ydbcp/internal/server0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/server/services/backup0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/internal/server/services/operation0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 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/plugins/auth0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/pkg/proto/ydbcp/v1alpha10000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/plugins/auth_nebius0000ms
🧪 Tests(none)
🖨️ Output
(none)
🟡 ydbcp/plugins/auth_nebius/proto/iam/v10000ms
🧪 Tests(none)
🖨️ Output
(none)

@qrort qrort merged commit bee8805 into main Aug 21, 2024
1 check passed
@bma13 bma13 deleted the grpc-status-codes branch August 21, 2024 11:37
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