From 2a635edd07813db19d5733e2ff07bdeff61dcf5e Mon Sep 17 00:00:00 2001 From: KirillKurdyukov Date: Wed, 11 Dec 2024 18:05:11 -0500 Subject: [PATCH 1/3] dev: fix linter --- slo/src/AdoNet/SloContext.cs | 2 +- slo/src/Internal/SloContext.cs | 24 ++++++++++++------------ slo/src/TableService/SloContext.cs | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/slo/src/AdoNet/SloContext.cs b/slo/src/AdoNet/SloContext.cs index 32cd965e..4c6ce047 100644 --- a/slo/src/AdoNet/SloContext.cs +++ b/slo/src/AdoNet/SloContext.cs @@ -105,4 +105,4 @@ protected override Task CreateClient(Config config) return Task.FromResult(new YdbDataSource(new YdbConnectionStringBuilder { UseTls = useTls, Host = host, Port = int.Parse(port), Database = config.Db, LoggerFactory = Factory })); } -} +} \ No newline at end of file diff --git a/slo/src/Internal/SloContext.cs b/slo/src/Internal/SloContext.cs index c9044840..82d19d2e 100644 --- a/slo/src/Internal/SloContext.cs +++ b/slo/src/Internal/SloContext.cs @@ -172,19 +172,19 @@ Task ShootingTask(RateLimiter rateLimitPolicy, string operationType, { Buckets = [ - 0.001, // 1 ms - 0.002, // 2 ms - 0.003, // 3 ms - 0.004, // 4 ms - 0.005, // 5 ms + 0.001, // 1 ms + 0.002, // 2 ms + 0.003, // 3 ms + 0.004, // 4 ms + 0.005, // 5 ms 0.0075, // 7.5 ms - 0.010, // 10 ms - 0.020, // 20 ms - 0.050, // 50 ms - 0.100, // 100 ms - 0.200, // 200 ms - 0.500, // 500 ms - 1.000 // 1 s + 0.010, // 10 ms + 0.020, // 20 ms + 0.050, // 50 ms + 0.100, // 100 ms + 0.200, // 200 ms + 0.500, // 500 ms + 1.000 // 1 s ] } ); diff --git a/slo/src/TableService/SloContext.cs b/slo/src/TableService/SloContext.cs index bcfc9d64..7f5c4643 100644 --- a/slo/src/TableService/SloContext.cs +++ b/slo/src/TableService/SloContext.cs @@ -81,4 +81,4 @@ protected override async Task CreateClient(Config config) { return new TableClient(await Driver.CreateInitialized(new DriverConfig(config.Endpoint, config.Db), Factory)); } -} +} \ No newline at end of file From 91405818d7bc6ed092e2c03b76239302c60a1aff Mon Sep 17 00:00:00 2001 From: KirillKurdyukov Date: Wed, 11 Dec 2024 18:27:16 -0500 Subject: [PATCH 2/3] fix: No newline at end of file --- slo/src/Internal/Cli.cs | 2 +- slo/src/Internal/SloContext.cs | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/slo/src/Internal/Cli.cs b/slo/src/Internal/Cli.cs index 41e45a92..21c5f3de 100644 --- a/slo/src/Internal/Cli.cs +++ b/slo/src/Internal/Cli.cs @@ -113,4 +113,4 @@ public static async Task Run(SloContext sloContext, string[] args) wh return await RootCommand.InvokeAsync(args); } -} +} \ No newline at end of file diff --git a/slo/src/Internal/SloContext.cs b/slo/src/Internal/SloContext.cs index 82d19d2e..b3554b14 100644 --- a/slo/src/Internal/SloContext.cs +++ b/slo/src/Internal/SloContext.cs @@ -131,7 +131,6 @@ public async Task Run(RunConfig runConfig) } await prometheus.StopAsync(); - // await MetricReset(promPgwEndpoint); Logger.LogInformation("Run task is finished"); return; @@ -248,13 +247,6 @@ Task ShootingTask(RateLimiter rateLimitPolicy, string operationType, } } - // private async Task MetricReset(string promPgwEndpoint) - // { - // var deleteUri = $"{promPgwEndpoint}/job/workload-{Job}"; - // using var httpClient = new HttpClient(); - // await httpClient.DeleteAsync(deleteUri); - // } - // return attempt count & StatusCode operation protected abstract Task<(int, StatusCode)> Upsert(T client, string upsertSql, Dictionary parameters, @@ -315,4 +307,4 @@ public static string StatusName(this StatusCode statusCode) var prefix = statusCode >= StatusCode.ClientTransportResourceExhausted ? "GRPC" : "YDB"; return $"{prefix}_{statusCode}"; } -} +} \ No newline at end of file From 8e3682610f4303ddb2a9d283b56b775929e83427 Mon Sep 17 00:00:00 2001 From: KirillKurdyukov Date: Wed, 11 Dec 2024 18:44:48 -0500 Subject: [PATCH 3/3] ignoreIssueType --- .github/workflows/lint.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cb4b4290..71f4f510 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -89,4 +89,7 @@ jobs: NotAccessedOutParameterVariable, NotAccessedPrimaryConstructorParameterCompiler, InconsistentNaming, - CollectionNeverUpdated.Global + CollectionNeverUpdated.Global, + CSharpErrors, + EmptyStatement, + ObjectCreationAsStatement