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

[Automatic Import] Fix UI validation for Integration and Datastream name #204943

Merged
merged 3 commits into from
Dec 19, 2024

Conversation

bhapas
Copy link
Contributor

@bhapas bhapas commented Dec 19, 2024

Release Note

Fixes Integration and Datastream name validation

Summary

#204409 implemented backend validation for integration and datastream names and this PR fixes allowing numbers on backend

image

Closes #204935

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, uses sentence case text and includes i18n support
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

@bhapas bhapas added bug Fixes for quality problems that affect the customer experience backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team:Security-Scalability Team label for Security Integrations Scalability Team Feature:AutomaticImport labels Dec 19, 2024
@bhapas bhapas self-assigned this Dec 19, 2024
@bhapas bhapas requested a review from a team as a code owner December 19, 2024 13:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-scalability (Team:Security-Scalability)

@bhapas bhapas added backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development release_note:fix and removed backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Dec 19, 2024
Copy link
Contributor

@kgeller kgeller left a comment

Choose a reason for hiding this comment

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

@bhapas
Copy link
Contributor Author

bhapas commented Dec 19, 2024

@kgeller
Copy link
Contributor

kgeller commented Dec 19, 2024

I think we also want to update the messaging around it: https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/translations.ts#L48
Screenshot 2024-12-19 at 9 23 34 AM

@kgeller UI elements are not changed. Just the backend API handling

@bhapas So we'll allow them to enter test1 as the name in the UI, and then return an error later in the process?

@bhapas bhapas enabled auto-merge (squash) December 19, 2024 20:41
Copy link
Contributor

@ilyannn ilyannn left a comment

Choose a reason for hiding this comment

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

This works for me, though I think it would be better to re-use the existing regular expression. But we can do it in a follow-up.

@bhapas bhapas merged commit b746c39 into elastic:main Dec 19, 2024
8 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @bhapas

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/12421743907

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 19, 2024
…ame (elastic#204943)

## Release Note

Fixes Integration and Datastream name validation

## Summary

elastic#204409 implemented backend
validation for integration and datastream names and this PR fixes
allowing numbers on backend

<img width="858" alt="image"
src="https://github.com/user-attachments/assets/8d61305a-eeb8-41d7-8fa0-f0b466fa7528"
/>

Closes elastic#204935

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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] 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)

(cherry picked from commit b746c39)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 19, 2024
…ame (elastic#204943)

## Release Note

Fixes Integration and Datastream name validation

## Summary

elastic#204409 implemented backend
validation for integration and datastream names and this PR fixes
allowing numbers on backend

<img width="858" alt="image"
src="https://github.com/user-attachments/assets/8d61305a-eeb8-41d7-8fa0-f0b466fa7528"
/>

Closes elastic#204935

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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] 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)

(cherry picked from commit b746c39)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 19, 2024
…ame (elastic#204943)

## Release Note

Fixes Integration and Datastream name validation

## Summary

elastic#204409 implemented backend
validation for integration and datastream names and this PR fixes
allowing numbers on backend

<img width="858" alt="image"
src="https://github.com/user-attachments/assets/8d61305a-eeb8-41d7-8fa0-f0b466fa7528"
/>

Closes elastic#204935

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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] 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)

