Skip to content

Deprecate the ability to update datafeed's job_id #4137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 21, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public partial interface IUpdateDatafeedRequest
/// <summary>
/// A numerical character string that uniquely identifies the job.
/// </summary>
[Obsolete("As of 7.4.0 the ability to associate a feed with a different job is being deprecated as it adds unnecessary complexity")]
[DataMember(Name ="job_id")]
Id JobId { get; set; }

Expand Down Expand Up @@ -85,6 +86,7 @@ public partial class UpdateDatafeedRequest
public Indices Indices { get; set; }

/// <inheritdoc />
[Obsolete("As of 7.4.0 the ability to associate a feed with a different job is being deprecated as it adds unnecessary complexity")]
public Id JobId { get; set; }

/// <inheritdoc />
Expand Down Expand Up @@ -133,6 +135,7 @@ public UpdateDatafeedDescriptor<TDocument> ChunkingConfig(Func<ChunkingConfigDes
public UpdateDatafeedDescriptor<TDocument> AllIndices() => Indices(Nest.Indices.All);

/// <inheritdoc />
[Obsolete("As of 7.4.0 the ability to associate a feed with a different job is being deprecated as it adds unnecessary complexity")]
public UpdateDatafeedDescriptor<TDocument> JobId(Id jobId) => Assign(jobId, (a, v) => a.JobId = v);

/// <inheritdoc />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public UpdateDatafeedApiTests(MachineLearningCluster cluster, EndpointUsage usag
protected override object ExpectJson => new
{
indices = new[] { "server-metrics" },
job_id = CallIsolatedValue,
query = new
{
match_all = new
Expand All @@ -33,7 +32,6 @@ public UpdateDatafeedApiTests(MachineLearningCluster cluster, EndpointUsage usag

protected override Func<UpdateDatafeedDescriptor<Metric>, IUpdateDatafeedRequest> Fluent => f => f
.Indices("server-metrics") //goes on body not in the url
.JobId(CallIsolatedValue)
.Query(q => q
.MatchAll(m => m.Boost(2))
);
Expand All @@ -43,7 +41,6 @@ public UpdateDatafeedApiTests(MachineLearningCluster cluster, EndpointUsage usag
protected override UpdateDatafeedRequest Initializer =>
new UpdateDatafeedRequest(CallIsolatedValue + "-datafeed")
{
JobId = CallIsolatedValue,
Indices = "server-metrics",
Query = new MatchAllQuery
{
Expand Down