Skip to content
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

[7.x] [ML] adding new flag exclude_generated that removes generated fields in GET config APIs (#63899)(#63092) #63177

Merged
merged 2 commits into from
Oct 20, 2020

Conversation

benwtrent
Copy link
Member

@benwtrent benwtrent commented Oct 2, 2020

Backports the following commits to 7.x:

@benwtrent benwtrent added :ml Machine learning backport labels Oct 2, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

@benwtrent
Copy link
Member Author

run elasticsearch-ci/packaging-sample-windows

…63092)

This adds the new `for_export` flag to the following APIs:

- GET _ml/anomaly_detection/<job_id>
- GET _ml/datafeeds/<datafeed_id>
- GET _ml/data_frame/analytics/<analytics_id>

The flag is designed for cloning or exporting configuration objects to later be put into the same cluster or a separate cluster.

The following fields are not returned in the objects:

- any field that is not user settable (e.g. version, create_time)
- any field that is a calculated default value (e.g. datafeed chunking_config)
- any field that would effectively require changing to be of use (e.g. datafeed job_id)
- any field that is automatically set via another Elastic stack process (e.g. anomaly job custom_settings.created_by)

closes elastic#63055
…in GET config APIs (elastic#63899)

When exporting and cloning ml configurations in a cluster it can be
frustrating to remove all the fields that were generated by
the plugin. Especially as the number of these fields change
from version to version.

This flag, exclude_generated, allows the GET config APIs to return
configurations with these generated fields removed.

APIs supporting this flag:
- GET _ml/anomaly_detection/<job_id>
- GET _ml/datafeeds/<datafeed_id>
- GET _ml/data_frame/analytics/<analytics_id>

The following fields are not returned in the objects:

- any field that is not user settable (e.g. version, create_time)
- any field that is a calculated default value (e.g. datafeed chunking_config)
- any field that is automatically set via another Elastic stack process (e.g. anomaly job custom_settings.created_by)

relates to elastic#63055
@benwtrent benwtrent changed the title [7.x] [ML] adding for_export flag for ml plugin GET resource APIs (#63092) [7.x] [ML] adding new flag exclude_generated that removes generated fields in GET config APIs (#63899)(#63092) Oct 20, 2020
@benwtrent
Copy link
Member Author

run elasticsearch-ci/packaging-sample-windows

@benwtrent benwtrent merged commit b9dc522 into elastic:7.x Oct 20, 2020
@benwtrent benwtrent deleted the backport/7.x/pr-63092 branch October 20, 2020 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :ml Machine learning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants