[Logs+] Enforce dataset names#166654
Merged
Kerry350 merged 7 commits intoelastic:mainfrom Sep 21, 2023
Merged
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
aef73d8 to
51d5376
Compare
51d5376 to
48e146f
Compare
Contributor
|
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
Contributor
|
Pinging @elastic/fleet (Team:Fleet) |
tonyghiani
reviewed
Sep 20, 2023
Comment on lines
+20
to
+26
| return pipe( | ||
| [context, event] as ValuesTuple, | ||
| updateFields(context), | ||
| updateTouchedFields(context), | ||
| maybeMatchDatasetNameToIntegrationName(context), | ||
| replaceSpecialCharacters(context) | ||
| ); |
tonyghiani
approved these changes
Sep 20, 2023
Contributor
tonyghiani
left a comment
There was a problem hiding this comment.
Good job, it works well and code changes LGTM 👏
hop-dev
approved these changes
Sep 20, 2023
Contributor
hop-dev
left a comment
There was a problem hiding this comment.
Fleet changes look good 🚀
| import type { CustomPackageDatasetConfiguration } from '../../install'; | ||
|
|
||
| // Dataset name must either match integration name exactly OR be prefixed with integration name and a dot. | ||
| export const checkDatasetsNameFormat = ( |
Contributor
There was a problem hiding this comment.
I think this function is a good candidate for unit testing :)
Contributor
Author
|
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: cc @Kerry350 |
yngrdyn
added a commit
that referenced
this pull request
Sep 27, 2023
`OBSERVABILITY_ONBOARDING_LOCATOR` and `ObservabilityOnboardingLocatorParams` were removed from `observability_onboarding` plugin in [#165962](#165962) and are now part of `@kbn/deeplinks-observability/locators`. `datsetName` was transformed into an optional variable in the wizard state in [#166654](#166654) which makes sense for first step of custom logs onboarding but it's required in onboarding saved object.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #163830
This adds server side validation to enforce dataset name format rules for custom integrations. It then enhances the custom integrations Kibana package to handle this seamlessly in the create form.
There is no client side validation for the rules per se because as long as the dataset name passes other validations (length etc) then it is always valid - it just comes down to whether it's prefixed or not.
Other notes
UI / UX changes