Skip to content

Commit

Permalink
Fix CI resolving to bundled JDK (#3987)
Browse files Browse the repository at this point in the history
* Update abstractions to version that prints JAVA_HOME just before starting elasticsearch and forces it on the Process instance

* update abstractions

* SkipVersion SNAPSHOT failing tests for now

* Make sure we take `body: null` into account from the spec and not send any body if no body is documented we relied on serializing empty bodies but the server is now (rightfully) much stricter here.

elastic/elasticsearch#44902

* Run codegen for SupportsBody

* Un skipped test failures due to sending bodies where non was expected

* Fix root node info tests when running against snapshots

* Audit trail test assumed timespan is never TimeSpan.Zero but of course can be (#3989)


(cherry picked from commit 79a71ac)
  • Loading branch information
Mpdreamz authored Aug 7, 2019
1 parent ad16fab commit c4146ec
Show file tree
Hide file tree
Showing 101 changed files with 2,526 additions and 1,981 deletions.
2 changes: 1 addition & 1 deletion build/scripts/scripts.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Bullseye" Version="2.4.0-rc.2" />
<PackageReference Include="Elastic.Managed" Version="0.1.0-ci20190724T022011" />
<PackageReference Include="Elastic.Managed" Version="0.1.0-ci20190802T092611" />
<PackageReference Include="Fake.Core.Environment" Version="5.15.0" />
<PackageReference Include="Fake.Core.SemVer" Version="5.15.0" />
<PackageReference Include="Fake.IO.FileSystem" Version="5.15.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ namespace Elasticsearch.Net@(ns)
@foreach (var endpoint in endpoints)
{
var r = endpoint.RequestParameterImplementation;
var supportsBody = endpoint.Body != null;
var names = r.CsharpNames;
<text>
///<summary>Request options for @names.MethodName <para>@r.OfficialDocumentationLink</para></summary>
public class @names.ParametersName : RequestParameters<@names.ParametersName>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.@r.HttpMethod;
public override bool SupportsBody => @(supportsBody ? "true" : "false");
@foreach (var param in r.Params)
{
<text> @Raw(param.InitializerGenerator(param.TypeLowLevel, param.ClsName, param.QueryStringKey, param.SetterLowLevel, param.Description))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace Elasticsearch.Net
public interface IRequestParameters
{
HttpMethod DefaultHttpMethod { get; }

bool SupportsBody { get; }

/// <summary> Allows you to completely circumvent the serializer to build the final response.</summary>
CustomResponseBuilderBase CustomResponseBuilder { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
// ReSharper disable once CheckNamespace
namespace Elasticsearch.Net.Specification.CatApi
{
///<summary>Request options for Aliases <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html</para></summary>
///<summary>Request options for Aliases <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html</para></summary>
public class CatAliasesRequestParameters : RequestParameters<CatAliasesRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
Expand Down Expand Up @@ -78,10 +79,11 @@ public bool? Verbose
}
}

///<summary>Request options for Allocation <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html</para></summary>
///<summary>Request options for Allocation <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html</para></summary>
public class CatAllocationRequestParameters : RequestParameters<CatAllocationRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>The unit in which to display byte values</summary>
public Bytes? Bytes
{
Expand Down Expand Up @@ -139,10 +141,11 @@ public bool? Verbose
}
}

///<summary>Request options for Count <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html</para></summary>
///<summary>Request options for Count <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html</para></summary>
public class CatCountRequestParameters : RequestParameters<CatCountRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
Expand Down Expand Up @@ -193,10 +196,11 @@ public bool? Verbose
}
}

///<summary>Request options for Fielddata <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html</para></summary>
///<summary>Request options for Fielddata <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html</para></summary>
public class CatFielddataRequestParameters : RequestParameters<CatFielddataRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>The unit in which to display byte values</summary>
public Bytes? Bytes
{
Expand Down Expand Up @@ -261,10 +265,11 @@ public bool? Verbose
}
}

///<summary>Request options for Health <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html</para></summary>
///<summary>Request options for Health <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html</para></summary>
public class CatHealthRequestParameters : RequestParameters<CatHealthRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
Expand Down Expand Up @@ -322,10 +327,11 @@ public bool? Verbose
}
}

///<summary>Request options for Help <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html</para></summary>
///<summary>Request options for Help <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html</para></summary>
public class CatHelpRequestParameters : RequestParameters<CatHelpRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>Return help information</summary>
public bool? Help
{
Expand All @@ -341,10 +347,11 @@ public string[] SortByColumns
}
}

