Skip to content

Commit

Permalink
upgraded grpc & protobuf packages
Browse files Browse the repository at this point in the history
minor tweaks
  • Loading branch information
RagingKore committed Dec 1, 2023
1 parent f924ab4 commit f90efca
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 63 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<DebugType Condition=" '$(Configuration)' == 'Release' ">pdbonly</DebugType>

<UseLinkBase>true</UseLinkBase>
<GrpcPackageVersion>2.49.0</GrpcPackageVersion>
<GrpcToolsPackageVersion>2.50.0</GrpcToolsPackageVersion>
<GrpcPackageVersion>2.59.0</GrpcPackageVersion>
<GrpcToolsPackageVersion>2.59.0</GrpcToolsPackageVersion>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions src/EventStore.Client/EventStore.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<PackageId>EventStore.Client.Grpc</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.21.9" />
<PackageReference Include="Google.Protobuf" Version="3.25.1" />
<PackageReference Include="Grpc.Net.Client" Version="$(GrpcPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
<ProjectReference Include="..\..\src\EventStore.Client.UserManagement\EventStore.Client.UserManagement.csproj" />
<ProjectReference Include="..\..\src\EventStore.Client\EventStore.Client.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Update="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
Expand All @@ -34,6 +27,14 @@
<PackageReference Include="System.Reactive" Version="6.0.0" />
</ItemGroup>

<!-- Vulnerable Transitive Packages -->
<ItemGroup>
<!-- https://github.com/advisories/GHSA-7jgj-8wvc-jh57 -->
<PackageReference Include="System.Net.Http " Version="4.3.4" />
<!-- https://github.com/advisories/GHSA-cmhx-cq75-c4mj -->
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
<Content Include="..\..\certs\**\*">
<Link>certs\%(RecursiveDir)/%(FileName)%(Extension)</Link>
Expand Down
9 changes: 3 additions & 6 deletions test/EventStore.Client.Tests.Common/Facts/AnonymousAccess.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
namespace EventStore.Client.Tests;

[PublicAPI]
public class AnonymousAccess {
static readonly Version LegacySince = new(23, 6);
static readonly string SkipMessage = "Anonymous access is turned off since v23.6.0!";

public class FactAttribute : Deprecation.FactAttribute {
public FactAttribute() : base(LegacySince, SkipMessage) { }
}
public class FactAttribute() : Deprecation.FactAttribute(LegacySince, SkipMessage);

public class TheoryAttribute : Deprecation.TheoryAttribute {
public TheoryAttribute() : base(LegacySince, SkipMessage) { }
}
public class TheoryAttribute() : Deprecation.TheoryAttribute(LegacySince, SkipMessage);
}
13 changes: 3 additions & 10 deletions test/EventStore.Client.Tests.Common/Facts/Deprecation.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
namespace EventStore.Client.Tests;

[PublicAPI]
public class Deprecation {
public class FactAttribute : Xunit.FactAttribute {
readonly Version _legacySince;
readonly string _skipMessage;

public FactAttribute(Version since, string skipMessage) {
_legacySince = since;
_skipMessage = skipMessage;
}

public class FactAttribute(Version since, string skipMessage) : Xunit.FactAttribute {
public override string? Skip {
get => EventStoreTestServer.Version >= _legacySince ? _skipMessage : null;
get => EventStoreTestServer.Version >= since ? skipMessage : null;
set => throw new NotSupportedException();
}
}
Expand Down
25 changes: 5 additions & 20 deletions test/EventStore.Client.Tests.Common/Facts/Regression.cs
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
namespace EventStore.Client.Tests;

[PublicAPI]
public class Regression {
public class FactAttribute : Xunit.FactAttribute {
readonly int _major;
readonly string _skipMessage;

public FactAttribute(int major, string skipMessage) {
_major = major;
_skipMessage = skipMessage;
}

public class FactAttribute(int major, string skipMessage) : Xunit.FactAttribute {
public override string? Skip {
get => (EventStoreTestServer.Version?.Major ?? int.MaxValue) < _major ? _skipMessage : null;
get => (EventStoreTestServer.Version?.Major ?? int.MaxValue) < major ? skipMessage : null;
set => throw new NotSupportedException();
}
}

public class TheoryAttribute : Xunit.TheoryAttribute {
readonly int _major;
readonly string _skipMessage;

public TheoryAttribute(int major, string skipMessage) {
_major = major;
_skipMessage = skipMessage;
}

public class TheoryAttribute(int major, string skipMessage) : Xunit.TheoryAttribute {
public override string? Skip {
get => (EventStoreTestServer.Version?.Major ?? int.MaxValue) < _major ? _skipMessage : null;
get => (EventStoreTestServer.Version?.Major ?? int.MaxValue) < major ? skipMessage : null;
set => throw new NotSupportedException();
}
}
Expand Down
11 changes: 5 additions & 6 deletions test/EventStore.Client.Tests.Common/Facts/SupportsPSToAllFact.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// ReSharper disable InconsistentNaming

namespace EventStore.Client.Tests;

[PublicAPI]
public class SupportsPSToAll {
const int SupportedFromMajorVersion = 21;

Expand All @@ -9,11 +12,7 @@ public class SupportsPSToAll {
public static bool No => !Yes;
public static bool Yes => (EventStoreTestServer.Version?.Major ?? int.MaxValue) >= SupportedFromMajorVersion;

public class FactAttribute : Regression.FactAttribute {
public FactAttribute() : base(SupportedFromMajorVersion, SkipMessage) { }
}
public class FactAttribute() : Regression.FactAttribute(SupportedFromMajorVersion, SkipMessage);

public class TheoryAttribute : Regression.TheoryAttribute {
public TheoryAttribute() : base(SupportedFromMajorVersion, SkipMessage) { }
}
public class TheoryAttribute() : Regression.TheoryAttribute(SupportedFromMajorVersion, SkipMessage);
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public EventStoreTestServer(
};

var env = new Dictionary<string, string> {
["EVENTSTORE_DB_LOG_FORMAT"] = GlobalEnvironment.DbLogFormat,
["EVENTSTORE_DB_LOG_FORMAT"] = "V2",
["EVENTSTORE_MEM_DB"] = "true",
["EVENTSTORE_CHUNK_SIZE"] = (1024 * 1024).ToString(),
["EVENTSTORE_CERTIFICATE_FILE"] = "/etc/eventstore/certs/node/node.crt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ public static EventStoreFixtureOptions DefaultOptions() {
["EVENTSTORE_DISCOVER_VIA_DNS"] = "false",
["EVENTSTORE_ENABLE_EXTERNAL_TCP"] = "false",
["EVENTSTORE_STREAM_EXISTENCE_FILTER_SIZE"] = "10000",
["EVENTSTORE_STREAM_INFO_CACHE_CAPACITY"] = "10000",
["EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP"] = "true" // why true?
["EVENTSTORE_STREAM_INFO_CACHE_CAPACITY"] = "10000"
};

return new(defaultSettings, defaultEnvironment);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Ductus.FluentDocker;
using Ductus.FluentDocker.Builders;
using Ductus.FluentDocker.Common;
using Ductus.FluentDocker.Services;
Expand Down
3 changes: 0 additions & 3 deletions test/EventStore.Client.Tests.Common/GlobalEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ static GlobalEnvironment() {
UseCluster = Application.Configuration.GetValue<bool>("ES_USE_CLUSTER");
UseExternalServer = Application.Configuration.GetValue<bool>("ES_USE_EXTERNAL_SERVER");
DockerImage = Application.Configuration.GetValue<string>("ES_DOCKER_IMAGE")!;
DbLogFormat = Application.Configuration.GetValue<string>("EVENTSTORE_DB_LOG_FORMAT")!;

Variables = Application.Configuration.AsEnumerable()
.Where(x => x.Key.StartsWith("ES_") || x.Key.StartsWith("EVENTSTORE_"))
Expand All @@ -30,7 +29,6 @@ static void EnsureDefaults(IConfiguration configuration) {
configuration.EnsureValue("EVENTSTORE_MEM_DB", "false");
configuration.EnsureValue("EVENTSTORE_RUN_PROJECTIONS", "None");
configuration.EnsureValue("EVENTSTORE_START_STANDARD_PROJECTIONS", "false");
configuration.EnsureValue("EVENTSTORE_DB_LOG_FORMAT", "V2");
configuration.EnsureValue("EVENTSTORE_LOG_LEVEL", "Verbose");
configuration.EnsureValue("EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH", "/etc/eventstore/certs/ca");

Expand All @@ -43,7 +41,6 @@ static void EnsureDefaults(IConfiguration configuration) {
public static bool UseCluster { get; }
public static bool UseExternalServer { get; }
public static string DockerImage { get; }
public static string DbLogFormat { get; }

#region . Obsolete .

Expand Down
2 changes: 1 addition & 1 deletion test/EventStore.Client.Tests.Common/shared.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ EVENTSTORE_HTTP_PORT=2113
EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/eventstore/certs/ca
EVENTSTORE_DISCOVER_VIA_DNS=false
EVENTSTORE_ENABLE_EXTERNAL_TCP=false
EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true
EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=false
EVENTSTORE_STREAM_EXISTENCE_FILTER_SIZE=10000

# pass through from environment
Expand Down
4 changes: 2 additions & 2 deletions test/EventStore.Client.Tests/EventStore.Client.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoFixture.Idioms" Version="4.18.0" />
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.0" />
<PackageReference Include="AutoFixture.Idioms" Version="4.18.1" />
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" />
<PackageReference Include="Grpc.AspNetCore" Version="$(GrpcPackageVersion)" />
<PackageReference Include="Grpc.Tools" Version="$(GrpcToolsPackageVersion)">
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit f90efca

Please sign in to comment.