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

Linting errors have been fixed #37

Merged
merged 1 commit into from
Aug 19, 2024
Merged

Linting errors have been fixed #37

merged 1 commit into from
Aug 19, 2024

Conversation

bma13
Copy link
Collaborator

@bma13 bma13 commented Aug 19, 2024

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/queries40012ms
🧪 Tests
  • 🟢TestQueryBuilder_CreateCreate
  • 🟢TestQueryBuilder_Read
  • 🟢TestQueryBuilder_UpdateCreate
  • 🟢TestQueryBuilder_UpdateUpdate
🖨️ Output
=== RUN   TestQueryBuilder_Read
2024-08-19T08:46:44.128Z	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-19T08:46:44.129Z	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-19T08:46:44.129Z	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-19T08:46:44.129Z	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/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-19T08:46:44.890Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "3e1f3c1c-4644-44e8-bd2c-ad1d683efd44", "type": "RB", "state": "PENDING", "message": ""}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "3e1f3c1c-4644-44e8-bd2c-ad1d683efd44", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForPendingOperation
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "e621916d-f8bc-4504-8b07-c61289ad18a5", "type": "RB", "state": "PENDING", "message": ""}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "e621916d-f8bc-4504-8b07-c61289ad18a5", "type": "RB", "ydb_operation_id": "1"}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "e621916d-f8bc-4504-8b07-c61289ad18a5", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationInProgress
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "a1d27aed-0530-410a-b562-41267298f986", "type": "RB", "state": "PENDING", "message": ""}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "a1d27aed-0530-410a-b562-41267298f986", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "2968cf08-737e-403f-8f58-9d9e9b7cb143", "type": "RB", "state": "PENDING", "message": ""}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "2968cf08-737e-403f-8f58-9d9e9b7cb143", "type": "RB", "ydb_operation_id": "1"}
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "2968cf08-737e-403f-8f58-9d9e9b7cb143", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerPendingOperationCancelled
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "e1d90748-aeda-4ab6-85e6-54b9904d0325", "type": "RB", "state": "PENDING", "message": ""}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "e1d90748-aeda-4ab6-85e6-54b9904d0325", "type": "RB", "ydb_operation_id": "1"}
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "e1d90748-aeda-4ab6-85e6-54b9904d0325", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "3b9d5c60-17c8-4d35-a056-164426f24325", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "3b9d5c60-17c8-4d35-a056-164426f24325", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationInProgress
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "bd89c458-ad1a-4090-a168-98e7c5cafe8e", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "bd89c458-ad1a-4090-a168-98e7c5cafe8e", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "dafb78a9-6b02-489a-a967-aa77075e869c", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "dafb78a9-6b02-489a-a967-aa77075e869c", "type": "RB", "ydb_operation_id": "1"}
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "dafb78a9-6b02-489a-a967-aa77075e869c", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestRBOperationHandlerCancellingOperationCancelled
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "7ecd8b4b-04ea-493d-b15f-c84519cf5564", "type": "RB", "state": "CANCELLING", "message": ""}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "7ecd8b4b-04ea-493d-b15f-c84519cf5564", "type": "RB", "ydb_operation_id": "1"}
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:120	forgetting operation	{"id": "7ecd8b4b-04ea-493d-b15f-c84519cf5564", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestRBOperationHandlerRetriableErrorForPendingOperation
2024-08-19T08:46:44.891Z	INFO	handlers/restore_backup.go:31	received operation	{"id": "645d9a82-1851-4abd-88e6-496b845f5600", "type": "RB", "state": "PENDING", "message": ""}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "645d9a82-1851-4abd-88e6-496b845f5600", "type": "RB", "ydb_operation_id": "1"}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:69	received retriable error	{"id": "645d9a82-1851-4abd-88e6-496b845f5600", "type": "RB", "ydb_operation_id": "1"}
--- PASS: TestRBOperationHandlerRetriableErrorForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerInvalidOperationResponse
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "161f2705-4d08-479d-9e18-4c947c67a098", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerInvalidOperationResponse (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForPendingOperation
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "65e00245-3284-4100-83ab-f4086e7807f5", "type": "TB", "ydb_operation_id": "1"}
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:99	cancelling operation	{"reason": "TTL", "id": "65e00245-3284-4100-83ab-f4086e7807f5", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForPendingOperation (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationInProgress
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "cb4fe130-5775-4ecf-abd1-b33ffe6c748e", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCompletedSuccessfully
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "55ae3f79-05c3-430f-8b3b-16e6b1451f24", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerPendingOperationCancelled
2024-08-19T08:46:44.891Z	INFO	handlers/utils.go:46	getting operation status	{"id": "f2628d6a-1dc3-4070-b2c0-d2d93e2fd366", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerPendingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerDeadlineExceededForCancellingOperation
2024-08-19T08:46:44.892Z	INFO	handlers/utils.go:46	getting operation status	{"id": "d55e25ea-93eb-437b-9cb7-fc41e3679518", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerDeadlineExceededForCancellingOperation (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationInProgress
2024-08-19T08:46:44.892Z	INFO	handlers/utils.go:46	getting operation status	{"id": "8dc218bb-6f26-4f39-8203-50b2152494ec", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationInProgress (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCompletedSuccessfully
2024-08-19T08:46:44.892Z	INFO	handlers/utils.go:46	getting operation status	{"id": "0fb2db49-3e56-4438-8751-c8c86d5027db", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCompletedSuccessfully (0.00s)
=== RUN   TestTBOperationHandlerCancellingOperationCancelled
2024-08-19T08:46:44.892Z	INFO	handlers/utils.go:46	getting operation status	{"id": "08d264f0-a215-4221-bbd3-c81dd32c0929", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerCancellingOperationCancelled (0.00s)
=== RUN   TestTBOperationHandlerRetriableErrorForPendingOperation
2024-08-19T08:46:44.892Z	INFO	handlers/utils.go:46	getting operation status	{"id": "acb41e06-4c75-4934-8412-db47d08be944", "type": "TB", "ydb_operation_id": "1"}
2024-08-19T08:46:44.892Z	INFO	handlers/utils.go:69	received retriable error	{"id": "acb41e06-4c75-4934-8412-db47d08be944", "type": "TB", "ydb_operation_id": "1"}
--- PASS: TestTBOperationHandlerRetriableErrorForPendingOperation (0.00s)
🟢 ydbcp/internal/processor20010ms
🧪 Tests
  • 🟢TestOperationHandlerRegistry
  • 🟢TestProcessor
🖨️ Output
=== RUN   TestProcessor
2024-08-19T08:46:44.886Z	DEBUG	processor/processor.go:76	Operation Processor started	{"period": "10s"}
2024-08-19T08:46:44.886Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 37c43e16-14c1-45d7-a4e7-4f0aeea7d789, type TB, state PENDING"}
2024-08-19T08:46:44.886Z	DEBUG	processor/processor.go:108	operation already running	{"operation": "Operation, id 37c43e16-14c1-45d7-a4e7-4f0aeea7d789, type TB, state PENDING"}
2024-08-19T08:46:44.886Z	DEBUG	processor/processor.go:120	start operation handler	{"operation": "Operation, id 37c43e16-14c1-45d7-a4e7-4f0aeea7d789, type TB, state PENDING"}
2024-08-19T08:46:44.886Z	DEBUG	processor/processor_test.go:41	TB handler called for operation	{"operation": "Operation, id 37c43e16-14c1-45d7-a4e7-4f0aeea7d789, type TB, state PENDING"}
2024-08-19T08:46:44.886Z	DEBUG	processor/processor.go:137	operation handler is finished	{"operationID": "37c43e16-14c1-45d7-a4e7-4f0aeea7d789"}
2024-08-19T08:46:44.886Z	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/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)

@bma13 bma13 merged commit e888635 into main Aug 19, 2024
1 check passed
@bma13 bma13 deleted the fix-lint branch August 19, 2024 12:11
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