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

[Ingest pipelines] Add copy_from to set processor #104070

Merged
merged 17 commits into from Jul 27, 2021

Conversation

sabarasaba
Copy link
Member

@sabarasaba sabarasaba commented Jul 1, 2021

Fixes: #101246

As a side note, either value or copy_from can be defined at any given time, not both.

Release Note

The Ingest Node Pipelines UI added support to configure a copy_from field on the set processor.

Default description

Screenshot 2021-07-05 at 15 27 51

Screenshot 2021-07-05 at 15 28 04

New processor fields

Screenshot 2021-07-20 at 13 52 32

Screenshot 2021-07-20 at 13 53 35

@sabarasaba sabarasaba force-pushed the add_copy_from_to_set_processor branch from 4393c5d to ed7527f Compare July 1, 2021 11:44
@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@sabarasaba sabarasaba self-assigned this Jul 5, 2021
@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

merge conflict between base and head

@sabarasaba sabarasaba added Feature:Ingest Node Pipelines Ingest node pipelines management release_note:feature Makes this part of the condensed release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.15.0 v8.0.0 labels Jul 13, 2021
@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Nice work @sabarasaba!

Not sure if this one was ready for review yet (still in draft), but since I was tagged thought I'd give it a quick look as I'll be OOO next week 😄.

I left a few comments in the code. Overall, everything worked as expected.

I'm wondering if this one merits some more UX consideration. For example, what if there was first a selection - do you want to set a string value, or copy from an existing field? Then, there would just be one text input displayed based on the selection. I guess this would require an extra step for the user, so not sure if this is the best approach or not. However, I can see it being beneficial to better associate these two fields together so it's more clear that it's a one-or-another type deal. Would you mind reaching out to @dborodyansky to get his thoughts?

Also, I think this could benefit from a copy review. I think it would be helpful if we could better distinguish why a user might want to use value over copy_from, or vice versa.

@sabarasaba
Copy link
Member Author

@alisonelizabeth Sorry you got pinged early, didnt thought gh will do when the PR was still in draft mode! Thanks for checking it out, will reach out to Dmitry and will ask the docs team to have a look later :)

@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@sabarasaba sabarasaba marked this pull request as ready for review July 19, 2021 07:11
@sabarasaba sabarasaba requested a review from a team as a code owner July 19, 2021 07:11
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-management (Team:Stack Management)

@sabarasaba
Copy link
Member Author

After a small discussion with @dborodyansky, we agreed on following a similar pattern as we used in the Network Direction processor and allow users to toggle between them two mutually exclusive fields:

Screenshot 2021-07-20 at 10 13 20

Copy link
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

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

Thanks @sabarasaba. I left some non-blocking suggestions that you can ignore if wanted.

Thanks for working on this.

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Nice work @sabarasaba! UX changes look good 👍 .

I left a couple nits in the code. I'd like to see at least the validation messages addressed before merging.

I also noticed the spacing is different with the toggle field. However, I also see the same issue with the network_direction processor.

Ingest-Node-Pipelines-Elastic

@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

merge conflict between base and head

@sabarasaba sabarasaba force-pushed the add_copy_from_to_set_processor branch from 94bbf31 to 77e205b Compare July 27, 2021 07:32
@sabarasaba
Copy link
Member Author

Thanks again for re-checking @alisonelizabeth! Nice spot on the labels with toggle links not being exactly the same as the other fields. I've addressed this with d2b795e for both processors:

Screenshot 2021-07-27 at 15 27 46

Screenshot 2021-07-27 at 15 30 36

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ingestPipelines 706.0KB 709.7KB +3.7KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @sabarasaba

@sabarasaba sabarasaba merged commit 374de9d into elastic:master Jul 27, 2021
sabarasaba added a commit to sabarasaba/kibana that referenced this pull request Jul 28, 2021
* fix up validation conditions for fields

* add tests and fix prettier errors

* Small refactor and fix tests

* Fix copy surrounding error handling

* Clean up unnecessary boilerplate from tests

* Fix i18n error

* Keep optional select next to bound input

* Pass disabled prop as boolean

* fix test matchers

* No need to whitelist fields anymore

* Small CR changes

* Convert optional inputs to toggle state

* Fix testcase copy

* address CR suggestions

* address CR changes

* Fix i18n

* Fix labelAppend link alignment
# Conflicts:
#	x-pack/plugins/translations/translations/ja-JP.json
#	x-pack/plugins/translations/translations/zh-CN.json
sabarasaba added a commit that referenced this pull request Jul 28, 2021
* fix up validation conditions for fields

* add tests and fix prettier errors

* Small refactor and fix tests

* Fix copy surrounding error handling

* Clean up unnecessary boilerplate from tests

* Fix i18n error

* Keep optional select next to bound input

* Pass disabled prop as boolean

* fix test matchers

* No need to whitelist fields anymore

* Small CR changes

* Convert optional inputs to toggle state

* Fix testcase copy

* address CR suggestions

* address CR changes

* Fix i18n

* Fix labelAppend link alignment
# Conflicts:
#	x-pack/plugins/translations/translations/ja-JP.json
#	x-pack/plugins/translations/translations/zh-CN.json
streamich pushed a commit to vadimkibana/kibana that referenced this pull request Aug 8, 2021
* fix up validation conditions for fields

* add tests and fix prettier errors

* Small refactor and fix tests

* Fix copy surrounding error handling

* Clean up unnecessary boilerplate from tests

* Fix i18n error

* Keep optional select next to bound input

* Pass disabled prop as boolean

* fix test matchers

* No need to whitelist fields anymore

* Small CR changes

* Convert optional inputs to toggle state

* Fix testcase copy

* address CR suggestions

* address CR changes

* Fix i18n

* Fix labelAppend link alignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Ingest Node Pipelines Ingest node pipelines management release_note:feature Makes this part of the condensed release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for copy_from property to set processor
5 participants