-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Not allow # in index template name #195776
Conversation
Pinging @elastic/kibana-management (Team:Kibana Management) |
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.
Thanks for patching this up @SoniaSanzV! Code changes lgtm, tested locally.
I couldnt find any existing tests associated with this specific form validation, do you think is worth perhaps adding a simple one for doing that? 🤔 Perhaps is also a good oportunity to figure out what the process for adding tests looks like
Sure! I can do that! |
I've been working on the test for a couple of days but, after talking to @ElenaStoeva we agreed that a simple unit test that only adds a character to an existing functionality does not worth all this time. The problem is that when you add a value to the input using the testing library, the |
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.
Thanks for working on this @SoniaSanzV, LGTM!
/ci |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11360766824 |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Page load bundle
History
cc @SoniaSanzV |
Closes [elastic#81870](elastic#81870) ## Summary When creating a new Template, it did not prevent entering a #, but when saving the template the user received an error. The hash has been added to the list of invalid characters for the name. https://github.com/user-attachments/assets/2b59d245-c96f-4215-ad89-a3201bef5e94 (cherry picked from commit 4339f84)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [Not allow # in index template name (#195776)](#195776) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sonia Sanz Vivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-16T07:16:36Z","message":"Not allow # in index template name (#195776)\n\nCloses [#81870](https://github.com/elastic/kibana/issues/81870)\r\n\r\n## Summary\r\n\r\nWhen creating a new Template, it did not prevent entering a #, but when\r\nsaving the template the user received an error. The hash has been added\r\nto the list of invalid characters for the name.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2b59d245-c96f-4215-ad89-a3201bef5e94","sha":"4339f8465720c507351a2e65a6fe881a10dcd938","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index Management","Team:Kibana Management","release_note:skip","v9.0.0","backport:prev-minor","v8.16.0"],"title":"Not allow # in index template name","number":195776,"url":"https://github.com/elastic/kibana/pull/195776","mergeCommit":{"message":"Not allow # in index template name (#195776)\n\nCloses [#81870](https://github.com/elastic/kibana/issues/81870)\r\n\r\n## Summary\r\n\r\nWhen creating a new Template, it did not prevent entering a #, but when\r\nsaving the template the user received an error. The hash has been added\r\nto the list of invalid characters for the name.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2b59d245-c96f-4215-ad89-a3201bef5e94","sha":"4339f8465720c507351a2e65a6fe881a10dcd938"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195776","number":195776,"mergeCommit":{"message":"Not allow # in index template name (#195776)\n\nCloses [#81870](https://github.com/elastic/kibana/issues/81870)\r\n\r\n## Summary\r\n\r\nWhen creating a new Template, it did not prevent entering a #, but when\r\nsaving the template the user received an error. The hash has been added\r\nto the list of invalid characters for the name.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2b59d245-c96f-4215-ad89-a3201bef5e94","sha":"4339f8465720c507351a2e65a6fe881a10dcd938"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Sonia Sanz Vivas <[email protected]>
Closes #81870
Summary
When creating a new Template, it did not prevent entering a #, but when saving the template the user received an error. The hash has been added to the list of invalid characters for the name.
81870.mov