-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[ML] Clone analytics job #59791
[ML] Clone analytics job #59791
Conversation
Pinging @elastic/ml-ui (:ml) |
Gave this a quick test, and I think we also need to handle cloning of an analytics job which was created using the advanced editor. For example, I switched to the advanced editor and added one of the optional params documented here. When I then clone that job, the flyout opens in the standard 'form' mode and my advanced parameter is lost. We should probably check to see if the job config contains fields or values which aren't editable in the form editor, and if so, switch the flyout to the advanced mode. |
Great addition overall! 😄 Thanks for your work on this. Just have a couple of questions/comments. Everything works as expected, aside from the issue below. Even though the This can cause an override of the cloned value if the origin job had a source index that is not an index pattern (created via dev tools, for example) You can see the Would it be worth ensuring that extra |
...on/data_frame_analytics/pages/analytics_management/components/analytics_list/action_clone.ts
Outdated
Show resolved
Hide resolved
I am having a few issues where the cloned model memory limit is cleared and set back to the default, which is below the minimum required, so the attempt to start the job fails after saving (I have been using the bank classification job from the ML QA dev bootstrap df_analytics suite). |
...ion/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts
Outdated
Show resolved
Hide resolved
…lytics_button.tsx
…-clone-analytics-jobs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and LGTM. Just some minor comments on the code.
source: { | ||
index: ['glass_withoutdupl_norm'], | ||
query: { | ||
// TODO check default for `match` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to leave in this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed one of the outlier detection jobs (created by env bootstrap) has query match
instead of match_all
. As I saw in all the other cases match_all
is a default, so probably it's just a typo in a bootstrap job.
...n/data_frame_analytics/pages/analytics_management/components/analytics_list/action_clone.tsx
Outdated
Show resolved
Hide resolved
...n/data_frame_analytics/pages/analytics_management/components/analytics_list/action_clone.tsx
Outdated
Show resolved
Hide resolved
...ta_frame_analytics/pages/analytics_management/components/analytics_list/action_clone.test.ts
Outdated
Show resolved
Hide resolved
...ta_frame_analytics/pages/analytics_management/components/analytics_list/action_clone.test.ts
Outdated
Show resolved
Hide resolved
I'm having an issue creating new analytics jobs - when I click 'create' on the form after filling it in I get a blank screen with this in the console. I'm only seeing this when it's the very first analytics job being created. Also, the |
Thanks @alvarezmelissa87 , good spot with excluded options and missing input ref! Just pushed the fixes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested latest edits, and LGTM. I didn't test the issue you found @alvarezmelissa87 when creating your first analytics job - would you be able to confirm that is fixed for you please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest edits LGTM ⚡️
…s-jobs # Conflicts: # x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/create_analytics_form/create_analytics_form.tsx # x-pack/test/functional/services/machine_learning/api.ts
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* [ML] clone analytics job * [ML] flyout clone header * [ML] improve clone action context menu item * [ML] support advanced job cloning * [ML] extractCloningConfig * [ML] fix isAdvancedSetting condition, add test * [ML] clone job header * [ML] job description placeholder * [ML] setEstimatedModelMemoryLimit on source index change * [ML] Fix types. * [ML] useUpdateEffect in create_analytics_form.tsx * [ML] setJobClone action * [ML] remove CreateAnalyticsFlyoutWrapper instance from the create_analytics_button.tsx * [ML] fix types * [ML] hack to align Clone button with the other actions * [ML] unknown props lead to advanced editor * [ML] rename maximum_number_trees ot max_trees * [ML] fix forceInput * [ML] populate excludesOptions on the first update, skip setting mml on the fist update * [ML] init functional test for cloning analytics jobs * [ML] functional tests * [ML] fix functional tests imports * [ML] fix indices names for functional tests * [ML] functional tests for outlier detection and regression jobs cloning * [ML] delete james tag * [ML] fix tests arrangement Co-authored-by: Walter Rafelsberger <[email protected]>
* [ML] clone analytics job * [ML] flyout clone header * [ML] improve clone action context menu item * [ML] support advanced job cloning * [ML] extractCloningConfig * [ML] fix isAdvancedSetting condition, add test * [ML] clone job header * [ML] job description placeholder * [ML] setEstimatedModelMemoryLimit on source index change * [ML] Fix types. * [ML] useUpdateEffect in create_analytics_form.tsx * [ML] setJobClone action * [ML] remove CreateAnalyticsFlyoutWrapper instance from the create_analytics_button.tsx * [ML] fix types * [ML] hack to align Clone button with the other actions * [ML] unknown props lead to advanced editor * [ML] rename maximum_number_trees ot max_trees * [ML] fix forceInput * [ML] populate excludesOptions on the first update, skip setting mml on the fist update * [ML] init functional test for cloning analytics jobs * [ML] functional tests * [ML] fix functional tests imports * [ML] fix indices names for functional tests * [ML] functional tests for outlier detection and regression jobs cloning * [ML] delete james tag * [ML] fix tests arrangement Co-authored-by: Walter Rafelsberger <[email protected]> Co-authored-by: Walter Rafelsberger <[email protected]>
…o alerting/view-in-app * 'alerting/view-in-app' of github.com:gmmorris/kibana: (33 commits) [SIEM] Adds 'Closes and opens signals' Cypress test (elastic#59950) [NP] Graph migration (elastic#59409) [ML] Clone analytics job (elastic#59791) Move VALUE_CLICK_TRIGGER and APPLY_FILTER_TRIGGER to ui_action… (elastic#60202) Handle improperly defined Watcher Logging Action text parameter. (elastic#60169) Move select range trigger to uiActions (elastic#60168) [SIEM][CASES] Configure cases: Final (elastic#59358) Closes elastic#59784. Sets xpack.apm.serviceMapEnabled default value true. (elastic#60153) [siem/cypress] update junit filename to be picked up by runbld (elastic#60156) OSS logic added to test environment (elastic#60134) Move canvas setup into app mount (elastic#59926) enable triggers_actions_ui plugin by default (elastic#60137) Expose Elasticsearch from start and deprecate from setup (elastic#59886) [SIEM] [Case] Insert timeline bugfix and limit 25 cases (elastic#60136) [ML] Client side cut over (elastic#60100) Disable query bar on service map routes (elastic#60118) Move subscribe_with_scope to kibana_legacy (elastic#59781) [Ingest] Agent Config create with sys monitoring (elastic#60111) [Watcher UI] Not possible to edit a watch that was created with the API if the ID contains a dot (elastic#59383) Actually fetch functionbeat fields needed for telemetry (elastic#60054) ...
* master: (40 commits) skips 'config_open.ts' files from linter check (elastic#60248) [Searchprofiler] Spacing between rendered shards (elastic#60238) Add UiSettings validation & Kibana default route redirection (elastic#59694) [SIEM][CASE] Change configuration button (elastic#60229) [Step 1][App Arch] Saved object migrations from kibana plugin to new platform (elastic#59044) adds new test (elastic#60064) [Uptime] Index Status API to Rest (elastic#59657) [SIEM] Adds 'Closes and opens signals' Cypress test (elastic#59950) [NP] Graph migration (elastic#59409) [ML] Clone analytics job (elastic#59791) Move VALUE_CLICK_TRIGGER and APPLY_FILTER_TRIGGER to ui_action… (elastic#60202) Handle improperly defined Watcher Logging Action text parameter. (elastic#60169) Move select range trigger to uiActions (elastic#60168) [SIEM][CASES] Configure cases: Final (elastic#59358) Closes elastic#59784. Sets xpack.apm.serviceMapEnabled default value true. (elastic#60153) [siem/cypress] update junit filename to be picked up by runbld (elastic#60156) OSS logic added to test environment (elastic#60134) Move canvas setup into app mount (elastic#59926) enable triggers_actions_ui plugin by default (elastic#60137) Expose Elasticsearch from start and deprecate from setup (elastic#59886) ...
Summary
Adds support of analytics job cloning.
In case the job has been created using the UI form the flyout for cloning appears with pre-populated inputs except for the job id and destination index. Besides, the clone action detects any settings that are not supported by the form and opens the advanced editor straightaway.
Checklist