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

Add cql batch inserts #110

Merged
merged 17 commits into from
Aug 30, 2024
Merged

Add cql batch inserts #110

merged 17 commits into from
Aug 30, 2024

Conversation

adelinag08
Copy link
Contributor

No description provided.

Copy link

Total Coverage: 44.76%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
src/SnD.Sdk/Helpers
   StringExtensions.cs75%100%93.33%46, 50
src/SnD.Sdk/Kubernetes
   KubeFleet.cs100%100%100%
   KubeFleetBuilder.cs0%0%0%24, 25, 26, 27, 28, 29, 37, 38, 39, 43, 44, 44, 44, 45, 46, 47, 49, 50, 54, 55, 55, 55, 56, 57, 58, 60, 61, 65, 66, 67
   KubernetesApiExtensions.cs34.91%45.95%55.75%103, 105, 106, 154, 155, 156, 157, 192, 193, 193, 193, 194, 195, 197, 198, 207, 208, 208, 208, 209, 210, 212, 213, 301, 302, 303, 309, 326, 327, 327, 327, 328, 329, 332, 333, 334, 336, 338, 340, 341, 350, 351, 353, 354, 363, 364, 366, 367, 379, 380, 381, 382, 383, 384, 386, 386, 386, 387, 389, 390, 399, 400, 400, 400, 401, 401, 401, 403, 403, 403, 404, 405, 406, 406, 406, 407, 408, 409, 410, 411, 412, 413, 415, 416, 417, 418, 419, 420, 421, 423, 424, 426, 426, 426, 427, 428, 429, 430, 431, 433, 434, 435, 436, 437, 438, 439, 441, 442, 451, 452, 452, 452, 454, 454, 454, 455, 456, 457, 457, 457, 458, 459, 460, 461, 462, 463, 464, 466, 467, 468, 469, 470, 471, 472, 474, 475, 486, 487, 487, 487, 488, 489, 490, 491, 501, 502, 503, 513, 514, 515, 516, 517, 518, 608, 617, 617, 617, 617, 617, 625, 625, 625, 625, 625, 633, 633, 633, 642, 642, 642, 642, 642, 642, 642, 650, 650, 650, 653, 653, 653, 653, 653, 654, 655, 658, 658, 658, 658, 658, 659, 660, 688, 691, 721, 722, 722, 722, 722, 722, 722, 722, 723, 724, 724, 724, 724, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 736, 737
   KubernetesCluster.cs28.95%37.50%33.20%100, 101, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 124, 125, 126, 127, 128, 129, 130, 131, 132, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 151, 152, 156, 157, 158, 159, 160, 161, 162, 163, 164, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 182, 183, 194, 195, 196, 197, 198, 199, 200, 201, 202, 202, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 222, 223, 224, 225, 226, 227, 228, 229, 229, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 249, 250, 251, 252, 253, 254, 255, 257, 258, 259, 260, 260, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 274, 275, 276, 277, 278, 279, 280, 280, 280, 281, 282, 283, 283, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 329, 330, 331, 332, 333, 334, 335, 336, 342, 343, 344, 345, 346, 347, 348, 349, 360, 361, 362, 363, 364, 365, 366, 367, 368, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 392, 393, 394, 395, 459, 463, 464, 465, 47, 48, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 50, 51, 52, 54, 55, 56, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 613, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 649, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 683, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 711, 712, 712, 712, 712, 712, 712, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 82, 83, 84, 875, 878, 881, 89, 90, 91, 96, 97, 98, 99
   NamespacedCrd.cs100%0%0%13, 18, 23
src/SnD.Sdk/Kubernetes/Azure
   AzureKubernetesCluster.cs0%0%0%19, 20, 21, 22, 23, 27, 28, 29, 32, 33, 33, 33, 34, 35, 36, 38, 38, 38, 39, 40, 41, 43, 43, 43, 43, 43, 44, 45, 46, 47, 48, 49, 52, 53, 54, 55
src/SnD.Sdk/Kubernetes/Config
   KubernetesClusterConfig.cs100%0%0%13, 18, 23, 28, 33
src/SnD.Sdk/Kubernetes/Exceptions
   InvalidStartupConfigurationException.cs100%0%0%14, 15, 17
   SharedFileSystemNotInitializedException.cs100%0%0%14, 15, 17
   StatefulSetNotReadyException.cs100%100%100%
src/SnD.Sdk/Kubernetes/Streaming/Sources
   KubernetesResourceEventSource.cs44.74%85.71%79.76%123, 124, 124, 124, 125, 125, 125, 126, 130, 131, 132, 132, 138, 139, 141, 147, 149, 157, 168, 169, 169, 169, 169, 169, 170, 171, 171, 171, 172, 172, 172, 173, 174, 175, 176, 70, 94, 99
src/SnD.Sdk/Metrics/Actors
   MetricsPublisherActor.cs100%100%100%
   MetricsPublisherActorProvider.cs100%100%100%
src/SnD.Sdk/Storage/Amazon
   AmazonBlobStorageService.cs0%0%0%188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 36, 37, 38, 39, 40, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90
src/SnD.Sdk/Storage/Azure
   AzureBlobStorageService.cs50%68.75%60%101, 102, 103, 104, 105, 107, 111, 112, 113, 114, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 139, 141, 142, 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 156, 178, 178, 178, 201, 202, 203, 216, 221, 280, 281, 282, 283, 284, 290, 291, 293, 294, 295, 296, 297, 298, 299, 83, 84, 86, 87, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99
   AzureQueueService.cs100%100%100%
   AzureSharedFSService.cs50%100%82.22%43, 43, 65, 66, 67, 68, 83, 84, 85, 86
   AzureTableService.cs93.75%100%100%85
src/SnD.Sdk/Storage/Cql
   CqlApiExtensions.cs62.50%100%68.18%45, 49, 63, 65, 65, 65, 66, 67, 68, 69, 73, 74, 76, 77, 78, 79, 80
src/SnD.Sdk/Storage/Models
   MergeEntityResult.cs100%100%100%
   QueueElement.cs100%100%100%
   QueueReleaseResponse.cs100%100%100%
   QueueSendResponse.cs100%100%100%
   ShareFile.cs100%83.33%83.33%29
   StoredBlob.cs100%100%100%
   UploadedBlob.cs100%100%100%
src/SnD.Sdk/Storage/Models/BlobPath
   AdlsGen2Path.cs75%100%90.32%73, 74, 75, 76
   AmazonS3BlobPath.cs75%85.71%80%28, 61, 62, 63, 64, 65
src/SnD.Sdk/Storage/Providers
   RedisServiceProvider.cs100%0%0%22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 34, 36, 37
src/SnD.Sdk/Storage/Providers/Configurations
   AmazonStorageConfiguration.cs100%0%0%14, 19, 24, 29, 34, 39, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55
   RedisConfiguration.cs100%0%0%13, 18, 23, 28, 33
src/SnD.Sdk/Storage/Streaming/MessageProtocolExtensions
   AvroExtensions.cs100%0%0%22, 23, 25, 26, 27, 28, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 50, 51
src/SnD.Sdk/Storage/Streaming/Models
   PulsarEvent.cs0%0%0%16, 17, 18, 29, 30, 30, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 51, 56, 61, 66
   PulsarWebsocketMessage.cs100%0%0%17, 23, 29, 35, 41, 47
