Skip to content

Conversation

@benwtrent
Copy link
Member

@benwtrent benwtrent commented Jun 21, 2019

I opted for the name allow_no_transforms in the APIs. This is for parity with ml jobs and datafeeds.

The only peculiar endpoint is _stats. If nothing is found, the current behavior is NOT to throw, but to return empty. Do we want to support this parameter in that API and do we want it to cause that endpoint to return a 404? I basically added the parameter, but it does not do much really.

closes #42766

Adds support for:
* Get Transforms
* Get Transforms stats
* stop transforms
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

@dimitris-athanasiou
Copy link
Contributor

I suggest we drop the paradigm we followed for jobs and datafeeds and adopt allow_no_match from now on. The paradigm of allow_no_<resource_name> is introducing a new parameter name each time we add a resource and it doesn't work great with long named resources. I also think allow_no_match better describes what the parameter actually does. We can reestablish consistency by deprecating the current parameters for jobs and datafeeds and introduce allow_no_match there as well.

@benwtrent
Copy link
Member Author

@dimitris-athanasiou I am all for it. I will adjust this PR :)

@droberts195 droberts195 changed the title [ML][Data Frame] Add support for allow_no_transforms for endpoints [ML][Data Frame] Add support for allow_no_match for endpoints Jun 25, 2019
Copy link

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few places, admittedly not user facing, where the old names are still used. But for the sake of maintainers I think it would be nice to make all the names consistent.


private final List<String> ids;
private PageParams pageParams;
private Boolean allowNoTransforms;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be less confusing to also rename the member variable.

public class GetDataFrameTransformStatsRequest implements Validatable {
private final String id;
private PageParams pageParams;
private Boolean allowNoTransforms;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be less confusing to also rename the member variable.

private final String id;
private Boolean waitForCompletion;
private TimeValue timeout;
private Boolean allowNoTransforms;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be less confusing to also rename the member variable.

public static class Request extends BaseTasksRequest<Request> {
private final String id;
private PageParams pageParams = PageParams.defaultParams();
private boolean allowNoResources = true;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename allowNoResources to allowNoMatch throughout this file, including the getter and setter.

private final String id;
private final boolean waitForCompletion;
private final boolean force;
private final boolean allowNoResources;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename allowNoResources to allowNoMatch throughout this file, including the getter and setter.

@benwtrent
Copy link
Member Author

@elasticmachine update branch

Copy link

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@benwtrent benwtrent merged commit 9084418 into elastic:master Jun 26, 2019
@benwtrent benwtrent deleted the feature/ml-df-add-allow_no_match branch June 26, 2019 11:55
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Jun 26, 2019
…c#43490)

* [ML][Data Frame] Add support for allow_no_match parameter in endpoints

Adds support for:
* Get Transforms
* Get Transforms stats
* stop transforms
benwtrent added a commit that referenced this pull request Jun 26, 2019
…43490) (#43637)

* [ML][Data Frame] Add support for allow_no_match for endpoints (#43490)

* [ML][Data Frame] Add support for allow_no_match parameter in endpoints

Adds support for:
* Get Transforms
* Get Transforms stats
* stop transforms

* Update DataFrameTransformDocumentationIT.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ML] Add allow_no_match param to data frame transform APIs

5 participants