-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Enterprise Search] Disallow creating pipeline with placeholder of model #172988
Conversation
}); | ||
|
||
expect(MLInferenceLogic.values.formErrors).toEqual({ | ||
modelStatus: 'Model must be deployed before use.', |
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.
Is this sufficient or should we also have a call to action here? (E.g. "Use the Deploy button to deploy the model.")
cc @1Copenut
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.
@demjened This seems like a good messge. It clearly explains the reason the selected model couldn't be used yet. I'll live test it too, one second.
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.
@1Copenut Are you OK going with the current message then?
...erprise_search_content/components/search_index/pipelines/ml_inference/configure_pipeline.tsx
Show resolved
Hide resolved
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.
LGTM but will allow someone more familiar with frontend best practices to review the style differences.
@elasticmachine merge upstream |
0382556
to
b18b521
Compare
it('sets placeholder flag on selecting a placeholder item', () => { | ||
setMockValues(DEFAULT_VALUES); | ||
|
||
const wrapper = shallow(<ModelSelect />); |
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.
We are moving from enzyme to react-testing-library. Is it possible to convert these tests to ones compitible with react-testing-library?
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.
@saikatsarkar056 Thanks for the heads up, I just learned about this.
Since this is a critical usability fix that must go into 8.12, are you OK getting this PR merged as-is and deferring the rewriting of tests (possibly with a larger scope) to a tech debt ticket?
@elasticmachine merge upstream |
/ci |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
…del (elastic#172988) ## Summary This PR adds validation to model selection when creating an inference pipeline. Pipelines cannot be created with a non-deployed placeholder of a model (e.g. E5, ELSER) as this would break other Search UIs and functionality. If such an item is selected, an error message is displayed and the Continue button is disabled. Note this feature is independent of the changing of the model selection component. Valid selection: <img width="919" alt="Screenshot 2023-12-08 at 14 03 59" src="https://github.com/elastic/kibana/assets/14224983/26f8be24-3f78-4765-9a4c-771adbb221a4"> Invalid selection: <img width="921" alt="Screenshot 2023-12-08 at 14 04 04" src="https://github.com/elastic/kibana/assets/14224983/a157fb69-c004-49b2-93c7-13b58e82074c"> ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) --------- Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit 156c8f2)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…r of model (#172988) (#173188) # Backport This will backport the following commits from `main` to `8.12`: - [[Enterprise Search] Disallow creating pipeline with placeholder of model (#172988)](#172988) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Adam Demjen","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-12T17:42:16Z","message":"[Enterprise Search] Disallow creating pipeline with placeholder of model (#172988)\n\n## Summary\r\n\r\nThis PR adds validation to model selection when creating an inference\r\npipeline. Pipelines cannot be created with a non-deployed placeholder of\r\na model (e.g. E5, ELSER) as this would break other Search UIs and\r\nfunctionality. If such an item is selected, an error message is\r\ndisplayed and the Continue button is disabled.\r\n\r\nNote this feature is independent of the changing of the model selection\r\ncomponent.\r\n\r\nValid selection:\r\n<img width=\"919\" alt=\"Screenshot 2023-12-08 at 14 03 59\"\r\nsrc=\"https://github.com/elastic/kibana/assets/14224983/26f8be24-3f78-4765-9a4c-771adbb221a4\">\r\n\r\nInvalid selection:\r\n<img width=\"921\" alt=\"Screenshot 2023-12-08 at 14 04 04\"\r\nsrc=\"https://github.com/elastic/kibana/assets/14224983/a157fb69-c004-49b2-93c7-13b58e82074c\">\r\n\r\n### Checklist\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"156c8f2323a65153397bbddd308bfd23901d50ba","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:EnterpriseSearch","v8.12.0","v8.13.0"],"number":172988,"url":"https://github.com/elastic/kibana/pull/172988","mergeCommit":{"message":"[Enterprise Search] Disallow creating pipeline with placeholder of model (#172988)\n\n## Summary\r\n\r\nThis PR adds validation to model selection when creating an inference\r\npipeline. Pipelines cannot be created with a non-deployed placeholder of\r\na model (e.g. E5, ELSER) as this would break other Search UIs and\r\nfunctionality. If such an item is selected, an error message is\r\ndisplayed and the Continue button is disabled.\r\n\r\nNote this feature is independent of the changing of the model selection\r\ncomponent.\r\n\r\nValid selection:\r\n<img width=\"919\" alt=\"Screenshot 2023-12-08 at 14 03 59\"\r\nsrc=\"https://github.com/elastic/kibana/assets/14224983/26f8be24-3f78-4765-9a4c-771adbb221a4\">\r\n\r\nInvalid selection:\r\n<img width=\"921\" alt=\"Screenshot 2023-12-08 at 14 04 04\"\r\nsrc=\"https://github.com/elastic/kibana/assets/14224983/a157fb69-c004-49b2-93c7-13b58e82074c\">\r\n\r\n### Checklist\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"156c8f2323a65153397bbddd308bfd23901d50ba"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172988","number":172988,"mergeCommit":{"message":"[Enterprise Search] Disallow creating pipeline with placeholder of model (#172988)\n\n## Summary\r\n\r\nThis PR adds validation to model selection when creating an inference\r\npipeline. Pipelines cannot be created with a non-deployed placeholder of\r\na model (e.g. E5, ELSER) as this would break other Search UIs and\r\nfunctionality. If such an item is selected, an error message is\r\ndisplayed and the Continue button is disabled.\r\n\r\nNote this feature is independent of the changing of the model selection\r\ncomponent.\r\n\r\nValid selection:\r\n<img width=\"919\" alt=\"Screenshot 2023-12-08 at 14 03 59\"\r\nsrc=\"https://github.com/elastic/kibana/assets/14224983/26f8be24-3f78-4765-9a4c-771adbb221a4\">\r\n\r\nInvalid selection:\r\n<img width=\"921\" alt=\"Screenshot 2023-12-08 at 14 04 04\"\r\nsrc=\"https://github.com/elastic/kibana/assets/14224983/a157fb69-c004-49b2-93c7-13b58e82074c\">\r\n\r\n### Checklist\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"156c8f2323a65153397bbddd308bfd23901d50ba"}}]}] BACKPORT--> Co-authored-by: Adam Demjen <[email protected]>
Summary
This PR adds validation to model selection when creating an inference pipeline. Pipelines cannot be created with a non-deployed placeholder of a model (e.g. E5, ELSER) as this would break other Search UIs and functionality. If such an item is selected, an error message is displayed and the Continue button is disabled.
Note this feature is independent of the changing of the model selection component.
Valid selection:
Invalid selection:
Checklist