Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into brendon1982/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Jun 30, 2023
2 parents 58c6a52 + 5fd0c20 commit 86a892b
Show file tree
Hide file tree
Showing 21 changed files with 63 additions and 26 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -25,10 +25,11 @@ jobs:
git fetch --prune --unshallow --tags
echo exit code $?
git tag --list
- uses: actions/setup-dotnet@v1
# Install .NET version as mandated by global.json
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.408'
source-url: https://nuget.pkg.github.com/elastic/index.json
global-json-file: global.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MinVer" Version="2.3.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.0" PrivateAssets="all"/>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.3" PrivateAssets="all"/>
</ItemGroup>
</Project>
7 changes: 7 additions & 0 deletions Elastic.Abstractions.sln
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ ProjectSection(SolutionItems) = preProject
.github\workflows\ci.yml = .github\workflows\ci.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Ephemeral.Example", "examples\Elastic.Ephemeral.Example\Elastic.Ephemeral.Example.csproj", "{9666AFDC-B0E8-489C-A25A-17E67303A969}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -62,6 +64,7 @@ Global
{80DE8673-CB3E-4D0B-99F4-A5CECF6BE752} = {77E78EDE-60D5-469A-B431-443A7966A243}
{C05F7B36-EEF7-4BCD-86A2-F5F1BB8CFEB9} = {77E78EDE-60D5-469A-B431-443A7966A243}
{D6997ADC-E933-418E-831C-DE1A78897493} = {F75ACC18-D314-4F1F-88A3-2002EAC4E207}
{9666AFDC-B0E8-489C-A25A-17E67303A969} = {9D154338-4AA8-40A9-A378-B27C05D45791}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AFADDCED-A7DD-43E7-B03C-27F57AC5C358}
Expand Down Expand Up @@ -107,5 +110,9 @@ Global
{80DE8673-CB3E-4D0B-99F4-A5CECF6BE752}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80DE8673-CB3E-4D0B-99F4-A5CECF6BE752}.Release|Any CPU.ActiveCfg = Release|Any CPU
{80DE8673-CB3E-4D0B-99F4-A5CECF6BE752}.Release|Any CPU.Build.0 = Release|Any CPU
{9666AFDC-B0E8-489C-A25A-17E67303A969}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9666AFDC-B0E8-489C-A25A-17E67303A969}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9666AFDC-B0E8-489C-A25A-17E67303A969}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9666AFDC-B0E8-489C-A25A-17E67303A969}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion build/scripts/Targets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let private restoreTools = lazy(exec "dotnet" ["tool"; "restore"])
let private currentVersion =
lazy(
restoreTools.Value |> ignore
let r = Proc.Start("dotnet", "minver", "-d", "canary", "-m", "0.1")
let r = Proc.Start("dotnet", "minver", "-d=canary", "-m=0.1", "-v=e")
let o = r.ConsoleOut |> Seq.find (fun l -> not(l.Line.StartsWith("MinVer:")))
o.Line
)
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/scripts.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"isRoot": true,
"tools": {
"minver-cli": {
"version": "2.3.1",
"version": "4.3.0",
"commands": [
"minver"
]
},
"assembly-differ": {
"version": "0.13.0",
"version": "0.14.0",
"commands": [
"assembly-differ"
]
},
"release-notes": {
"version": "0.3.0",
"version": "0.5.2",
"commands": [
"release-notes"
]
},
"nupkg-validator": {
"version": "0.4.0",
"version": "0.5.0",
"commands": [
"nupkg-validator"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>False</IsPackable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Elastic.Elasticsearch.Ephemeral\Elastic.Elasticsearch.Ephemeral.csproj"/>
</ItemGroup>

</Project>
9 changes: 9 additions & 0 deletions examples/Elastic.Ephemeral.Example/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information

using Elastic.Elasticsearch.Ephemeral;

var config = new EphemeralClusterConfiguration("8.7.0");
var cluster = new EphemeralCluster(config);
using var started = cluster.Start();
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>False</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;net461</TargetFrameworks>
<TargetFrameworks>net6.0;net462</TargetFrameworks>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;net461</TargetFrameworks>
<TargetFrameworks>net6.0;net462</TargetFrameworks>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion examples/Elastic.Xunit.ExampleMinimal/ExampleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public ExampleTest(MyTestCluster cluster) =>
// 2) We do not want Elastic.Elasticsearch.Xunit to depend on NEST. Elastic.Elasticsearch.Xunit can start 2.x, 5.x and 6.x clusters
// and NEST Major.x is only tested and supported against Elasticsearch Major.x.
//
Client = cluster.GetOrAddClient<ElasticClient>(c =>
Client = cluster.GetOrAddClient(c =>
{
var nodes = cluster.NodesUris();
var connectionPool = new StaticConnectionPool(nodes);
Expand Down
2 changes: 1 addition & 1 deletion examples/ScratchPad/ScratchPad.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>False</IsPackable>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "5.0.408",
"version": "6.0.302",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<Description>Provides an EphemeralCluster implementation that can download/bootstrap/run a throwaway customizable Elasticsearch cluster</Description>
<PackageTags>elastic,elasticsearch,cluster,ephemeral</PackageTags>
</PropertyGroup>
Expand Down
11 changes: 8 additions & 3 deletions src/Elastic.Elasticsearch.Ephemeral/Tasks/IClusterComposeTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,14 @@ private static void ExecuteBinaryInternal(EphemeralClusterConfiguration config,
if (errorOut.Any() && config.Version < "5.2.0")
errorOut = errorOut.Where(e => !e.Line.Contains("No log4j2 configuration file found")).ToList();

if (errorOut.Any(e =>
!string.IsNullOrWhiteSpace(e.Line) && !e.Line.Contains("usage of JAVA_HOME is deprecated") && !e.Line.Contains("using ES_JAVA_HOME")) &&
!binary.Contains("plugin") && !binary.Contains("cert") )
errorOut = errorOut
.Where(e => !string.IsNullOrWhiteSpace(e.Line))
.Where(e => !e.Line.Contains("usage of JAVA_HOME is deprecated"))
.Where(e => !e.Line.Contains("using ES_JAVA_HOME"))
.Where(e => !e.Line.Trim().StartsWith("warning:"))
.ToList();

if (errorOut.Any() && !binary.Contains("plugin") && !binary.Contains("cert"))
throw new Exception(
$"Received error out with exitCode ({result.ExitCode}) while executing {description}: {command}");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<Description>
Provides an observable ElasticsearchNode abstraction that can be used to wrap an elasticsearch process.
Also ships with an cluster abstraction that can start one or more ElasticsearchNode's
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net461</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net462</TargetFrameworks>
<IsPackable>True</IsPackable>
<Description>Provides an Xunit test framework allowing you to run integration tests against local ephemeral Elasticsearch clusters</Description>
<PackageTags>elastic,elasticsearch,xunit,cluster,integration,test,ephemeral</PackageTags>
Expand Down
2 changes: 1 addition & 1 deletion src/Elastic.Elasticsearch.Xunit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class ExampleTest : IClusterFixture<MyTestCluster>
var settings = new ConnectionSettings(connectionPool)
.EnableDebugMode();
return new ElasticClient(settings);
);
});
}

private ElasticClient Client { get; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<Description>Provides a set of classes to resolve the location of Elastic stack products in various stages: released, snapshot and build candidates</Description>
<PackageTags>elastic,elasticsearch,stack,versioning,artifacts</PackageTags>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Nest.TypescriptExporter/Nest.TypescriptExporter.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>False</IsPackable>
<SignAssembly>False</SignAssembly>
</PropertyGroup>
Expand Down

0 comments on commit 86a892b

Please sign in to comment.