src/SnD.Sdk/Storage/Streaming/Sources
   PulsarSource.cs0%0%0%100, 101, 102, 103, 104, 107, 110, 113, 115, 127, 128, 129, 130, 131, 132, 133, 135, 135, 135, 136, 137, 138, 138, 138, 139, 140, 141, 142, 143, 145, 146, 149, 150, 151, 152, 154, 154, 154, 154, 154, 155, 156, 157, 158, 161, 162, 164, 166, 168, 168, 168, 169, 170, 171, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 186, 187, 187, 187, 187, 187, 188, 189, 189, 189, 189, 189, 193, 194, 198, 199, 202, 206, 206, 206, 207, 208, 209, 211, 212, 213, 214, 217, 218, 218, 218, 219, 220, 223, 224, 226, 226, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 250, 261, 262, 263, 265, 266, 268, 268, 268, 268, 268, 268, 268, 269, 270, 271, 272, 273, 274, 275, 276, 276, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 68, 68, 70, 71, 99
   WebSocketSource.cs0%0%0%100, 101, 101, 101, 102, 103, 104, 104, 104, 105, 106, 107, 108, 109, 111, 112, 115, 116, 118, 118, 118, 118, 118, 119, 120, 121, 122, 125, 126, 128, 129, 130, 132, 133, 134, 137, 138, 138, 138, 138, 138, 139, 140, 140, 140, 143, 144, 146, 147, 150, 154, 154, 154, 155, 156, 157, 159, 160, 161, 162, 163, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 185, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 66, 67, 68, 69, 70, 71, 72, 73, 76, 79, 82, 84, 96, 97, 98, 99
src/SnD.Sdk/Tasks
   TaskExtensions.cs66.67%90%73.33%70, 72, 73, 74, 76, 77, 78, 78, 78, 80

Copy link

Total Coverage: 45.06%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
src/SnD.Sdk/Helpers
   StringExtensions.cs75%100%93.33%46, 50
src/SnD.Sdk/Kubernetes
   KubeFleet.cs100%100%100%
   KubeFleetBuilder.cs0%0%0%24, 25, 26, 27, 28, 29, 37, 38, 39, 43, 44, 44, 44, 45, 46, 47, 49, 50, 54, 55, 55, 55, 56, 57, 58, 60, 61, 65, 66, 67
   KubernetesApiExtensions.cs34.91%45.95%55.75%103, 105, 106, 154, 155, 156, 157, 192, 193, 193, 193, 194, 195, 197, 198, 207, 208, 208, 208, 209, 210, 212, 213, 301, 302, 303, 309, 326, 327, 327, 327, 328, 329, 332, 333, 334, 336, 338, 340, 341, 350, 351, 353, 354, 363, 364, 366, 367, 379, 380, 381, 382, 383, 384, 386, 386, 386, 387, 389, 390, 399, 400, 400, 400, 401, 401, 401, 403, 403, 403, 404, 405, 406, 406, 406, 407, 408, 409, 410, 411, 412, 413, 415, 416, 417, 418, 419, 420, 421, 423, 424, 426, 426, 426, 427, 428, 429, 430, 431, 433, 434, 435, 436, 437, 438, 439, 441, 442, 451, 452, 452, 452, 454, 454, 454, 455, 456, 457, 457, 457, 458, 459, 460, 461, 462, 463, 464, 466, 467, 468, 469, 470, 471, 472, 474, 475, 486, 487, 487, 487, 488, 489, 490, 491, 501, 502, 503, 513, 514, 515, 516, 517, 518, 608, 617, 617, 617, 617, 617, 625, 625, 625, 625, 625, 633, 633, 633, 642, 642, 642, 642, 642, 642, 642, 650, 650, 650, 653, 653, 653, 653, 653, 654, 655, 658, 658, 658, 658, 658, 659, 660, 688, 691, 721, 722, 722, 722, 722, 722, 722, 722, 723, 724, 724, 724, 724, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 736, 737
   KubernetesCluster.cs28.95%37.50%33.20%100, 101, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 124, 125, 126, 127, 128, 129, 130, 131, 132, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 151, 152, 156, 157, 158, 159, 160, 161, 162, 163, 164, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 182, 183, 194, 195, 196, 197, 198, 199, 200, 201, 202, 202, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 222, 223, 224, 225, 226, 227, 228, 229, 229, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 249, 250, 251, 252, 253, 254, 255, 257, 258, 259, 260, 260, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 274, 275, 276, 277, 278, 279, 280, 280, 280, 281, 282, 283, 283, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 329, 330, 331, 332, 333, 334, 335, 336, 342, 343, 344, 345, 346, 347, 348, 349, 360, 361, 362, 363, 364, 365, 366, 367, 368, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 392, 393, 394, 395, 459, 463, 464, 465, 47, 48, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 50, 51, 52, 54, 55, 56, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 613, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 649, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 683, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 711, 712, 712, 712, 712, 712, 712, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 82, 83, 84, 875, 878, 881, 89, 90, 91, 96, 97, 98, 99
   NamespacedCrd.cs100%0%0%13, 18, 23
src/SnD.Sdk/Kubernetes/Azure
   AzureKubernetesCluster.cs0%0%0%19, 20, 21, 22, 23, 27, 28, 29, 32, 33, 33, 33, 34, 35, 36, 38, 38, 38, 39, 40, 41, 43, 43, 43, 43, 43, 44, 45, 46, 47, 48, 49, 52, 53, 54, 55
src/SnD.Sdk/Kubernetes/Config
   KubernetesClusterConfig.cs100%0%0%13, 18, 23, 28, 33
src/SnD.Sdk/Kubernetes/Exceptions
   InvalidStartupConfigurationException.cs100%0%0%14, 15, 17
   SharedFileSystemNotInitializedException.cs100%0%0%14, 15, 17
   StatefulSetNotReadyException.cs100%100%100%
src/SnD.Sdk/Kubernetes/Streaming/Sources
   KubernetesResourceEventSource.cs44.74%85.71%79.76%123, 124, 124, 124, 125, 125, 125, 126, 130, 131, 132, 132, 138, 139, 141, 147, 149, 157, 168, 169, 169, 169, 169, 169, 170, 171, 171, 171, 172, 172, 172, 173, 174, 175, 176, 70, 94, 99
src/SnD.Sdk/Metrics/Actors
   MetricsPublisherActor.cs100%100%100%
   MetricsPublisherActorProvider.cs100%100%100%
src/SnD.Sdk/Storage/Amazon
   AmazonBlobStorageService.cs0%0%0%188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 36, 37, 38, 39, 40, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90
src/SnD.Sdk/Storage/Azure
   AzureBlobStorageService.cs50%68.75%60%101, 102, 103, 104, 105, 107, 111, 112, 113, 114, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 139, 141, 142, 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 156, 178, 178, 178, 201, 202, 203, 216, 221, 280, 281, 282, 283, 284, 290, 291, 293, 294, 295, 296, 297, 298, 299, 83, 84, 86, 87, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99
   AzureQueueService.cs100%100%100%
   AzureSharedFSService.cs50%100%82.22%43, 43, 65, 66, 67, 68, 83, 84, 85, 86
   AzureTableService.cs93.75%100%100%85
src/SnD.Sdk/Storage/Cql
   CqlApiExtensions.cs62.50%100%68.18%45, 49, 63, 65, 65, 65, 66, 67, 68, 69, 73, 74, 76, 77, 78, 79, 80
src/SnD.Sdk/Storage/Models
   MergeEntityResult.cs100%100%100%
   QueueElement.cs100%100%100%
   QueueReleaseResponse.cs100%100%100%
   QueueSendResponse.cs100%100%100%
   ShareFile.cs100%83.33%83.33%29
   StoredBlob.cs100%100%100%
   UploadedBlob.cs100%100%100%
src/SnD.Sdk/Storage/Models/BlobPath
   AdlsGen2Path.cs75%100%90.32%73, 74, 75, 76
   AmazonS3BlobPath.cs75%85.71%80%28, 61, 62, 63, 64, 65
src/SnD.Sdk/Storage/Providers/Configurations
   AmazonStorageConfiguration.cs100%0%0%14, 19, 24, 29, 34, 39, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55
   RedisConfiguration.cs100%0%0%13, 18, 23, 28, 33
src/SnD.Sdk/Storage/Streaming/MessageProtocolExtensions
   AvroExtensions.cs100%0%0%22, 23, 25, 26, 27, 28, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 50, 51
src/SnD.Sdk/Storage/Streaming/Models
   PulsarEvent.cs0%0%0%16, 17, 18, 29, 30, 30, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 51, 56, 61, 66
   PulsarWebsocketMessage.cs100%0%0%17, 23, 29, 35, 41, 47