(cherry picked from commit b746c39)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.17
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 20, 2024
…tream name (#204943) (#205019)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Automatic Import] Fix UI validation for Integration and Datastream
name (#204943)](#204943)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Bharat
Pasupula","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-19T22:22:20Z","message":"[Automatic
Import] Fix UI validation for Integration and Datastream name
(#204943)\n\n## Release Note\r\n\r\nFixes Integration and Datastream
name validation\r\n\r\n##
Summary\r\n\r\nhttps://github.com//pull/204409 implemented
backend\r\nvalidation for integration and datastream names and this PR
fixes\r\nallowing numbers on backend\r\n\r\n<img width=\"858\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/8d61305a-eeb8-41d7-8fa0-f0b466fa7528\"\r\n/>\r\n\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204935\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\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] The PR description includes the appropriate Release Notes
section,\r\nand the correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b746c39ca04446301747c17cd845b1582db05396","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic
Import] Fix UI validation for Integration and Datastream
name","number":204943,"url":"https://github.com/elastic/kibana/pull/204943","mergeCommit":{"message":"[Automatic
Import] Fix UI validation for Integration and Datastream name
(#204943)\n\n## Release Note\r\n\r\nFixes Integration and Datastream
name validation\r\n\r\n##
Summary\r\n\r\nhttps://github.com//pull/204409 implemented
backend\r\nvalidation for integration and datastream names and this PR
fixes\r\nallowing numbers on backend\r\n\r\n<img width=\"858\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/8d61305a-eeb8-41d7-8fa0-f0b466fa7528\"\r\n/>\r\n\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204935\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\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] The PR description includes the appropriate Release Notes
section,\r\nand the correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b746c39ca04446301747c17cd845b1582db05396"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204943","number":204943,"mergeCommit":{"message":"[Automatic
Import] Fix UI validation for Integration and Datastream name
(#204943)\n\n## Release Note\r\n\r\nFixes Integration and Datastream
name validation\r\n\r\n##
Summary\r\n\r\nhttps://github.com//pull/204409 implemented
backend\r\nvalidation for integration and datastream names and this PR
fixes\r\nallowing numbers on backend\r\n\r\n<img width=\"858\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/8d61305a-eeb8-41d7-8fa0-f0b466fa7528\"\r\n/>\r\n\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204935\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\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] The PR description includes the appropriate Release Notes
section,\r\nand the correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b746c39ca04446301747c17cd845b1582db05396"}}]}]
BACKPORT-->

Co-authored-by: Bharat Pasupula <[email protected]>
kibanamachine added a commit that referenced this pull request Dec 20, 2024
…tream name (#204943) (#205018)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Automatic Import] Fix UI validation for Integration and Datastream
name (#204943)](#204943)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Bharat
Pasupula","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-19T22:22:20Z","message":"[Automatic
Import] Fix UI validation for Integration and Datastream name
(#204943)\n\n## Release Note\r\n\r\nFixes Integration and Datastream
name validation\r\n\r\n##
Summary\r\n\r\nhttps://github.com//pull/204409 implemented
backend\r\nvalidation for integration and datastream names and this PR
fixes\r\nallowing numbers on backend\r\n\r\n<img width=\"858\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/8d61305a-eeb8-41d7-8fa0-f0b466fa7528\"\r\n/>\r\n\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204935\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\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] The PR description includes the appropriate Release Notes
section,\r\nand the correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b746c39ca04446301747c17cd845b1582db05396","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic
Import] Fix UI validation for Integration and Datastream
name","number":204943,"url":"https://github.com/elastic/kibana/pull/204943","mergeCommit":{"message":"[Automatic
Import] Fix UI validation for Integration and Datastream name
(#204943)\n\n## Release Note\r\n\r\nFixes Integration and Datastream
name validation\r\n\r\n##
Summary\r\n\r\nhttps://github.com//pull/204409 implemented
backend\r\nvalidation for integration and datastream names and this PR
fixes\r\nallowing numbers on backend\r\n\r\n<img width=\"858\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/8d61305a-eeb8-41d7-8fa0-f0b466fa7528\"\r\n/>\r\n\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204935\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\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] The PR description includes the appropriate Release Notes
section,\r\nand the correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b746c39ca04446301747c17cd845b1582db05396"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204943","number":204943,"mergeCommit":{"message":"[Automatic
Import] Fix UI validation for Integration and Datastream name
(#204943)\n\n## Release Note\r\n\r\nFixes Integration and Datastream
name validation\r\n\r\n##
Summary\r\n\r\nhttps://github.com//pull/204409 implemented
backend\r\nvalidation for integration and datastream names and this PR
fixes\r\nallowing numbers on backend\r\n\r\n<img width=\"858\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/8d61305a-eeb8-41d7-8fa0-f0b466fa7528\"\r\n/>\r\n\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204935\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\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] The PR description includes the appropriate Release Notes
section,\r\nand the correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b746c39ca04446301747c17cd845b1582db05396"}}]}]
BACKPORT-->

Co-authored-by: Bharat Pasupula <[email protected]>
kibanamachine added a commit that referenced this pull request Dec 20, 2024
…ream name (#204943) (#205020)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Automatic Import] Fix UI validation for Integration and Datastream
name (#204943)](#204943)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Bharat
Pasupula","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-19T22:22:20Z","message":"[Automatic
Import] Fix UI validation for Integration and Datastream name
(#204943)\n\n## Release Note\r\n\r\nFixes Integration and Datastream
name validation\r\n\r\n##
Summary\r\n\r\nhttps://github.com//pull/204409 implemented
backend\r\nvalidation for integration and datastream names and this PR
fixes\r\nallowing numbers on backend\r\n\r\n<img width=\"858\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/8d61305a-eeb8-41d7-8fa0-f0b466fa7528\"\r\n/>\r\n\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204935\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\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] The PR description includes the appropriate Release Notes
section,\r\nand the correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b746c39ca04446301747c17cd845b1582db05396","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic
Import] Fix UI validation for Integration and Datastream
name","number":204943,"url":"https://github.com/elastic/kibana/pull/204943","mergeCommit":{"message":"[Automatic
Import] Fix UI validation for Integration and Datastream name
(#204943)\n\n## Release Note\r\n\r\nFixes Integration and Datastream
name validation\r\n\r\n##
Summary\r\n\r\nhttps://github.com//pull/204409 implemented
backend\r\nvalidation for integration and datastream names and this PR
fixes\r\nallowing numbers on backend\r\n\r\n<img width=\"858\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/8d61305a-eeb8-41d7-8fa0-f0b466fa7528\"\r\n/>\r\n\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204935\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\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] The PR description includes the appropriate Release Notes
section,\r\nand the correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b746c39ca04446301747c17cd845b1582db05396"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204943","number":204943,"mergeCommit":{"message":"[Automatic
Import] Fix UI validation for Integration and Datastream name
(#204943)\n\n## Release Note\r\n\r\nFixes Integration and Datastream
name validation\r\n\r\n##
Summary\r\n\r\nhttps://github.com//pull/204409 implemented
backend\r\nvalidation for integration and datastream names and this PR
fixes\r\nallowing numbers on backend\r\n\r\n<img width=\"858\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/8d61305a-eeb8-41d7-8fa0-f0b466fa7528\"\r\n/>\r\n\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204935\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\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] The PR description includes the appropriate Release Notes
section,\r\nand the correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"b746c39ca04446301747c17cd845b1582db05396"}}]}]
BACKPORT-->

Co-authored-by: Bharat Pasupula <[email protected]>
ilyannn added a commit that referenced this pull request Dec 27, 2024
## Summary

This PR reuses the regex pattern to validate the names in UI and backend
created in #204943

---------

Co-authored-by: Ilya Nikokoshev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development bug Fixes for quality problems that affect the customer experience Feature:AutomaticImport release_note:fix Team:Security-Scalability Team label for Security Integrations Scalability Team v8.16.3 v8.17.1 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Automatic Import] validate integration and datastream names in UI Form
5 participants