Skip to content

Commit

Permalink
fix: remove gRPC Core
Browse files Browse the repository at this point in the history
  • Loading branch information
lemaitre-aneo committed May 6, 2024
1 parent 6812303 commit e63dfd5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 49 deletions.
7 changes: 2 additions & 5 deletions Client/src/Common/ArmoniK.DevelopmentKit.Client.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ArmoniK.Api.Client" Version="3.17.0" />
<PackageReference Include="Grpc.Core" Version="2.46.6" />
<PackageReference Include="ArmoniK.Api.Client" Version="3.17.2-flremovegrpccore.1.d0aa290" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 0 additions & 15 deletions Client/src/Common/Submitter/ChannelPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,6 @@ private static bool ShutdownOnFailure(ChannelBase channel)
{
switch (channel)
{
case Channel chan:
switch (chan.State)
{
case ChannelState.TransientFailure:
chan.ShutdownAsync()
.Wait();
return true;
case ChannelState.Shutdown:
return true;
case ChannelState.Idle:
case ChannelState.Connecting:
case ChannelState.Ready:
default:
return false;
}
#if NET5_0_OR_GREATER
case GrpcChannel chan:
switch (chan.State)
Expand Down
19 changes: 0 additions & 19 deletions Client/src/Common/Submitter/ClientServiceConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;

using ArmoniK.Api.Client.Options;
using ArmoniK.Api.Client.Submitter;

Expand Down Expand Up @@ -49,23 +47,6 @@ public static ChannelPool ControlPlaneConnectionPool(Properties properties,
OverrideTargetName = properties.TargetNameOverride,
};

if (properties.ControlPlaneUri.Scheme == Uri.UriSchemeHttps && options.AllowUnsafeConnection && string.IsNullOrEmpty(options.OverrideTargetName))
{
#if NET5_0_OR_GREATER
var doOverride = !string.IsNullOrEmpty(options.CaCert);
#else
var doOverride = true;
#endif
if (doOverride)
{
// Doing it here once to improve performance
options.OverrideTargetName = GrpcChannelFactory.GetOverrideTargetName(options,
GrpcChannelFactory.GetServerCertificate(properties.ControlPlaneUri,
options)) ?? "";
}
}


return new ChannelPool(() => GrpcChannelFactory.CreateChannel(options,
loggerFactory?.CreateLogger(typeof(ClientServiceConnector))));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ArmoniK.Api.Common" Version="3.17.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="ArmoniK.Api.Common" Version="3.17.2-flremovegrpccore.1.d0aa290" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="System.Text.Json" Version="7.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Worker/src/Common/ArmoniK.DevelopmentKit.Worker.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
<OutputType>Library</OutputType>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ArmoniK.Api.Worker" Version="3.17.0" />
<PackageReference Include="ArmoniK.Api.Worker" Version="3.17.2-flremovegrpccore.1.d0aa290" />
<PackageReference Include="AWSSDK.S3" Version="3.7.106.1" />
<!-- AWSSDK.SecurityToken is used by AWSSDK.S3 to automatically get credentials from pod secrets -->
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.103.16" />
Expand Down

0 comments on commit e63dfd5

Please sign in to comment.