///<summary>Request options for Indices <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html</para></summary>
///<summary>Request options for Indices <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html</para></summary>
public class CatIndicesRequestParameters : RequestParameters<CatIndicesRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>The unit in which to display byte values</summary>
public Bytes? Bytes
{
Expand Down Expand Up @@ -416,10 +423,11 @@ public bool? Verbose
}
}

///<summary>Request options for Master <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html</para></summary>
///<summary>Request options for Master <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html</para></summary>
public class CatMasterRequestParameters : RequestParameters<CatMasterRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
Expand Down Expand Up @@ -470,10 +478,11 @@ public bool? Verbose
}
}

///<summary>Request options for NodeAttributes <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html</para></summary>
///<summary>Request options for NodeAttributes <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html</para></summary>
public class CatNodeAttributesRequestParameters : RequestParameters<CatNodeAttributesRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
Expand Down Expand Up @@ -524,10 +533,11 @@ public bool? Verbose
}
}

///<summary>Request options for Nodes <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html</para></summary>
///<summary>Request options for Nodes <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html</para></summary>
public class CatNodesRequestParameters : RequestParameters<CatNodesRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
Expand Down Expand Up @@ -585,10 +595,11 @@ public bool? Verbose
}
}

///<summary>Request options for PendingTasks <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html</para></summary>
///<summary>Request options for PendingTasks <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html</para></summary>
public class CatPendingTasksRequestParameters : RequestParameters<CatPendingTasksRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
Expand Down Expand Up @@ -639,10 +650,11 @@ public bool? Verbose
}
}

///<summary>Request options for Plugins <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html</para></summary>
///<summary>Request options for Plugins <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html</para></summary>
public class CatPluginsRequestParameters : RequestParameters<CatPluginsRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
Expand Down Expand Up @@ -693,10 +705,11 @@ public bool? Verbose
}
}

///<summary>Request options for Recovery <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html</para></summary>
///<summary>Request options for Recovery <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html</para></summary>
public class CatRecoveryRequestParameters : RequestParameters<CatRecoveryRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>The unit in which to display byte values</summary>
public Bytes? Bytes
{
Expand Down Expand Up @@ -747,10 +760,11 @@ public bool? Verbose
}
}

///<summary>Request options for Repositories <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html</para></summary>
///<summary>Request options for Repositories <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html</para></summary>
public class CatRepositoriesRequestParameters : RequestParameters<CatRepositoriesRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
Expand Down Expand Up @@ -801,10 +815,11 @@ public bool? Verbose
}
}

///<summary>Request options for Segments <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html</para></summary>
///<summary>Request options for Segments <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html</para></summary>
public class CatSegmentsRequestParameters : RequestParameters<CatSegmentsRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>The unit in which to display byte values</summary>
public Bytes? Bytes
{
Expand Down Expand Up @@ -848,10 +863,11 @@ public bool? Verbose
}
}

///<summary>Request options for Shards <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html</para></summary>
///<summary>Request options for Shards <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html</para></summary>
public class CatShardsRequestParameters : RequestParameters<CatShardsRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>The unit in which to display byte values</summary>
public Bytes? Bytes
{
Expand Down Expand Up @@ -909,10 +925,11 @@ public bool? Verbose
}
}

///<summary>Request options for Snapshots <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html</para></summary>
///<summary>Request options for Snapshots <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html</para></summary>
public class CatSnapshotsRequestParameters : RequestParameters<CatSnapshotsRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
Expand Down Expand Up @@ -963,10 +980,11 @@ public bool? Verbose
}
}

///<summary>Request options for Tasks <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html</para></summary>
///<summary>Request options for Tasks <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html</para></summary>
public class CatTasksRequestParameters : RequestParameters<CatTasksRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>A comma-separated list of actions that should be returned. Leave empty to return all.</summary>
public string[] Actions
{
Expand Down Expand Up @@ -1034,10 +1052,11 @@ public bool? Verbose
}
}

///<summary>Request options for Templates <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html</para></summary>
///<summary>Request options for Templates <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html</para></summary>
public class CatTemplatesRequestParameters : RequestParameters<CatTemplatesRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
Expand Down Expand Up @@ -1088,10 +1107,11 @@ public bool? Verbose
}
}

///<summary>Request options for ThreadPool <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html</para></summary>
///<summary>Request options for ThreadPool <para>http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html</para></summary>
public class CatThreadPoolRequestParameters : RequestParameters<CatThreadPoolRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
Expand Down
Loading

0 comments on commit c4146ec

Please sign in to comment.