[Mappings editor] Remove boost parameter from field types#113142
[Mappings editor] Remove boost parameter from field types#113142sebelga merged 9 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-stack-management (Team:Stack Management) |
| plugins: SetupDependencies | ||
| ): IndexManagementPluginSetup { | ||
| const { fleet, usageCollection, management } = plugins; | ||
| const kibanaVersion = new SemVer(this.ctx.env.packageInfo.version); |
There was a problem hiding this comment.
@cjcenizal as you can see, with a system like this in place it is easy to test 7.x and 8.x UIs without switching branch (and we know how long that can take).
Replace this line with: const kibanaVersion = new SemVer('7.16.0') and that's it.
There was a problem hiding this comment.
Could we document this process in the readme of the app?
There was a problem hiding this comment.
I am not sure (yet) that this deserves an entry in the README. It is practical to know this trick to test different UI behaviour on 7.x and 8.x while developing but not sure it is of interest of user testing the app.
There was a problem hiding this comment.
It might be good to document it maybe in the dev docs. But we probably want to wait and see if the branching system changes in any way with the "make it minor" effort.
| setValue(newValue); | ||
| return newValue; | ||
|
|
||
| if (isMounted.current) { |
There was a problem hiding this comment.
I needed to add this if statement as there was a strange race condition in one of the tests.
There was a problem hiding this comment.
Should we add any tests for this?
There was a problem hiding this comment.
There is test coverage for form.reset() in the use_form.test.tsx which test this part of the code. Aside this is a very low risk change as we are simply protecting ourselves from updating the state on an unmounted component.
| // "PluginInitializerContext.env.packageInfo.version". In some cases it is not possible | ||
| // to dynamically inject that version without a huge refactor on the code base. | ||
| // We will then keep this single constant to declare on which major branch we are. | ||
| export const MAJOR_VERSION = '8.0.0'; |
There was a problem hiding this comment.
This will be changed to 7.16.0 when backported
There was a problem hiding this comment.
Should we create a ticket so we don't forget to do so?
There was a problem hiding this comment.
I will immediately do it after merging 😊
| }) | ||
| : i18n.translate('xpack.idxMgmt.mappingsEditor.editFieldTitle', { | ||
| defaultMessage: "Edit field '{fieldName}'", | ||
| export const EditField = React.memo( |
There was a problem hiding this comment.
To review this file make sure to toggle "Hide whitespace changes" in Github.
…remove-boost-index-template
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
sabarasaba
left a comment
There was a problem hiding this comment.
Thanks for working on this @sebelga! Code LGTM, tested locally. Left a few minor comments only 🥳
| setValue(newValue); | ||
| return newValue; | ||
|
|
||
| if (isMounted.current) { |
There was a problem hiding this comment.
Should we add any tests for this?
| if (resetValue) { | ||
| hasBeenReset.current = true; | ||
| const newValue = deserializeValue(updatedDefaultValue ?? defaultValue); | ||
| // updateStateIfMounted('value', newValue); |
| plugins: SetupDependencies | ||
| ): IndexManagementPluginSetup { | ||
| const { fleet, usageCollection, management } = plugins; | ||
| const kibanaVersion = new SemVer(this.ctx.env.packageInfo.version); |
There was a problem hiding this comment.
Could we document this process in the readme of the app?
| // "PluginInitializerContext.env.packageInfo.version". In some cases it is not possible | ||
| // to dynamically inject that version without a huge refactor on the code base. | ||
| // We will then keep this single constant to declare on which major branch we are. | ||
| export const MAJOR_VERSION = '8.0.0'; |
There was a problem hiding this comment.
Should we create a ticket so we don't forget to do so?
|
Thanks for the review @sabarasaba ! I will merge this and remove the unnecessary comment on my current branch. 👍 |
…3142) # Conflicts: # x-pack/plugins/index_management/__jest__/client_integration/helpers/constants.ts # x-pack/plugins/index_management/public/application/lib/indices.ts # x-pack/plugins/index_management/public/application/store/selectors/indices_filter.test.ts
) (#113512) * [Mappings editor] Remove boost parameter from field types (#113142) # Conflicts: # x-pack/plugins/index_management/__jest__/client_integration/helpers/constants.ts # x-pack/plugins/index_management/public/application/lib/indices.ts # x-pack/plugins/index_management/public/application/store/selectors/indices_filter.test.ts * Change MAJOR_VERSION to 7.16.0
This PR removes support for the
boostparameter in the mappings editor from8.x.Updated types
booleandateanddate_nanosflattenedipkeywordnumeric(all of them)range(all of them)texttoken_countI am going to check if index templates or component templates with mappings that contains the
boostparameters are surfaced in Upgrade assistant. As this should be done ES side it does not block merging this work.How to test
Fixes #78293