diff --git a/Directory.Packages.props b/Directory.Packages.props index f52f1e0e..80bd0db1 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,6 +5,7 @@ + @@ -13,7 +14,7 @@ - + diff --git a/Speckle.Sdk.sln b/Speckle.Sdk.sln index 48e0047c..90b5b90f 100644 --- a/Speckle.Sdk.sln +++ b/Speckle.Sdk.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Sdk", "src\Speckle.Sdk\Speckle.Sdk.csproj", "{A413E196-3696-4F48-B635-04B5F76BF9C9}" EndProject @@ -44,6 +44,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Sdk.Tests.Performan EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Sdk.Serialization.Testing", "tests\Speckle.Sdk.Serialization.Testing\Speckle.Sdk.Serialization.Testing.csproj", "{FF922B6D-D416-4348-8CB8-0C8B28691070}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Sdk.Dependencies", "src\Speckle.Sdk.Dependencies\Speckle.Sdk.Dependencies.csproj", "{27584AB4-8ACD-4850-8CC2-7E5BC739FB78}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -90,6 +92,10 @@ Global {FF922B6D-D416-4348-8CB8-0C8B28691070}.Debug|Any CPU.Build.0 = Debug|Any CPU {FF922B6D-D416-4348-8CB8-0C8B28691070}.Release|Any CPU.ActiveCfg = Release|Any CPU {FF922B6D-D416-4348-8CB8-0C8B28691070}.Release|Any CPU.Build.0 = Release|Any CPU + {27584AB4-8ACD-4850-8CC2-7E5BC739FB78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {27584AB4-8ACD-4850-8CC2-7E5BC739FB78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {27584AB4-8ACD-4850-8CC2-7E5BC739FB78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {27584AB4-8ACD-4850-8CC2-7E5BC739FB78}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {A413E196-3696-4F48-B635-04B5F76BF9C9} = {5CB96C27-FC5B-4A41-86B6-951AF99B8116} @@ -102,5 +108,6 @@ Global {B623BD21-5CAA-43F9-A539-1835276C220E} = {DA2AED52-58F9-471E-8AD8-102FD36129E3} {870E3396-E6F7-43AE-B120-E651FA4F46BD} = {35047EE7-AD1D-4741-80A7-8F0E874718E9} {FF922B6D-D416-4348-8CB8-0C8B28691070} = {35047EE7-AD1D-4741-80A7-8F0E874718E9} + {27584AB4-8ACD-4850-8CC2-7E5BC739FB78} = {5CB96C27-FC5B-4A41-86B6-951AF99B8116} EndGlobalSection EndGlobal diff --git a/src/Speckle.Objects/packages.lock.json b/src/Speckle.Objects/packages.lock.json index e5c32636..a8bfa0e1 100644 --- a/src/Speckle.Objects/packages.lock.json +++ b/src/Speckle.Objects/packages.lock.json @@ -234,19 +234,19 @@ "type": "Project", "dependencies": { "GraphQL.Client": "[6.0.0, )", - "Microsoft.Bcl.AsyncInterfaces": "[8.0.0, )", + "Microsoft.Bcl.AsyncInterfaces": "[5.0.0, )", "Microsoft.CSharp": "[4.7.0, )", "Microsoft.Data.Sqlite": "[7.0.7, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[2.2.0, )", "Microsoft.Extensions.Logging": "[2.2.0, )", - "Microsoft.Extensions.ObjectPool": "[8.0.10, )", - "Polly": "[7.2.3, )", - "Polly.Contrib.WaitAndRetry": "[1.1.1, )", - "Polly.Extensions.Http": "[3.0.0, )", "Speckle.DoubleNumerics": "[4.0.1, )", - "Speckle.Newtonsoft.Json": "[13.0.2, )" + "Speckle.Newtonsoft.Json": "[13.0.2, )", + "Speckle.Sdk.Dependencies": "[1.0.0, )" } }, + "speckle.sdk.dependencies": { + "type": "Project" + }, "GraphQL.Client": { "type": "CentralTransitive", "requested": "[6.0.0, )", @@ -260,9 +260,9 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "CentralTransitive", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -301,33 +301,6 @@ "Microsoft.Extensions.Options": "2.2.0" } }, - "Microsoft.Extensions.ObjectPool": { - "type": "CentralTransitive", - "requested": "[8.0.10, )", - "resolved": "8.0.10", - "contentHash": "u7gAG7JgxF8VSJUGPSudAcPxOt+ymJKQCSxNRxiuKV+klCQbHljQR75SilpedCTfhPWDhtUwIJpnDVtspr9nMg==" - }, - "Polly": { - "type": "CentralTransitive", - "requested": "[7.2.3, )", - "resolved": "7.2.3", - "contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ==" - }, - "Polly.Contrib.WaitAndRetry": { - "type": "CentralTransitive", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA==" - }, - "Polly.Extensions.Http": { - "type": "CentralTransitive", - "requested": "[3.0.0, )", - "resolved": "3.0.0", - "contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==", - "dependencies": { - "Polly": "7.1.0" - } - }, "Speckle.DoubleNumerics": { "type": "CentralTransitive", "requested": "[4.0.1, )", @@ -511,19 +484,19 @@ "type": "Project", "dependencies": { "GraphQL.Client": "[6.0.0, )", - "Microsoft.Bcl.AsyncInterfaces": "[8.0.0, )", + "Microsoft.Bcl.AsyncInterfaces": "[5.0.0, )", "Microsoft.CSharp": "[4.7.0, )", "Microsoft.Data.Sqlite": "[7.0.7, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[2.2.0, )", "Microsoft.Extensions.Logging": "[2.2.0, )", - "Microsoft.Extensions.ObjectPool": "[8.0.10, )", - "Polly": "[7.2.3, )", - "Polly.Contrib.WaitAndRetry": "[1.1.1, )", - "Polly.Extensions.Http": "[3.0.0, )", "Speckle.DoubleNumerics": "[4.0.1, )", - "Speckle.Newtonsoft.Json": "[13.0.2, )" + "Speckle.Newtonsoft.Json": "[13.0.2, )", + "Speckle.Sdk.Dependencies": "[1.0.0, )" } }, + "speckle.sdk.dependencies": { + "type": "Project" + }, "GraphQL.Client": { "type": "CentralTransitive", "requested": "[6.0.0, )", @@ -537,9 +510,9 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "CentralTransitive", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==" }, "Microsoft.CSharp": { "type": "CentralTransitive", @@ -575,33 +548,6 @@ "Microsoft.Extensions.Options": "2.2.0" } }, - "Microsoft.Extensions.ObjectPool": { - "type": "CentralTransitive", - "requested": "[8.0.10, )", - "resolved": "8.0.10", - "contentHash": "u7gAG7JgxF8VSJUGPSudAcPxOt+ymJKQCSxNRxiuKV+klCQbHljQR75SilpedCTfhPWDhtUwIJpnDVtspr9nMg==" - }, - "Polly": { - "type": "CentralTransitive", - "requested": "[7.2.3, )", - "resolved": "7.2.3", - "contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ==" - }, - "Polly.Contrib.WaitAndRetry": { - "type": "CentralTransitive", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA==" - }, - "Polly.Extensions.Http": { - "type": "CentralTransitive", - "requested": "[3.0.0, )", - "resolved": "3.0.0", - "contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==", - "dependencies": { - "Polly": "7.1.0" - } - }, "Speckle.DoubleNumerics": { "type": "CentralTransitive", "requested": "[4.0.1, )", diff --git a/src/Speckle.Sdk.Dependencies/GraphQLRetry.cs b/src/Speckle.Sdk.Dependencies/GraphQLRetry.cs new file mode 100644 index 00000000..9366bf65 --- /dev/null +++ b/src/Speckle.Sdk.Dependencies/GraphQLRetry.cs @@ -0,0 +1,27 @@ +using Polly; +using Polly.Contrib.WaitAndRetry; + +namespace Speckle.Sdk.Dependencies; + +public static class GraphQLRetry +{ + public static async Task ExecuteAsync( + Func> func, + Action? onRetry = null + ) + where TException : Exception + { + var delay = Backoff.DecorrelatedJitterBackoffV2(TimeSpan.FromSeconds(1), 5); + var graphqlRetry = Policy + .Handle() + .WaitAndRetryAsync( + delay, + (ex, timeout, _) => + { + onRetry?.Invoke(ex, timeout); + } + ); + + return await graphqlRetry.ExecuteAsync(func).ConfigureAwait(false); + } +} diff --git a/src/Speckle.Sdk/Logging/ISdkActivity.cs b/src/Speckle.Sdk.Dependencies/ISdkActivity.cs similarity index 100% rename from src/Speckle.Sdk/Logging/ISdkActivity.cs rename to src/Speckle.Sdk.Dependencies/ISdkActivity.cs diff --git a/src/Speckle.Sdk/Logging/ISdkActivityFactory.cs b/src/Speckle.Sdk.Dependencies/ISdkActivityFactory.cs similarity index 100% rename from src/Speckle.Sdk/Logging/ISdkActivityFactory.cs rename to src/Speckle.Sdk.Dependencies/ISdkActivityFactory.cs diff --git a/src/Speckle.Sdk.Dependencies/Pool.cs b/src/Speckle.Sdk.Dependencies/Pool.cs new file mode 100644 index 00000000..99209aa2 --- /dev/null +++ b/src/Speckle.Sdk.Dependencies/Pool.cs @@ -0,0 +1,18 @@ +using Microsoft.Extensions.ObjectPool; + +namespace Speckle.Sdk.Dependencies; + +public class Pool + where T : class, new() +{ + private readonly ObjectPool _objectPool; + + internal Pool(IPooledObjectPolicy objectPolicy) + { + _objectPool = ObjectPool.Create(objectPolicy); + } + + public T Get() => _objectPool.Get(); + + public void Return(T obj) => _objectPool.Return(obj); +} diff --git a/src/Speckle.Sdk.Dependencies/Pools.cs b/src/Speckle.Sdk.Dependencies/Pools.cs new file mode 100644 index 00000000..f0d8a4fb --- /dev/null +++ b/src/Speckle.Sdk.Dependencies/Pools.cs @@ -0,0 +1,32 @@ +using Microsoft.Extensions.ObjectPool; + +namespace Speckle.Sdk.Dependencies; + +public static class Pools +{ + public static Pool> ObjectDictionaries { get; } = new(new ObjectDictionaryPolicy()); + + private sealed class ObjectDictionaryPolicy : IPooledObjectPolicy> + { + public Dictionary Create() => new(50, StringComparer.OrdinalIgnoreCase); + + public bool Return(Dictionary obj) + { + obj.Clear(); + return true; + } + } + + public static Pool> ListString { get; } = new(new ListStringPolicy()); + + private sealed class ListStringPolicy : IPooledObjectPolicy> + { + public List Create() => new(20); + + public bool Return(List obj) + { + obj.Clear(); + return true; + } + } +} diff --git a/src/Speckle.Sdk.Dependencies/Speckle.Sdk.Dependencies.csproj b/src/Speckle.Sdk.Dependencies/Speckle.Sdk.Dependencies.csproj new file mode 100644 index 00000000..e0cdbe7d --- /dev/null +++ b/src/Speckle.Sdk.Dependencies/Speckle.Sdk.Dependencies.csproj @@ -0,0 +1,22 @@ + + + + netstandard2.0;net8.0 + + + Debug;Release;Local + true + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/src/Speckle.Sdk/Helpers/SpeckleHttpClientHandler.cs b/src/Speckle.Sdk.Dependencies/SpeckleHttpClientHandler.cs similarity index 96% rename from src/Speckle.Sdk/Helpers/SpeckleHttpClientHandler.cs rename to src/Speckle.Sdk.Dependencies/SpeckleHttpClientHandler.cs index f2fbea93..269edf1a 100644 --- a/src/Speckle.Sdk/Helpers/SpeckleHttpClientHandler.cs +++ b/src/Speckle.Sdk.Dependencies/SpeckleHttpClientHandler.cs @@ -1,5 +1,4 @@ using Polly; -using Speckle.Sdk.Common; using Speckle.Sdk.Logging; namespace Speckle.Sdk.Helpers; @@ -9,7 +8,7 @@ public sealed class SpeckleHttpClientHandler : DelegatingHandler private readonly IAsyncPolicy _resiliencePolicy; private readonly ISdkActivityFactory _activityFactory; - public SpeckleHttpClientHandler( + internal SpeckleHttpClientHandler( HttpMessageHandler innerHandler, ISdkActivityFactory activityFactory, IAsyncPolicy resiliencePolicy @@ -67,7 +66,7 @@ CancellationToken cancellationToken if (policyResult.Outcome == OutcomeType.Successful) { activity?.SetStatus(SdkActivityStatusCode.Ok); - return policyResult.Result.NotNull(); + return policyResult.Result; } activity?.SetStatus(SdkActivityStatusCode.Error); if (policyResult.FinalException != null) diff --git a/src/Speckle.Sdk/Helpers/SpeckleHttpClientHandlerFactory.cs b/src/Speckle.Sdk.Dependencies/SpeckleHttpClientHandlerFactory.cs similarity index 72% rename from src/Speckle.Sdk/Helpers/SpeckleHttpClientHandlerFactory.cs rename to src/Speckle.Sdk.Dependencies/SpeckleHttpClientHandlerFactory.cs index f12bc354..908e9a94 100644 --- a/src/Speckle.Sdk/Helpers/SpeckleHttpClientHandlerFactory.cs +++ b/src/Speckle.Sdk.Dependencies/SpeckleHttpClientHandlerFactory.cs @@ -11,14 +11,16 @@ namespace Speckle.Sdk.Helpers; public sealed class SpeckleHttpClientHandlerFactory(ISdkActivityFactory activityFactory) : ISpeckleHttpClientHandlerFactory { + public const int DEFAULT_TIMEOUT_SECONDS = 60; + public IEnumerable DefaultDelay() { return Backoff.DecorrelatedJitterBackoffV2(TimeSpan.FromMilliseconds(200), 5); } - public IAsyncPolicy HttpAsyncPolicy( + internal IAsyncPolicy HttpAsyncPolicy( IEnumerable? delay = null, - int timeoutSeconds = SpeckleHttp.DEFAULT_TIMEOUT_SECONDS + int timeoutSeconds = DEFAULT_TIMEOUT_SECONDS ) { var retryPolicy = HttpPolicyExtensions @@ -40,12 +42,6 @@ public IAsyncPolicy HttpAsyncPolicy( public SpeckleHttpClientHandler Create( HttpMessageHandler? innerHandler = null, - IAsyncPolicy? resiliencePolicy = null, - int timeoutSeconds = SpeckleHttp.DEFAULT_TIMEOUT_SECONDS - ) => - new( - innerHandler ?? new HttpClientHandler(), - activityFactory, - resiliencePolicy ?? HttpAsyncPolicy(timeoutSeconds: timeoutSeconds) - ); + int timeoutSeconds = DEFAULT_TIMEOUT_SECONDS + ) => new(innerHandler ?? new HttpClientHandler(), activityFactory, HttpAsyncPolicy(timeoutSeconds: timeoutSeconds)); } diff --git a/src/Speckle.Sdk.Dependencies/packages.lock.json b/src/Speckle.Sdk.Dependencies/packages.lock.json new file mode 100644 index 00000000..0c481e76 --- /dev/null +++ b/src/Speckle.Sdk.Dependencies/packages.lock.json @@ -0,0 +1,181 @@ +{ + "version": 2, + "dependencies": { + ".NETStandard,Version=v2.0": { + "GitVersion.MsBuild": { + "type": "Direct", + "requested": "[5.12.0, )", + "resolved": "5.12.0", + "contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA==" + }, + "ILRepack.FullAuto": { + "type": "Direct", + "requested": "[1.6.0, )", + "resolved": "1.6.0", + "contentHash": "34qp/HQ0XRIWCjtNGUOslJ6p9eNWqHXZQ+xx1iBCvXy3mj8tEiqIwRG+LubFyKCJITqMh5cpFvFl20/6+Dmy+g==", + "dependencies": { + "ILRepack": "2.0.33" + } + }, + "Microsoft.Extensions.ObjectPool": { + "type": "Direct", + "requested": "[8.0.10, )", + "resolved": "8.0.10", + "contentHash": "u7gAG7JgxF8VSJUGPSudAcPxOt+ymJKQCSxNRxiuKV+klCQbHljQR75SilpedCTfhPWDhtUwIJpnDVtspr9nMg==" + }, + "Microsoft.SourceLink.GitHub": { + "type": "Direct", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "8.0.0", + "Microsoft.SourceLink.Common": "8.0.0" + } + }, + "NETStandard.Library": { + "type": "Direct", + "requested": "[2.0.3, )", + "resolved": "2.0.3", + "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0" + } + }, + "Polly": { + "type": "Direct", + "requested": "[7.2.3, )", + "resolved": "7.2.3", + "contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ==" + }, + "Polly.Contrib.WaitAndRetry": { + "type": "Direct", + "requested": "[1.1.1, )", + "resolved": "1.1.1", + "contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA==" + }, + "Polly.Extensions.Http": { + "type": "Direct", + "requested": "[3.0.0, )", + "resolved": "3.0.0", + "contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==", + "dependencies": { + "Polly": "7.1.0" + } + }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, + "Speckle.InterfaceGenerator": { + "type": "Direct", + "requested": "[0.9.6, )", + "resolved": "0.9.6", + "contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w==" + }, + "ILRepack": { + "type": "Transitive", + "resolved": "2.0.33", + "contentHash": "xb2h1CsOepoYwdXEPui9VcQglwABQwNf9cccZbf+acarEzF5PUp8Xx71nFXIhOgEdm6wrxAoF6xAxK4m/XFRUQ==" + }, + "Microsoft.Build.Tasks.Git": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ==" + }, + "Microsoft.NETCore.Platforms": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" + }, + "Microsoft.SourceLink.Common": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw==" + } + }, + "net8.0": { + "GitVersion.MsBuild": { + "type": "Direct", + "requested": "[5.12.0, )", + "resolved": "5.12.0", + "contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA==" + }, + "ILRepack.FullAuto": { + "type": "Direct", + "requested": "[1.6.0, )", + "resolved": "1.6.0", + "contentHash": "34qp/HQ0XRIWCjtNGUOslJ6p9eNWqHXZQ+xx1iBCvXy3mj8tEiqIwRG+LubFyKCJITqMh5cpFvFl20/6+Dmy+g==", + "dependencies": { + "ILRepack": "2.0.33" + } + }, + "Microsoft.Extensions.ObjectPool": { + "type": "Direct", + "requested": "[8.0.10, )", + "resolved": "8.0.10", + "contentHash": "u7gAG7JgxF8VSJUGPSudAcPxOt+ymJKQCSxNRxiuKV+klCQbHljQR75SilpedCTfhPWDhtUwIJpnDVtspr9nMg==" + }, + "Microsoft.SourceLink.GitHub": { + "type": "Direct", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "8.0.0", + "Microsoft.SourceLink.Common": "8.0.0" + } + }, + "Polly": { + "type": "Direct", + "requested": "[7.2.3, )", + "resolved": "7.2.3", + "contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ==" + }, + "Polly.Contrib.WaitAndRetry": { + "type": "Direct", + "requested": "[1.1.1, )", + "resolved": "1.1.1", + "contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA==" + }, + "Polly.Extensions.Http": { + "type": "Direct", + "requested": "[3.0.0, )", + "resolved": "3.0.0", + "contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==", + "dependencies": { + "Polly": "7.1.0" + } + }, + "PolySharp": { + "type": "Direct", + "requested": "[1.14.1, )", + "resolved": "1.14.1", + "contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ==" + }, + "Speckle.InterfaceGenerator": { + "type": "Direct", + "requested": "[0.9.6, )", + "resolved": "0.9.6", + "contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w==" + }, + "ILRepack": { + "type": "Transitive", + "resolved": "2.0.33", + "contentHash": "xb2h1CsOepoYwdXEPui9VcQglwABQwNf9cccZbf+acarEzF5PUp8Xx71nFXIhOgEdm6wrxAoF6xAxK4m/XFRUQ==" + }, + "Microsoft.Build.Tasks.Git": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ==" + }, + "Microsoft.SourceLink.Common": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw==" + } + } + } +} \ No newline at end of file diff --git a/src/Speckle.Sdk/Api/GraphQL/Client.cs b/src/Speckle.Sdk/Api/GraphQL/Client.cs index 6ae4b8fa..37fa525b 100644 --- a/src/Speckle.Sdk/Api/GraphQL/Client.cs +++ b/src/Speckle.Sdk/Api/GraphQL/Client.cs @@ -5,13 +5,12 @@ using GraphQL; using GraphQL.Client.Http; using Microsoft.Extensions.Logging; -using Polly; -using Polly.Contrib.WaitAndRetry; using Speckle.Newtonsoft.Json; using Speckle.Sdk.Api.GraphQL; using Speckle.Sdk.Api.GraphQL.Resources; using Speckle.Sdk.Api.GraphQL.Serializer; using Speckle.Sdk.Credentials; +using Speckle.Sdk.Dependencies; using Speckle.Sdk.Helpers; using Speckle.Sdk.Logging; @@ -78,27 +77,24 @@ public void Dispose() catch (Exception ex) when (!ex.IsFatal()) { } } - internal async Task ExecuteWithResiliencePolicies(Func> func) - { - var delay = Backoff.DecorrelatedJitterBackoffV2(TimeSpan.FromSeconds(1), 5); - var graphqlRetry = Policy - .Handle() - .WaitAndRetryAsync( - delay, - (ex, timeout, _) => - { - _logger.LogDebug( - ex, - "The previous attempt at executing function to get {resultType} failed with {exceptionMessage}. Retrying after {timeout}", - typeof(T).Name, - ex.Message, - timeout - ); - } - ); - - return await graphqlRetry.ExecuteAsync(func).ConfigureAwait(false); - } + internal async Task ExecuteWithResiliencePolicies(Func> func) => + await GraphQLRetry + .ExecuteAsync( + func, + ( + (ex, timeout) => + { + _logger.LogDebug( + ex, + "The previous attempt at executing function to get {resultType} failed with {exceptionMessage}. Retrying after {timeout}", + typeof(T).Name, + ex.Message, + timeout + ); + } + ) + ) + .ConfigureAwait(false); /// public async Task ExecuteGraphQLRequest(GraphQLRequest request, CancellationToken cancellationToken = default) diff --git a/src/Speckle.Sdk/Helpers/Http.cs b/src/Speckle.Sdk/Helpers/Http.cs index b0414566..e7169c0b 100644 --- a/src/Speckle.Sdk/Helpers/Http.cs +++ b/src/Speckle.Sdk/Helpers/Http.cs @@ -1,6 +1,5 @@ using System.Net; using Microsoft.Extensions.Logging; -using Polly; using Speckle.InterfaceGenerator; using Speckle.Sdk.Common; @@ -36,7 +35,6 @@ public async Task HttpPing(Uri uri) public HttpClient CreateHttpClient( HttpMessageHandler? innerHandler = null, - IAsyncPolicy? resiliencePolicy = null, int timeoutSeconds = DEFAULT_TIMEOUT_SECONDS, string? authorizationToken = null ) @@ -44,7 +42,7 @@ public HttpClient CreateHttpClient( IWebProxy proxy = WebRequest.GetSystemWebProxy(); proxy.Credentials = CredentialCache.DefaultCredentials; - var speckleHandler = speckleHttpClientHandlerFactory.Create(innerHandler, resiliencePolicy, timeoutSeconds); + var speckleHandler = speckleHttpClientHandlerFactory.Create(innerHandler, timeoutSeconds); var client = new HttpClient(speckleHandler) { diff --git a/src/Speckle.Sdk/Serialisation/SpeckleObjectSerializerPool.cs b/src/Speckle.Sdk/Serialisation/SpeckleObjectSerializerPool.cs index 0f881065..cedba016 100644 --- a/src/Speckle.Sdk/Serialisation/SpeckleObjectSerializerPool.cs +++ b/src/Speckle.Sdk/Serialisation/SpeckleObjectSerializerPool.cs @@ -1,5 +1,4 @@ using System.Buffers; -using Microsoft.Extensions.ObjectPool; using Speckle.Newtonsoft.Json; using Speckle.Sdk.Common; @@ -23,31 +22,4 @@ private class SerializerPool(ArrayPool pool) : IArrayPool public void Return(T[]? array) => pool.Return(array.NotNull()); } - - public ObjectPool> ObjectDictionaries { get; } = - ObjectPool.Create(new ObjectDictionaryPolicy()); - - private class ObjectDictionaryPolicy : IPooledObjectPolicy> - { - public Dictionary Create() => new(50, StringComparer.OrdinalIgnoreCase); - - public bool Return(Dictionary obj) - { - obj.Clear(); - return true; - } - } - - public ObjectPool> ListString { get; } = ObjectPool.Create(new ListStringPolicy()); - - private class ListStringPolicy : IPooledObjectPolicy> - { - public List Create() => new(20); - - public bool Return(List obj) - { - obj.Clear(); - return true; - } - } } diff --git a/src/Speckle.Sdk/Serialisation/V2/Receive/ObjectLoader.cs b/src/Speckle.Sdk/Serialisation/V2/Receive/ObjectLoader.cs index 3c0916da..16cf90b3 100644 --- a/src/Speckle.Sdk/Serialisation/V2/Receive/ObjectLoader.cs +++ b/src/Speckle.Sdk/Serialisation/V2/Receive/ObjectLoader.cs @@ -18,6 +18,8 @@ public sealed class ObjectLoader( private const int CACHE_CHUNK_SIZE = 3000; private const int MAX_PARALLELISM_HTTP = 4; + private int? _allChildrenCount; + public async Task<(string, IReadOnlyList)> GetAndCache( string rootId, CancellationToken cancellationToken, @@ -41,6 +43,7 @@ public sealed class ObjectLoader( .Select(x => x.Item1) .Where(x => !x.StartsWith("blob", StringComparison.Ordinal)) .ToList(); + _allChildrenCount = allChildrenIds.Count; if (!(options?.SkipCacheCheck ?? false)) { var idsToDownload = CheckCache(allChildrenIds); @@ -74,7 +77,7 @@ private async IAsyncEnumerable CheckCache(IReadOnlyList children private async Task DownloadAndCache(IAsyncEnumerable ids, CancellationToken cancellationToken) { var count = 0L; - progress?.Report(new(ProgressEvent.DownloadObject, count, null)); + progress?.Report(new(ProgressEvent.DownloadObject, count, _allChildrenCount)); var toCache = new List<(string, string)>(); var tasks = new ConcurrentBag(); using SemaphoreSlim ss = new(MAX_PARALLELISM_HTTP, MAX_PARALLELISM_HTTP); @@ -88,7 +91,7 @@ private async Task DownloadAndCache(IAsyncEnumerable ids, CancellationTo ) { count++; - progress?.Report(new(ProgressEvent.DownloadObject, count, null)); + progress?.Report(new(ProgressEvent.DownloadObject, count, _allChildrenCount)); toCache.Add((id, json)); if (toCache.Count >= CACHE_CHUNK_SIZE) { diff --git a/src/Speckle.Sdk/Serialisation/V2/Receive/SpeckleObjectDeserializer2.cs b/src/Speckle.Sdk/Serialisation/V2/Receive/SpeckleObjectDeserializer2.cs index fb137d84..4404c6db 100644 --- a/src/Speckle.Sdk/Serialisation/V2/Receive/SpeckleObjectDeserializer2.cs +++ b/src/Speckle.Sdk/Serialisation/V2/Receive/SpeckleObjectDeserializer2.cs @@ -1,6 +1,7 @@ using System.Numerics; using Speckle.Newtonsoft.Json; using Speckle.Sdk.Common; +using Speckle.Sdk.Dependencies; using Speckle.Sdk.Models; namespace Speckle.Sdk.Serialisation.V2.Receive; @@ -70,7 +71,7 @@ public Base Deserialize(string objectJson) private object? ReadObject(JsonReader reader) { reader.Read(); - Dictionary dict = pool.ObjectDictionaries.Get(); + Dictionary dict = Pools.ObjectDictionaries.Get(); while (reader.TokenType != JsonToken.EndObject) { switch (reader.TokenType) @@ -111,7 +112,7 @@ public Base Deserialize(string objectJson) } var b = DictionaryConverter.Dict2Base(dict, options?.SkipInvalidConverts ?? false); - pool.ObjectDictionaries.Return(dict); + Pools.ObjectDictionaries.Return(dict); return b; } diff --git a/src/Speckle.Sdk/ServiceRegistration.cs b/src/Speckle.Sdk/ServiceRegistration.cs index b2cf164f..703810dc 100644 --- a/src/Speckle.Sdk/ServiceRegistration.cs +++ b/src/Speckle.Sdk/ServiceRegistration.cs @@ -1,6 +1,7 @@ using System.Reflection; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; +using Speckle.Sdk.Dependencies; using Speckle.Sdk.Host; using Speckle.Sdk.Logging; @@ -30,6 +31,7 @@ string speckleVersion serviceCollection.TryAddSingleton(); serviceCollection.TryAddSingleton(); serviceCollection.AddMatchingInterfacesAsTransient(Assembly.GetExecutingAssembly()); + serviceCollection.AddMatchingInterfacesAsTransient(typeof(GraphQLRetry).Assembly); return serviceCollection; } diff --git a/src/Speckle.Sdk/Speckle.Sdk.csproj b/src/Speckle.Sdk/Speckle.Sdk.csproj index 68626500..663bca5d 100644 --- a/src/Speckle.Sdk/Speckle.Sdk.csproj +++ b/src/Speckle.Sdk/Speckle.Sdk.csproj @@ -26,14 +26,10 @@ - + - - - - @@ -45,7 +41,10 @@ - + + + + diff --git a/src/Speckle.Sdk/packages.lock.json b/src/Speckle.Sdk/packages.lock.json index ff8d5db6..e8f71a28 100644 --- a/src/Speckle.Sdk/packages.lock.json +++ b/src/Speckle.Sdk/packages.lock.json @@ -21,9 +21,9 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Direct", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==", "dependencies": { "System.Threading.Tasks.Extensions": "4.5.4" } @@ -62,12 +62,6 @@ "Microsoft.Extensions.Options": "2.2.0" } }, - "Microsoft.Extensions.ObjectPool": { - "type": "Direct", - "requested": "[8.0.10, )", - "resolved": "8.0.10", - "contentHash": "u7gAG7JgxF8VSJUGPSudAcPxOt+ymJKQCSxNRxiuKV+klCQbHljQR75SilpedCTfhPWDhtUwIJpnDVtspr9nMg==" - }, "Microsoft.SourceLink.GitHub": { "type": "Direct", "requested": "[8.0.0, )", @@ -87,27 +81,6 @@ "Microsoft.NETCore.Platforms": "1.1.0" } }, - "Polly": { - "type": "Direct", - "requested": "[7.2.3, )", - "resolved": "7.2.3", - "contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ==" - }, - "Polly.Contrib.WaitAndRetry": { - "type": "Direct", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA==" - }, - "Polly.Extensions.Http": { - "type": "Direct", - "requested": "[3.0.0, )", - "resolved": "3.0.0", - "contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==", - "dependencies": { - "Polly": "7.1.0" - } - }, "PolySharp": { "type": "Direct", "requested": "[1.14.1, )", @@ -322,6 +295,9 @@ "dependencies": { "System.Runtime.CompilerServices.Unsafe": "4.5.3" } + }, + "speckle.sdk.dependencies": { + "type": "Project" } }, "net8.0": { @@ -344,9 +320,9 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Direct", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==" }, "Microsoft.CSharp": { "type": "Direct", @@ -382,12 +358,6 @@ "Microsoft.Extensions.Options": "2.2.0" } }, - "Microsoft.Extensions.ObjectPool": { - "type": "Direct", - "requested": "[8.0.10, )", - "resolved": "8.0.10", - "contentHash": "u7gAG7JgxF8VSJUGPSudAcPxOt+ymJKQCSxNRxiuKV+klCQbHljQR75SilpedCTfhPWDhtUwIJpnDVtspr9nMg==" - }, "Microsoft.SourceLink.GitHub": { "type": "Direct", "requested": "[8.0.0, )", @@ -398,27 +368,6 @@ "Microsoft.SourceLink.Common": "8.0.0" } }, - "Polly": { - "type": "Direct", - "requested": "[7.2.3, )", - "resolved": "7.2.3", - "contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ==" - }, - "Polly.Contrib.WaitAndRetry": { - "type": "Direct", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA==" - }, - "Polly.Extensions.Http": { - "type": "Direct", - "requested": "[3.0.0, )", - "resolved": "3.0.0", - "contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==", - "dependencies": { - "Polly": "7.1.0" - } - }, "PolySharp": { "type": "Direct", "requested": "[1.14.1, )", @@ -579,6 +528,9 @@ "type": "Transitive", "resolved": "4.5.1", "contentHash": "Zh8t8oqolRaFa9vmOZfdQm/qKejdqz0J9kr7o2Fu0vPeoH3BL1EOXipKWwkWtLT1JPzjByrF19fGuFlNbmPpiw==" + }, + "speckle.sdk.dependencies": { + "type": "Project" } } } diff --git a/tests/Speckle.Objects.Tests.Unit/packages.lock.json b/tests/Speckle.Objects.Tests.Unit/packages.lock.json index 68cc315a..d0322f30 100644 --- a/tests/Speckle.Objects.Tests.Unit/packages.lock.json +++ b/tests/Speckle.Objects.Tests.Unit/packages.lock.json @@ -274,19 +274,19 @@ "type": "Project", "dependencies": { "GraphQL.Client": "[6.0.0, )", - "Microsoft.Bcl.AsyncInterfaces": "[8.0.0, )", + "Microsoft.Bcl.AsyncInterfaces": "[5.0.0, )", "Microsoft.CSharp": "[4.7.0, )", "Microsoft.Data.Sqlite": "[7.0.7, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[2.2.0, )", "Microsoft.Extensions.Logging": "[2.2.0, )", - "Microsoft.Extensions.ObjectPool": "[8.0.10, )", - "Polly": "[7.2.3, )", - "Polly.Contrib.WaitAndRetry": "[1.1.1, )", - "Polly.Extensions.Http": "[3.0.0, )", "Speckle.DoubleNumerics": "[4.0.1, )", - "Speckle.Newtonsoft.Json": "[13.0.2, )" + "Speckle.Newtonsoft.Json": "[13.0.2, )", + "Speckle.Sdk.Dependencies": "[1.0.0, )" } }, + "speckle.sdk.dependencies": { + "type": "Project" + }, "GraphQL.Client": { "type": "CentralTransitive", "requested": "[6.0.0, )", @@ -300,9 +300,9 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "CentralTransitive", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==" }, "Microsoft.CSharp": { "type": "CentralTransitive", @@ -338,33 +338,6 @@ "Microsoft.Extensions.Options": "2.2.0" } }, - "Microsoft.Extensions.ObjectPool": { - "type": "CentralTransitive", - "requested": "[8.0.10, )", - "resolved": "8.0.10", - "contentHash": "u7gAG7JgxF8VSJUGPSudAcPxOt+ymJKQCSxNRxiuKV+klCQbHljQR75SilpedCTfhPWDhtUwIJpnDVtspr9nMg==" - }, - "Polly": { - "type": "CentralTransitive", - "requested": "[7.2.3, )", - "resolved": "7.2.3", - "contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ==" - }, - "Polly.Contrib.WaitAndRetry": { - "type": "CentralTransitive", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA==" - }, - "Polly.Extensions.Http": { - "type": "CentralTransitive", - "requested": "[3.0.0, )", - "resolved": "3.0.0", - "contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==", - "dependencies": { - "Polly": "7.1.0" - } - }, "Speckle.DoubleNumerics": { "type": "CentralTransitive", "requested": "[4.0.1, )", diff --git a/tests/Speckle.Sdk.Serialization.Testing/packages.lock.json b/tests/Speckle.Sdk.Serialization.Testing/packages.lock.json index 825f13db..760984b4 100644 --- a/tests/Speckle.Sdk.Serialization.Testing/packages.lock.json +++ b/tests/Speckle.Sdk.Serialization.Testing/packages.lock.json @@ -338,19 +338,19 @@ "type": "Project", "dependencies": { "GraphQL.Client": "[6.0.0, )", - "Microsoft.Bcl.AsyncInterfaces": "[8.0.0, )", + "Microsoft.Bcl.AsyncInterfaces": "[5.0.0, )", "Microsoft.CSharp": "[4.7.0, )", "Microsoft.Data.Sqlite": "[7.0.7, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[2.2.0, )", "Microsoft.Extensions.Logging": "[2.2.0, )", - "Microsoft.Extensions.ObjectPool": "[8.0.10, )", - "Polly": "[7.2.3, )", - "Polly.Contrib.WaitAndRetry": "[1.1.1, )", - "Polly.Extensions.Http": "[3.0.0, )", "Speckle.DoubleNumerics": "[4.0.1, )", - "Speckle.Newtonsoft.Json": "[13.0.2, )" + "Speckle.Newtonsoft.Json": "[13.0.2, )", + "Speckle.Sdk.Dependencies": "[1.0.0, )" } }, + "speckle.sdk.dependencies": { + "type": "Project" + }, "speckle.sdk.tests.performance": { "type": "Project", "dependencies": { @@ -390,9 +390,9 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "CentralTransitive", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==" }, "Microsoft.CSharp": { "type": "CentralTransitive", @@ -428,33 +428,6 @@ "Microsoft.Extensions.Options": "2.2.0" } }, - "Microsoft.Extensions.ObjectPool": { - "type": "CentralTransitive", - "requested": "[8.0.10, )", - "resolved": "8.0.10", - "contentHash": "u7gAG7JgxF8VSJUGPSudAcPxOt+ymJKQCSxNRxiuKV+klCQbHljQR75SilpedCTfhPWDhtUwIJpnDVtspr9nMg==" - }, - "Polly": { - "type": "CentralTransitive", - "requested": "[7.2.3, )", - "resolved": "7.2.3", - "contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ==" - }, - "Polly.Contrib.WaitAndRetry": { - "type": "CentralTransitive", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA==" - }, - "Polly.Extensions.Http": { - "type": "CentralTransitive", - "requested": "[3.0.0, )", - "resolved": "3.0.0", - "contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==", - "dependencies": { - "Polly": "7.1.0" - } - }, "Speckle.DoubleNumerics": { "type": "CentralTransitive", "requested": "[4.0.1, )", diff --git a/tests/Speckle.Sdk.Serialization.Tests/packages.lock.json b/tests/Speckle.Sdk.Serialization.Tests/packages.lock.json index 68cc315a..d0322f30 100644 --- a/tests/Speckle.Sdk.Serialization.Tests/packages.lock.json +++ b/tests/Speckle.Sdk.Serialization.Tests/packages.lock.json @@ -274,19 +274,19 @@ "type": "Project", "dependencies": { "GraphQL.Client": "[6.0.0, )", - "Microsoft.Bcl.AsyncInterfaces": "[8.0.0, )", + "Microsoft.Bcl.AsyncInterfaces": "[5.0.0, )", "Microsoft.CSharp": "[4.7.0, )", "Microsoft.Data.Sqlite": "[7.0.7, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[2.2.0, )", "Microsoft.Extensions.Logging": "[2.2.0, )", - "Microsoft.Extensions.ObjectPool": "[8.0.10, )", - "Polly": "[7.2.3, )", - "Polly.Contrib.WaitAndRetry": "[1.1.1, )", - "Polly.Extensions.Http": "[3.0.0, )", "Speckle.DoubleNumerics": "[4.0.1, )", - "Speckle.Newtonsoft.Json": "[13.0.2, )" + "Speckle.Newtonsoft.Json": "[13.0.2, )", + "Speckle.Sdk.Dependencies": "[1.0.0, )" } }, + "speckle.sdk.dependencies": { + "type": "Project" + }, "GraphQL.Client": { "type": "CentralTransitive", "requested": "[6.0.0, )", @@ -300,9 +300,9 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "CentralTransitive", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==" }, "Microsoft.CSharp": { "type": "CentralTransitive", @@ -338,33 +338,6 @@ "Microsoft.Extensions.Options": "2.2.0" } }, - "Microsoft.Extensions.ObjectPool": { - "type": "CentralTransitive", - "requested": "[8.0.10, )", - "resolved": "8.0.10", - "contentHash": "u7gAG7JgxF8VSJUGPSudAcPxOt+ymJKQCSxNRxiuKV+klCQbHljQR75SilpedCTfhPWDhtUwIJpnDVtspr9nMg==" - }, - "Polly": { - "type": "CentralTransitive", - "requested": "[7.2.3, )", - "resolved": "7.2.3", - "contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ==" - }, - "Polly.Contrib.WaitAndRetry": { - "type": "CentralTransitive", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA==" - }, - "Polly.Extensions.Http": { - "type": "CentralTransitive", - "requested": "[3.0.0, )", - "resolved": "3.0.0", - "contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==", - "dependencies": { - "Polly": "7.1.0" - } - }, "Speckle.DoubleNumerics": { "type": "CentralTransitive", "requested": "[4.0.1, )", diff --git a/tests/Speckle.Sdk.Tests.Integration/packages.lock.json b/tests/Speckle.Sdk.Tests.Integration/packages.lock.json index e220ce73..5e67102e 100644 --- a/tests/Speckle.Sdk.Tests.Integration/packages.lock.json +++ b/tests/Speckle.Sdk.Tests.Integration/packages.lock.json @@ -268,19 +268,19 @@ "type": "Project", "dependencies": { "GraphQL.Client": "[6.0.0, )", - "Microsoft.Bcl.AsyncInterfaces": "[8.0.0, )", + "Microsoft.Bcl.AsyncInterfaces": "[5.0.0, )", "Microsoft.CSharp": "[4.7.0, )", "Microsoft.Data.Sqlite": "[7.0.7, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[2.2.0, )", "Microsoft.Extensions.Logging": "[2.2.0, )", - "Microsoft.Extensions.ObjectPool": "[8.0.10, )", - "Polly": "[7.2.3, )", - "Polly.Contrib.WaitAndRetry": "[1.1.1, )", - "Polly.Extensions.Http": "[3.0.0, )", "Speckle.DoubleNumerics": "[4.0.1, )", - "Speckle.Newtonsoft.Json": "[13.0.2, )" + "Speckle.Newtonsoft.Json": "[13.0.2, )", + "Speckle.Sdk.Dependencies": "[1.0.0, )" } }, + "speckle.sdk.dependencies": { + "type": "Project" + }, "speckle.sdk.tests.unit": { "type": "Project", "dependencies": { @@ -307,9 +307,9 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "CentralTransitive", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==" }, "Microsoft.CSharp": { "type": "CentralTransitive", @@ -354,33 +354,6 @@ "Microsoft.Extensions.Options": "2.2.0" } }, - "Microsoft.Extensions.ObjectPool": { - "type": "CentralTransitive", - "requested": "[8.0.10, )", - "resolved": "8.0.10", - "contentHash": "u7gAG7JgxF8VSJUGPSudAcPxOt+ymJKQCSxNRxiuKV+klCQbHljQR75SilpedCTfhPWDhtUwIJpnDVtspr9nMg==" - }, - "Polly": { - "type": "CentralTransitive", - "requested": "[7.2.3, )", - "resolved": "7.2.3", - "contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ==" - }, - "Polly.Contrib.WaitAndRetry": { - "type": "CentralTransitive", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA==" - }, - "Polly.Extensions.Http": { - "type": "CentralTransitive", - "requested": "[3.0.0, )", - "resolved": "3.0.0", - "contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==", - "dependencies": { - "Polly": "7.1.0" - } - }, "Speckle.DoubleNumerics": { "type": "CentralTransitive", "requested": "[4.0.1, )", diff --git a/tests/Speckle.Sdk.Tests.Performance/Speckle.Sdk.Tests.Performance.csproj b/tests/Speckle.Sdk.Tests.Performance/Speckle.Sdk.Tests.Performance.csproj index a7a017ae..5dcc0434 100644 --- a/tests/Speckle.Sdk.Tests.Performance/Speckle.Sdk.Tests.Performance.csproj +++ b/tests/Speckle.Sdk.Tests.Performance/Speckle.Sdk.Tests.Performance.csproj @@ -13,6 +13,7 @@ + diff --git a/tests/Speckle.Sdk.Tests.Performance/packages.lock.json b/tests/Speckle.Sdk.Tests.Performance/packages.lock.json index 703abca5..c3b5098b 100644 --- a/tests/Speckle.Sdk.Tests.Performance/packages.lock.json +++ b/tests/Speckle.Sdk.Tests.Performance/packages.lock.json @@ -356,19 +356,19 @@ "type": "Project", "dependencies": { "GraphQL.Client": "[6.0.0, )", - "Microsoft.Bcl.AsyncInterfaces": "[8.0.0, )", + "Microsoft.Bcl.AsyncInterfaces": "[5.0.0, )", "Microsoft.CSharp": "[4.7.0, )", "Microsoft.Data.Sqlite": "[7.0.7, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[2.2.0, )", "Microsoft.Extensions.Logging": "[2.2.0, )", - "Microsoft.Extensions.ObjectPool": "[8.0.10, )", - "Polly": "[7.2.3, )", - "Polly.Contrib.WaitAndRetry": "[1.1.1, )", - "Polly.Extensions.Http": "[3.0.0, )", "Speckle.DoubleNumerics": "[4.0.1, )", - "Speckle.Newtonsoft.Json": "[13.0.2, )" + "Speckle.Newtonsoft.Json": "[13.0.2, )", + "Speckle.Sdk.Dependencies": "[1.0.0, )" } }, + "speckle.sdk.dependencies": { + "type": "Project" + }, "GraphQL.Client": { "type": "CentralTransitive", "requested": "[6.0.0, )", @@ -382,9 +382,9 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "CentralTransitive", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==" }, "Microsoft.CSharp": { "type": "CentralTransitive", @@ -420,33 +420,6 @@ "Microsoft.Extensions.Options": "2.2.0" } }, - "Microsoft.Extensions.ObjectPool": { - "type": "CentralTransitive", - "requested": "[8.0.10, )", - "resolved": "8.0.10", - "contentHash": "u7gAG7JgxF8VSJUGPSudAcPxOt+ymJKQCSxNRxiuKV+klCQbHljQR75SilpedCTfhPWDhtUwIJpnDVtspr9nMg==" - }, - "Polly": { - "type": "CentralTransitive", - "requested": "[7.2.3, )", - "resolved": "7.2.3", - "contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ==" - }, - "Polly.Contrib.WaitAndRetry": { - "type": "CentralTransitive", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA==" - }, - "Polly.Extensions.Http": { - "type": "CentralTransitive", - "requested": "[3.0.0, )", - "resolved": "3.0.0", - "contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==", - "dependencies": { - "Polly": "7.1.0" - } - }, "Speckle.DoubleNumerics": { "type": "CentralTransitive", "requested": "[4.0.1, )", diff --git a/tests/Speckle.Sdk.Tests.Unit/packages.lock.json b/tests/Speckle.Sdk.Tests.Unit/packages.lock.json index ca08e1f8..08bb4fbe 100644 --- a/tests/Speckle.Sdk.Tests.Unit/packages.lock.json +++ b/tests/Speckle.Sdk.Tests.Unit/packages.lock.json @@ -283,19 +283,19 @@ "type": "Project", "dependencies": { "GraphQL.Client": "[6.0.0, )", - "Microsoft.Bcl.AsyncInterfaces": "[8.0.0, )", + "Microsoft.Bcl.AsyncInterfaces": "[5.0.0, )", "Microsoft.CSharp": "[4.7.0, )", "Microsoft.Data.Sqlite": "[7.0.7, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[2.2.0, )", "Microsoft.Extensions.Logging": "[2.2.0, )", - "Microsoft.Extensions.ObjectPool": "[8.0.10, )", - "Polly": "[7.2.3, )", - "Polly.Contrib.WaitAndRetry": "[1.1.1, )", - "Polly.Extensions.Http": "[3.0.0, )", "Speckle.DoubleNumerics": "[4.0.1, )", - "Speckle.Newtonsoft.Json": "[13.0.2, )" + "Speckle.Newtonsoft.Json": "[13.0.2, )", + "Speckle.Sdk.Dependencies": "[1.0.0, )" } }, + "speckle.sdk.dependencies": { + "type": "Project" + }, "GraphQL.Client": { "type": "CentralTransitive", "requested": "[6.0.0, )", @@ -309,9 +309,9 @@ }, "Microsoft.Bcl.AsyncInterfaces": { "type": "CentralTransitive", - "requested": "[8.0.0, )", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==" + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==" }, "Microsoft.CSharp": { "type": "CentralTransitive", @@ -347,33 +347,6 @@ "Microsoft.Extensions.Options": "2.2.0" } }, - "Microsoft.Extensions.ObjectPool": { - "type": "CentralTransitive", - "requested": "[8.0.10, )", - "resolved": "8.0.10", - "contentHash": "u7gAG7JgxF8VSJUGPSudAcPxOt+ymJKQCSxNRxiuKV+klCQbHljQR75SilpedCTfhPWDhtUwIJpnDVtspr9nMg==" - }, - "Polly": { - "type": "CentralTransitive", - "requested": "[7.2.3, )", - "resolved": "7.2.3", - "contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ==" - }, - "Polly.Contrib.WaitAndRetry": { - "type": "CentralTransitive", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA==" - }, - "Polly.Extensions.Http": { - "type": "CentralTransitive", - "requested": "[3.0.0, )", - "resolved": "3.0.0", - "contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==", - "dependencies": { - "Polly": "7.1.0" - } - }, "Speckle.Newtonsoft.Json": { "type": "CentralTransitive", "requested": "[13.0.2, )",