Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/scripts/ReleaseNotes.fs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module ReleaseNotes =
("Uncategorized", "Uncategorized")
]
uncategorized = "Uncategorized"
};
}

let groupByLabel (config: Config) (items: List<GitHubItem>) =
let dict = Dictionary<string, GitHubItem list>()
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/XmlDocPatcher.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module InheritDoc =
relatedInterfaceDescriptorRequest;
relatedInterfaceDescriptorGeneric;
manualMapping
];
]

let private documentedApis (file:string) =
use reader = XmlReader.Create file
Expand Down
9 changes: 9 additions & 0 deletions src/Nest/Ingest/Pipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public interface IPipeline

[DataMember(Name ="processors")]
IEnumerable<IProcessor> Processors { get; set; }

[DataMember(Name = "version")]
long? Version { get; set; }
}

public class Pipeline : IPipeline
Expand All @@ -30,13 +33,16 @@ public class Pipeline : IPipeline
public IEnumerable<IProcessor> OnFailure { get; set; }

public IEnumerable<IProcessor> Processors { get; set; }

public long? Version { get; set; }
}

public class PipelineDescriptor : DescriptorBase<PipelineDescriptor, IPipeline>, IPipeline
{
string IPipeline.Description { get; set; }
IEnumerable<IProcessor> IPipeline.OnFailure { get; set; }
IEnumerable<IProcessor> IPipeline.Processors { get; set; }
long? IPipeline.Version { get; set; }

/// <inheritdoc />
public PipelineDescriptor Description(string description) => Assign(description, (a, v) => a.Description = v);
Expand All @@ -54,5 +60,8 @@ public PipelineDescriptor Processors(Func<ProcessorsDescriptor, IPromise<IList<I
/// <inheritdoc />
public PipelineDescriptor OnFailure(Func<ProcessorsDescriptor, IPromise<IList<IProcessor>>> selector) =>
Assign(selector, (a, v) => a.OnFailure = v?.Invoke(new ProcessorsDescriptor())?.Value);

/// <inheritdoc />
public PipelineDescriptor Version(long? version = null) => Assign(version, (a, v) => a.Version = v);
}
}
2 changes: 0 additions & 2 deletions src/Nest/Ingest/Processor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,5 @@ public TProcessorDescriptor OnFailure(Func<ProcessorsDescriptor, IPromise<IList<

/// <inheritdoc cref="IProcessor.IgnoreFailure"/>
public TProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true) => Assign(ignoreFailure, (a, v) => a.IgnoreFailure = v);

}

}
5 changes: 5 additions & 0 deletions src/Nest/Ingest/PutPipeline/PutPipelineRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ public partial class PutPipelineRequest
public string Description { get; set; }
public IEnumerable<IProcessor> OnFailure { get; set; }
public IEnumerable<IProcessor> Processors { get; set; }
public long? Version { get; set; }
}

public partial class PutPipelineDescriptor
{
string IPipeline.Description { get; set; }
IEnumerable<IProcessor> IPipeline.OnFailure { get; set; }
IEnumerable<IProcessor> IPipeline.Processors { get; set; }
long? IPipeline.Version { get; set; }

/// <inheritdoc />
public PutPipelineDescriptor Description(string description) => Assign(description, (a, v) => a.Description = v);
Expand All @@ -39,5 +41,8 @@ public PutPipelineDescriptor Processors(Func<ProcessorsDescriptor, IPromise<ILis
/// <inheritdoc />
public PutPipelineDescriptor OnFailure(Func<ProcessorsDescriptor, IPromise<IList<IProcessor>>> selector) =>
Assign(selector, (a, v) => a.OnFailure = v?.Invoke(new ProcessorsDescriptor())?.Value);

/// <inheritdoc />
public PutPipelineDescriptor Version(long? version = null) => Assign(version, (a, v) => a.Version = v);
}
}
2 changes: 1 addition & 1 deletion tests/Tests.Configuration/tests.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# tracked by git).

# mode either u (unit test), i (integration test) or m (mixed mode)
mode: u
mode: i

# the elasticsearch version that should be started
# Can be a snapshot version of sonatype or "latest" to get the latest snapshot of sonatype
Expand Down
3 changes: 3 additions & 0 deletions tests/Tests.YamlRunner/SkipList.fs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ let SkipList = dict<SkipFile,SkipSection> [
SkipFile "search.aggregation/180_percentiles_tdigest_metric.yml", Section "Invalid params test"
SkipFile "search.aggregation/190_percentiles_hdr_metric.yml", Section "Invalid params test"

// New range test fails to parse - SharpYaml.SyntaxErrorException: (Lin: 15, Col: 26, Chr: 352) - (Lin: 15, Col: 39, Chr: 365): While scanning a plain scalar, find unexpected ':'.
SkipFile "search.aggregation/40_range.yml", Section "Range aggregation on date field"

// Test looks for "testnode.crt", but "ca.crt" is returned first
SkipFile "ssl/10_basic.yml", Section "Test get SSL certificates"

Expand Down
7 changes: 5 additions & 2 deletions tests/Tests/Ingest/PipelineCrudTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ protected override void ExpectAfterCreate(GetPipelineResponse response)

var pipeline = kv.Value;
pipeline.Description.Should().NotBeNull();
pipeline.Version.Should().BeGreaterOrEqualTo(1);

var processors = pipeline.Processors;
processors.Should().NotBeNull().And.HaveCount(2);
Expand Down Expand Up @@ -66,7 +67,8 @@ protected override void ExpectAfterCreate(GetPipelineResponse response)
Field = Infer.Field<Project>(p => p.NumberOfCommits),
Value = 0
}
}
},
Version = 1
};

private IPutPipelineRequest CreateFluent(string pipelineId, PutPipelineDescriptor d) => d
Expand All @@ -79,7 +81,8 @@ private IPutPipelineRequest CreateFluent(string pipelineId, PutPipelineDescripto
.Field(p => p.NumberOfCommits)
.Value(0)
)
);
)
.Version(1);

protected override LazyResponses Read() => Calls<GetPipelineDescriptor, GetPipelineRequest, IGetPipelineRequest, GetPipelineResponse>(
id => new GetPipelineRequest(id),
Expand Down