src/SnD.Sdk/Storage/Streaming/Sources
   PulsarSource.cs0%0%0%100, 101, 102, 103, 104, 107, 110, 113, 115, 127, 128, 129, 130, 131, 132, 133, 135, 135, 135, 136, 137, 138, 138, 138, 139, 140, 141, 142, 143, 145, 146, 149, 150, 151, 152, 154, 154, 154, 154, 154, 155, 156, 157, 158, 161, 162, 164, 166, 168, 168, 168, 169, 170, 171, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 186, 187, 187, 187, 187, 187, 188, 189, 189, 189, 189, 189, 193, 194, 198, 199, 202, 206, 206, 206, 207, 208, 209, 211, 212, 213, 214, 217, 218, 218, 218, 219, 220, 223, 224, 226, 226, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 250, 261, 262, 263, 265, 266, 268, 268, 268, 268, 268, 268, 268, 269, 270, 271, 272, 273, 274, 275, 276, 276, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 68, 68, 70, 71, 99
   WebSocketSource.cs0%0%0%100, 101, 101, 101, 102, 103, 104, 104, 104, 105, 106, 107, 108, 109, 111, 112, 115, 116, 118, 118, 118, 118, 118, 119, 120, 121, 122, 125, 126, 128, 129, 130, 132, 133, 134, 137, 138, 138, 138, 138, 138, 139, 140, 140, 140, 143, 144, 146, 147, 150, 154, 154, 154, 155, 156, 157, 159, 160, 161, 162, 163, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 185, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 66, 67, 68, 69, 70, 71, 72, 73, 76, 79, 82, 84, 96, 97, 98, 99
src/SnD.Sdk/Tasks
   TaskExtensions.cs66.67%90%73.33%70, 72, 73, 74, 76, 77, 78, 78, 78, 80

@adelinag08 adelinag08 marked this pull request as ready for review August 29, 2024 11:09
@adelinag08 adelinag08 requested a review from a team as a code owner August 29, 2024 11:09
Copy link
Contributor

@s-vitaliy s-vitaliy left a comment

Choose a reason for hiding this comment

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

Added some comments.
Overall, I think it's not a good idea to provide rate limit as string since it can be difficult to parse correctly and it can be error-prone for the developer in code writing process. I would suggest constructing AsyncRateLimitPolicy directly. We can always make a conversion from string policy to AsyncRateLimitPolicy later.

src/SnD.Sdk/Storage/Base/ICqlEntityService.cs Outdated Show resolved Hide resolved
src/SnD.Sdk/Storage/Cql/CqlApiExtensions.cs Outdated Show resolved Hide resolved
src/SnD.Sdk/Storage/Cql/CqlApiExtensions.cs Outdated Show resolved Hide resolved
ExecuteBatch(batch, i, rateLimit, cancellationToken);
}

return Task.FromResult(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

how about error handling? :)

}

