From f099edb17b9089099d87d8733a5164c715d13a17 Mon Sep 17 00:00:00 2001 From: Pavel Gross Date: Thu, 17 Apr 2025 10:07:32 +0300 Subject: [PATCH 1/2] [#64] Fix for client cut logic Signed-off-by: Pavel Gross --- src/FrostFS.SDK.Client/AssemblyInfo.cs | 4 ++-- src/FrostFS.SDK.Client/FrostFS.SDK.Client.csproj | 2 +- src/FrostFS.SDK.Client/Services/ObjectServiceProvider.cs | 7 ++++--- src/FrostFS.SDK.Cryptography/AssemblyInfo.cs | 4 ++-- .../FrostFS.SDK.Cryptography.csproj | 2 +- src/FrostFS.SDK.Protos/AssemblyInfo.cs | 4 ++-- src/FrostFS.SDK.Protos/FrostFS.SDK.Protos.csproj | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/FrostFS.SDK.Client/AssemblyInfo.cs b/src/FrostFS.SDK.Client/AssemblyInfo.cs index 8703376..2c89c60 100644 --- a/src/FrostFS.SDK.Client/AssemblyInfo.cs +++ b/src/FrostFS.SDK.Client/AssemblyInfo.cs @@ -1,8 +1,8 @@ using System.Reflection; [assembly: AssemblyCompany("FrostFS.SDK.Client")] -[assembly: AssemblyFileVersion("1.0.4.0")] +[assembly: AssemblyFileVersion("1.0.6.0")] [assembly: AssemblyInformationalVersion("1.0.0+d6fe0344538a223303c9295452f0ad73681ca376")] [assembly: AssemblyProduct("FrostFS.SDK.Client")] [assembly: AssemblyTitle("FrostFS.SDK.Client")] -[assembly: AssemblyVersion("1.0.4")] +[assembly: AssemblyVersion("1.0.6")] diff --git a/src/FrostFS.SDK.Client/FrostFS.SDK.Client.csproj b/src/FrostFS.SDK.Client/FrostFS.SDK.Client.csproj index f8aefb7..6fb9ae4 100644 --- a/src/FrostFS.SDK.Client/FrostFS.SDK.Client.csproj +++ b/src/FrostFS.SDK.Client/FrostFS.SDK.Client.csproj @@ -6,7 +6,7 @@ enable AllEnabledByDefault FrostFS.SDK.Client - 1.0.5 + 1.0.6 C# SDK for FrostFS gRPC native protocol diff --git a/src/FrostFS.SDK.Client/Services/ObjectServiceProvider.cs b/src/FrostFS.SDK.Client/Services/ObjectServiceProvider.cs index ed9e9bc..a8b748f 100644 --- a/src/FrostFS.SDK.Client/Services/ObjectServiceProvider.cs +++ b/src/FrostFS.SDK.Client/Services/ObjectServiceProvider.cs @@ -582,14 +582,15 @@ internal sealed class ObjectServiceProvider(ObjectService.ObjectServiceClient cl var restPart = (fullLength % (ulong)partSize) > 0 ? 1 : 0; var objectsCount = fullLength > 0 ? (int)(fullLength / (ulong)partSize) + restPart : 0; - // if the object fits one part, it can be loaded as non-complex object - if (objectsCount == 1) + // if the object fits one part, it can be loaded as non-complex object, but if it is not upload resuming + if (objectsCount == 1 && progressInfo != null && progressInfo.GetLast().Length == 0) { args.PutObjectContext.MaxObjectSizeCache = partSize; + args.PutObjectContext.FullLength = fullLength; var singlePartResult = await PutMultipartStreamObjectAsync(args, default).ConfigureAwait(false); return singlePartResult.ObjectId; } - + progressInfo ??= new UploadProgressInfo(Guid.NewGuid(), objectsCount); var remain = fullLength; diff --git a/src/FrostFS.SDK.Cryptography/AssemblyInfo.cs b/src/FrostFS.SDK.Cryptography/AssemblyInfo.cs index 9f33f25..ba08d91 100644 --- a/src/FrostFS.SDK.Cryptography/AssemblyInfo.cs +++ b/src/FrostFS.SDK.Cryptography/AssemblyInfo.cs @@ -1,8 +1,8 @@ using System.Reflection; [assembly: AssemblyCompany("FrostFS.SDK.Cryptography")] -[assembly: AssemblyFileVersion("1.0.4.0")] +[assembly: AssemblyFileVersion("1.0.6.0")] [assembly: AssemblyInformationalVersion("1.0.0+d6fe0344538a223303c9295452f0ad73681ca376")] [assembly: AssemblyProduct("FrostFS.SDK.Cryptography")] [assembly: AssemblyTitle("FrostFS.SDK.Cryptography")] -[assembly: AssemblyVersion("1.0.4.0")] +[assembly: AssemblyVersion("1.0.6.0")] diff --git a/src/FrostFS.SDK.Cryptography/FrostFS.SDK.Cryptography.csproj b/src/FrostFS.SDK.Cryptography/FrostFS.SDK.Cryptography.csproj index 6a400c2..0bb72c5 100644 --- a/src/FrostFS.SDK.Cryptography/FrostFS.SDK.Cryptography.csproj +++ b/src/FrostFS.SDK.Cryptography/FrostFS.SDK.Cryptography.csproj @@ -5,7 +5,7 @@ 12.0 enable FrostFS.SDK.Cryptography - 1.0.5 + 1.0.6 Cryptography tools for C# SDK diff --git a/src/FrostFS.SDK.Protos/AssemblyInfo.cs b/src/FrostFS.SDK.Protos/AssemblyInfo.cs index c3c813c..27da7e7 100644 --- a/src/FrostFS.SDK.Protos/AssemblyInfo.cs +++ b/src/FrostFS.SDK.Protos/AssemblyInfo.cs @@ -1,8 +1,8 @@ using System.Reflection; [assembly: AssemblyCompany("FrostFS.SDK.Protos")] -[assembly: AssemblyFileVersion("1.0.4.0")] +[assembly: AssemblyFileVersion("1.0.6.0")] [assembly: AssemblyInformationalVersion("1.0.0+d6fe0344538a223303c9295452f0ad73681ca376")] [assembly: AssemblyProduct("FrostFS.SDK.Protos")] [assembly: AssemblyTitle("FrostFS.SDK.Protos")] -[assembly: AssemblyVersion("1.0.4.0")] +[assembly: AssemblyVersion("1.0.6.0")] diff --git a/src/FrostFS.SDK.Protos/FrostFS.SDK.Protos.csproj b/src/FrostFS.SDK.Protos/FrostFS.SDK.Protos.csproj index 81a8490..e165524 100644 --- a/src/FrostFS.SDK.Protos/FrostFS.SDK.Protos.csproj +++ b/src/FrostFS.SDK.Protos/FrostFS.SDK.Protos.csproj @@ -5,7 +5,7 @@ 12.0 enable FrostFS.SDK.Protos - 1.0.5 + 1.0.6 Protobuf client for C# SDK -- 2.45.3 From 20586d8adaa44810ca6478d3538477b33af38e6f Mon Sep 17 00:00:00 2001 From: Pavel Gross Date: Thu, 17 Apr 2025 13:41:41 +0300 Subject: [PATCH 2/2] [#64] Add string naming Signed-off-by: Pavel Gross --- keyfile.snk | Bin 0 -> 596 bytes src/FrostFS.SDK.Client/ApeRules/RuleSerializer.cs | 3 --- src/FrostFS.SDK.Client/AssemblyInfo.cs | 10 ++++++++-- src/FrostFS.SDK.Client/FrostFS.SDK.Client.csproj | 2 ++ src/FrostFS.SDK.Cryptography/AssemblyInfo.cs | 3 +-- .../FrostFS.SDK.Cryptography.csproj | 2 ++ src/FrostFS.SDK.Protos/AssemblyInfo.cs | 3 +-- src/FrostFS.SDK.Protos/FrostFS.SDK.Protos.csproj | 8 +++++--- src/FrostFS.SDK.Tests/FrostFS.SDK.Tests.csproj | 10 +++++++--- 9 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 keyfile.snk diff --git a/keyfile.snk b/keyfile.snk new file mode 100644 index 0000000000000000000000000000000000000000..a14537bebfd9a433f5892391ede8ca82350481cb GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50097rxsv-7>(5Jtw6UYF7?&vwQvZda1_NA2 z+*Sn3s#vZufc43^Qa|op(Yv0h&*56Khvp-knAP8@78SjBNL^AoIzMHk|>H~JiY-Y@%qoT^WXX&U3Z>e*Iks*+~|Km98<14q{T*PUo+~c7N}64uBG@1KxX*&RkS|O@aG)X+MAv2 z4LklzkL$6|$Qyhp)nCZFHM$b$kHGjJ+#ckXJU0Mh?E;0C)K`IkNKj~u3_#`y#$MHy zV6+UvVgNo#&vw!SS4*ZmrR2GW{Dcl2I_(tMA zRB$RGHap$PL5K8Id4UNFX{eLSZKZ!(T9`AP!&j7!ebndcojP;XT*h5-& iO%&N(%fUyp&bxLGnhVRV%2K@Dw@=W$$KvKDWo>MpA|Ues literal 0 HcmV?d00001 diff --git a/src/FrostFS.SDK.Client/ApeRules/RuleSerializer.cs b/src/FrostFS.SDK.Client/ApeRules/RuleSerializer.cs index 738eb54..24f784e 100644 --- a/src/FrostFS.SDK.Client/ApeRules/RuleSerializer.cs +++ b/src/FrostFS.SDK.Client/ApeRules/RuleSerializer.cs @@ -1,7 +1,4 @@ using System; -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("FrostFS.SDK.Tests")] namespace FrostFS.SDK.Client; diff --git a/src/FrostFS.SDK.Client/AssemblyInfo.cs b/src/FrostFS.SDK.Client/AssemblyInfo.cs index 2c89c60..4d87f8c 100644 --- a/src/FrostFS.SDK.Client/AssemblyInfo.cs +++ b/src/FrostFS.SDK.Client/AssemblyInfo.cs @@ -1,8 +1,14 @@ using System.Reflection; +using System.Runtime.CompilerServices; -[assembly: AssemblyCompany("FrostFS.SDK.Client")] +[assembly: AssemblyCompany("TrueCloudLab")] +[assembly: InternalsVisibleTo("FrostFS.SDK.Tests, PublicKey=" + + "002400000480000094000000060200000024000052534131000400000100010089b992fb14ebcf"+ + "4b85b4b1a3af1897290c52ff85a106035c47dc5604cbaa58ae3180f5c9b8523fee5dd1bb9ea9cf"+ + "e15ab287e6239c98d5dfa91615bd77485d523a3a3f65a4e5028454cedd5ac4d9eca6da18b81985"+ + "ac6905d33cc64b5a2587050c16f67b71ef8889dbd3c90ef7cc0b06bbbe09886601d195f5db179a"+ + "3c2a25b1")] [assembly: AssemblyFileVersion("1.0.6.0")] -[assembly: AssemblyInformationalVersion("1.0.0+d6fe0344538a223303c9295452f0ad73681ca376")] [assembly: AssemblyProduct("FrostFS.SDK.Client")] [assembly: AssemblyTitle("FrostFS.SDK.Client")] [assembly: AssemblyVersion("1.0.6")] diff --git a/src/FrostFS.SDK.Client/FrostFS.SDK.Client.csproj b/src/FrostFS.SDK.Client/FrostFS.SDK.Client.csproj index 6fb9ae4..037a2f4 100644 --- a/src/FrostFS.SDK.Client/FrostFS.SDK.Client.csproj +++ b/src/FrostFS.SDK.Client/FrostFS.SDK.Client.csproj @@ -32,6 +32,8 @@ false True + True + .\\..\\..\\keyfile.snk diff --git a/src/FrostFS.SDK.Cryptography/AssemblyInfo.cs b/src/FrostFS.SDK.Cryptography/AssemblyInfo.cs index ba08d91..cff5cc1 100644 --- a/src/FrostFS.SDK.Cryptography/AssemblyInfo.cs +++ b/src/FrostFS.SDK.Cryptography/AssemblyInfo.cs @@ -1,8 +1,7 @@ using System.Reflection; -[assembly: AssemblyCompany("FrostFS.SDK.Cryptography")] +[assembly: AssemblyCompany("TrueCloudLab")] [assembly: AssemblyFileVersion("1.0.6.0")] -[assembly: AssemblyInformationalVersion("1.0.0+d6fe0344538a223303c9295452f0ad73681ca376")] [assembly: AssemblyProduct("FrostFS.SDK.Cryptography")] [assembly: AssemblyTitle("FrostFS.SDK.Cryptography")] [assembly: AssemblyVersion("1.0.6.0")] diff --git a/src/FrostFS.SDK.Cryptography/FrostFS.SDK.Cryptography.csproj b/src/FrostFS.SDK.Cryptography/FrostFS.SDK.Cryptography.csproj index 0bb72c5..20e0a83 100644 --- a/src/FrostFS.SDK.Cryptography/FrostFS.SDK.Cryptography.csproj +++ b/src/FrostFS.SDK.Cryptography/FrostFS.SDK.Cryptography.csproj @@ -26,6 +26,8 @@ false + True + .\\..\\..\\keyfile.snk diff --git a/src/FrostFS.SDK.Protos/AssemblyInfo.cs b/src/FrostFS.SDK.Protos/AssemblyInfo.cs index 27da7e7..f16be42 100644 --- a/src/FrostFS.SDK.Protos/AssemblyInfo.cs +++ b/src/FrostFS.SDK.Protos/AssemblyInfo.cs @@ -1,8 +1,7 @@ using System.Reflection; -[assembly: AssemblyCompany("FrostFS.SDK.Protos")] +[assembly: AssemblyCompany("TrueCloudLab")] [assembly: AssemblyFileVersion("1.0.6.0")] -[assembly: AssemblyInformationalVersion("1.0.0+d6fe0344538a223303c9295452f0ad73681ca376")] [assembly: AssemblyProduct("FrostFS.SDK.Protos")] [assembly: AssemblyTitle("FrostFS.SDK.Protos")] [assembly: AssemblyVersion("1.0.6.0")] diff --git a/src/FrostFS.SDK.Protos/FrostFS.SDK.Protos.csproj b/src/FrostFS.SDK.Protos/FrostFS.SDK.Protos.csproj index e165524..b6bc876 100644 --- a/src/FrostFS.SDK.Protos/FrostFS.SDK.Protos.csproj +++ b/src/FrostFS.SDK.Protos/FrostFS.SDK.Protos.csproj @@ -13,19 +13,21 @@ - true + true - <_SkipUpgradeNetAnalyzersNuGetWarning>true + <_SkipUpgradeNetAnalyzersNuGetWarning>true - true + true false + True + .\\..\\..\\keyfile.snk diff --git a/src/FrostFS.SDK.Tests/FrostFS.SDK.Tests.csproj b/src/FrostFS.SDK.Tests/FrostFS.SDK.Tests.csproj index 30c0564..37bbace 100644 --- a/src/FrostFS.SDK.Tests/FrostFS.SDK.Tests.csproj +++ b/src/FrostFS.SDK.Tests/FrostFS.SDK.Tests.csproj @@ -10,11 +10,16 @@ - true + true - true + true + + + + True + .\\..\\..\\keyfile.snk @@ -42,5 +47,4 @@ PreserveNewest - -- 2.45.3