-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[Fleet] Improve validation for dynamic Kafka topics #212422
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
[Fleet] Improve validation for dynamic Kafka topics #212422
Conversation
… and added wrapper to combobox items
Pinging @elastic/fleet (Team:Fleet) |
@elasticmachine merge upstream |
...pplications/fleet/sections/settings/components/edit_output_flyout/output_form_validators.tsx
Outdated
Show resolved
Hide resolved
...pplications/fleet/sections/settings/components/edit_output_flyout/output_form_validators.tsx
Outdated
Show resolved
Hide resolved
...pplications/fleet/sections/settings/components/edit_output_flyout/output_form_validators.tsx
Outdated
Show resolved
Hide resolved
...pplications/fleet/sections/settings/components/edit_output_flyout/output_form_validators.tsx
Outdated
Show resolved
Hide resolved
...pplications/fleet/sections/settings/components/edit_output_flyout/output_form_validators.tsx
Outdated
Show resolved
Hide resolved
…upplementing/kibana into fix-kafka-dynamic-topic-output
Looking at the dropdown I wonder if we can change the "not recommended" text. I don't think we need to explicitly discourage the dynamic topic syntax like that. |
I agree, it does make it feel like you're 'doing something wrong', when its really just a more 'advanced option' than inherently wrong, or to be discouraged. |
@kpollich Also, do you think its worth maybe linking to the docs somewhere in the UI with it being a little bit more advanced and prone to user error? If so, @criamico mentioned it in the issue, but the docs dont explicitly lay out the multi-format string as being an option, so we likely need to get those up-to-date as well. |
Yeah we can link to those docs and probably file an issue in https://github.com/elastic/ingest-docs to get those filebeat docs updated to go into more detail about the dynamic topic syntax. |
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.
One last thing to update and this will be good to go from me
...lications/fleet/sections/settings/components/edit_output_flyout/output_form_kafka_topics.tsx
Outdated
Show resolved
Hide resolved
...lications/fleet/sections/settings/components/edit_output_flyout/output_form_kafka_topics.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.
Awesome work 🚀
@kpollich I hope it's okay: I transferred this docs issue into the beats repo (elastic/beats#42932) since (as far as I know) the ingest-docs repo has been used only for Fleet & Elastic Agent updates. This may all change soon though with the docs migration. Thanks for opening it @Supplementing! |
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Page load bundle
History
|
...ations/fleet/sections/settings/components/edit_output_flyout/output_form_validators.test.tsx
Outdated
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! 🚢
Just one super small suggestion for the error text.
Closes elastic#206194 ## Summary - Removed hardcoded wrapping of user-entered topics with `%{[]}` to fix issues arising from the user pre-wrapping, and also allow greater flexibility in naming - Added validation rules to check for unclosed brackets & brackets with missing `%` preceding - Added the auto-wrapping to the `value` field of items chosen from the dropdown to ensure they were always wrapped as intended ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] 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/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks n/a --------- Co-authored-by: Elastic Machine <[email protected]>
Reverts #212422 We don't want to surface this Beats-specific syntax for dynamic topics because it greatly harms our ability to migrate users to OTel. The recommended way to handle complex multi-field interpolations for topic names is to use an `add_field` Beats processor to add the desired topic name as a distinct field, and then use that field for the dynamic topic name in the Fleet-managed Kafka output. I'll be filing a docs issue to get this in our public docs as well.
…#219415) Reverts elastic#212422 We don't want to surface this Beats-specific syntax for dynamic topics because it greatly harms our ability to migrate users to OTel. The recommended way to handle complex multi-field interpolations for topic names is to use an `add_field` Beats processor to add the desired topic name as a distinct field, and then use that field for the dynamic topic name in the Fleet-managed Kafka output. I'll be filing a docs issue to get this in our public docs as well.
Closes #206194
Summary
Screen.Recording.2025-02-26.at.7.30.18.AM.mov
%{[]}
to fix issues arising from the user pre-wrapping, and also allow greater flexibility in naming%
precedingvalue
field of items chosen from the dropdown to ensure they were always wrapped as intendedChecklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breaking
label should be applied in these situations.release_note:*
label is applied per the guidelinesIdentify risks
n/a