[Theory]
[InlineData("1000 per second", true)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest to make a dedicated test for rate limit parsing (with negative cases).

@s-vitaliy
Copy link
Contributor

Also, defining a policy that way is not idiomatic and can cause interoperability issues with other dotnet libraries. Like, if I got a TimeSpan from somewhere else, how can I pass it to this method?

Copy link

Total Coverage: 44.74%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
src/SnD.Sdk/Helpers
   StringExtensions.cs75%100%93.33%46, 50
src/SnD.Sdk/Kubernetes
   KubeFleet.cs100%100%100%
   KubeFleetBuilder.cs0%0%0%24, 25, 26, 27, 28, 29, 37, 38, 39, 43, 44, 44, 44, 45, 46, 47, 49, 50, 54, 55, 55, 55, 56, 57, 58, 60, 61, 65, 66, 67
   KubernetesApiExtensions.cs34.91%45.95%55.75%103, 105, 106, 154, 155, 156, 157, 192, 193, 193, 193, 194, 195, 197, 198, 207, 208, 208, 208, 209, 210, 212, 213, 301, 302, 303, 309, 326, 327, 327, 327, 328, 329, 332, 333, 334, 336, 338, 340, 341, 350, 351, 353, 354, 363, 364, 366, 367, 379, 380, 381, 382, 383, 384, 386, 386, 386, 387, 389, 390, 399, 400, 400, 400, 401, 401, 401, 403, 403, 403, 404, 405, 406, 406, 406, 407, 408, 409, 410, 411, 412, 413, 415, 416, 417, 418, 419, 420, 421, 423, 424, 426, 426, 426, 427, 428, 429, 430, 431, 433, 434, 435, 436, 437, 438, 439, 441, 442, 451, 452, 452, 452, 454, 454, 454, 455, 456, 457, 457, 457, 458, 459, 460, 461, 462, 463, 464, 466, 467, 468, 469, 470, 471, 472, 474, 475, 486, 487, 487, 487, 488, 489, 490, 491, 501, 502, 503, 513, 514, 515, 516, 517, 518, 608, 617, 617, 617, 617, 617, 625, 625, 625, 625, 625, 633, 633, 633, 642, 642, 642, 642, 642, 642, 642, 650, 650, 650, 653, 653, 653, 653, 653, 654, 655, 658, 658, 658, 658, 658, 659, 660, 688, 691, 721, 722, 722, 722, 722, 722, 722, 722, 723, 724, 724, 724, 724, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 736, 737
   KubernetesCluster.cs28.95%37.50%33.20%100, 101, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 124, 125, 126, 127, 128, 129, 130, 131, 132, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 151, 152, 156, 157, 158, 159, 160, 161, 162, 163, 164, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 182, 183, 194, 195, 196, 197, 198, 199, 200, 201, 202, 202, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 222, 223, 224, 225, 226, 227, 228, 229, 229, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 249, 250, 251, 252, 253, 254, 255, 257, 258, 259, 260, 260, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 274, 275, 276, 277, 278, 279, 280, 280, 280, 281, 282, 283, 283, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 329, 330, 331, 332, 333, 334, 335, 336, 342, 343, 344, 345, 346, 347, 348, 349, 360, 361, 362, 363, 364, 365, 366, 367, 368, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 392, 393, 394, 395, 459, 463, 464, 465, 47, 48, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 50, 51, 52, 54, 55, 56, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 613, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 649, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 683, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 711, 712, 712, 712, 712, 712, 712, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 82, 83, 84, 875, 878, 881, 89, 90, 91, 96, 97, 98, 99
   NamespacedCrd.cs100%0%0%13, 18, 23
src/SnD.Sdk/Kubernetes/Azure
   AzureKubernetesCluster.cs0%0%0%19, 20, 21, 22, 23, 27, 28, 29, 32, 33, 33, 33, 34, 35, 36, 38, 38, 38, 39, 40, 41, 43, 43, 43, 43, 43, 44, 45, 46, 47, 48, 49, 52, 53, 54, 55
src/SnD.Sdk/Kubernetes/Config
   KubernetesClusterConfig.cs100%0%0%13, 18, 23, 28, 33
src/SnD.Sdk/Kubernetes/Exceptions
   InvalidStartupConfigurationException.cs100%0%0%14, 15, 17
   SharedFileSystemNotInitializedException.cs100%0%0%14, 15, 17
   StatefulSetNotReadyException.cs100%100%100%
src/SnD.Sdk/Kubernetes/Streaming/Sources
   KubernetesResourceEventSource.cs44.74%85.71%79.76%123, 124, 124, 124, 125, 125, 125, 126, 130, 131, 132, 132, 138, 139, 141, 147, 149, 157, 168, 169, 169, 169, 169, 169, 170, 171, 171, 171, 172, 172, 172, 173, 174, 175, 176, 70, 94, 99
src/SnD.Sdk/Metrics/Actors
   MetricsPublisherActor.cs100%100%100%
   MetricsPublisherActorProvider.cs100%100%100%
src/SnD.Sdk/Storage/Amazon
   AmazonBlobStorageService.cs0%0%0%188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 36, 37, 38, 39, 40, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90
src/SnD.Sdk/Storage/Azure
   AzureBlobStorageService.cs50%68.75%60%101, 102, 103, 104, 105, 107, 111, 112, 113, 114, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 139, 141, 142, 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 156, 178, 178, 178, 201, 202, 203, 216, 221, 280, 281, 282, 283, 284, 290, 291, 293, 294, 295, 296, 297, 298, 299, 83, 84, 86, 87, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99
   AzureQueueService.cs100%100%100%
   AzureSharedFSService.cs50%100%82.22%43, 43, 65, 66, 67, 68, 83, 84, 85, 86
   AzureTableService.cs93.75%100%100%85
src/SnD.Sdk/Storage/Cql
   CqlApiExtensions.cs0%100%58.06%48, 50, 50, 50, 51, 52, 53, 54, 58, 59, 61, 62, 63, 64, 65
src/SnD.Sdk/Storage/Models
   MergeEntityResult.cs100%100%100%
   QueueElement.cs100%100%100%
   QueueReleaseResponse.cs100%100%100%
   QueueSendResponse.cs100%100%100%
   ShareFile.cs100%83.33%83.33%29
   StoredBlob.cs100%100%100%
   UploadedBlob.cs100%100%100%
src/SnD.Sdk/Storage/Models/BlobPath
   AdlsGen2Path.cs75%100%90.32%73, 74, 75, 76
   AmazonS3BlobPath.cs75%85.71%80%28, 61, 62, 63, 64, 65
src/SnD.Sdk/Storage/Providers/Configurations
   AmazonStorageConfiguration.cs100%0%0%14, 19, 24, 29, 34, 39, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55
   RedisConfiguration.cs100%0%0%13, 18, 23, 28, 33
src/SnD.Sdk/Storage/Streaming/MessageProtocolExtensions
   AvroExtensions.cs100%0%0%22, 23, 25, 26, 27, 28, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 50, 51
src/SnD.Sdk/Storage/Streaming/Models
   PulsarEvent.cs0%0%0%16, 17, 18, 29, 30, 30, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 51, 56, 61, 66
   PulsarWebsocketMessage.cs100%0%0%17, 23, 29, 35, 41, 47
src/SnD.Sdk/Storage/Streaming/Sources
   PulsarSource.cs0%0%0%100, 101, 102, 103, 104, 107, 110, 113, 115, 127, 128, 129, 130, 131, 132, 133, 135, 135, 135, 136, 137, 138, 138, 138, 139, 140, 141, 142, 143, 145, 146, 149, 150, 151, 152, 154, 154, 154, 154, 154, 155, 156, 157, 158, 161, 162, 164, 166, 168, 168, 168, 169, 170, 171, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 186, 187, 187, 187, 187, 187, 188, 189, 189, 189, 189, 189, 193, 194, 198, 199, 202, 206, 206, 206, 207, 208, 209, 211, 212, 213, 214, 217, 218, 218, 218, 219, 220, 223, 224, 226, 226, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 250, 261, 262, 263, 265, 266, 268, 268, 268, 268, 268, 268, 268, 269, 270, 271, 272, 273, 274, 275, 276, 276, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 68, 68, 70, 71, 99
   WebSocketSource.cs0%0%0%100, 101, 101, 101, 102, 103, 104, 104, 104, 105, 106, 107, 108, 109, 111, 112, 115, 116, 118, 118, 118, 118, 118, 119, 120, 121, 122, 125, 126, 128, 129, 130, 132, 133, 134, 137, 138, 138, 138, 138, 138, 139, 140, 140, 140, 143, 144, 146, 147, 150, 154, 154, 154, 155, 156, 157, 159, 160, 161, 162, 163, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 185, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 66, 67, 68, 69, 70, 71, 72, 73, 76, 79, 82, 84, 96, 97, 98, 99
src/SnD.Sdk/Tasks
   TaskExtensions.cs66.67%90%73.33%70, 72, 73, 74, 76, 77, 78, 78, 78, 80

Copy link
Contributor

@s-vitaliy s-vitaliy left a comment

Choose a reason for hiding this comment

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

Much better now :)

@adelinag08 adelinag08 merged commit 537fc1c into main Aug 30, 2024
1 check passed
@adelinag08 adelinag08 deleted the upsert-batch-cql branch August 30, 2024 11:57
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