Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[9.0] [Snapshot and restore] Avoid duplicated error messages (#209316) (
#209455) # Backport This will backport the following commits from `main` to `9.0`: - [[Snapshot and restore] Avoid duplicated error messages (#209316)](#209316) <!--- 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":"sonia.sanzvivas@elastic.co"},"sourceCommit":{"committedDate":"2025-02-04T07:26:08Z","message":"[Snapshot and restore] Avoid duplicated error messages (#209316)\n\nFixes https://github.com/elastic/kibana/issues/187065\n\n## Summary\nIn the repository creation endpoint, when the validation failed, we were\nshowing duplicated errors. This was caused by how the validation schema\nwas build. This PR refactors the duplication schema so it doesn't\nduplicate the nama field.\n\n### How to test\n\n* RunES with yarn es snapshot --license=trial -E\npath.repo=/tmp/es-backups\n* Navigate to repos list and try creating a new repo\n* Fill the name input with an string longer than 1000 chars.\n* Verify the error message when saving the repo is not duplicated\n\n### Screenshot\n<img width=\"1032\" alt=\"Screenshot 2025-02-03 at 15 24 27\"\nsrc=\"https://github.com/user-attachments/assets/75231f68-a13e-44bf-8d8a-be488c9f25e5\"\n/>","sha":"8d46aff46bb59b7b417d348fd3a1343e560ec413","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Kibana Management","release_note:skip","Feature:Snapshot and Restore","v9.0.0","backport:prev-minor","v8.18.0","v9.1.0","v8.19.0"],"title":"[Snapshot and restore] Avoid duplicated error messages","number":209316,"url":"https://github.com/elastic/kibana/pull/209316","mergeCommit":{"message":"[Snapshot and restore] Avoid duplicated error messages (#209316)\n\nFixes https://github.com/elastic/kibana/issues/187065\n\n## Summary\nIn the repository creation endpoint, when the validation failed, we were\nshowing duplicated errors. This was caused by how the validation schema\nwas build. This PR refactors the duplication schema so it doesn't\nduplicate the nama field.\n\n### How to test\n\n* RunES with yarn es snapshot --license=trial -E\npath.repo=/tmp/es-backups\n* Navigate to repos list and try creating a new repo\n* Fill the name input with an string longer than 1000 chars.\n* Verify the error message when saving the repo is not duplicated\n\n### Screenshot\n<img width=\"1032\" alt=\"Screenshot 2025-02-03 at 15 24 27\"\nsrc=\"https://github.com/user-attachments/assets/75231f68-a13e-44bf-8d8a-be488c9f25e5\"\n/>","sha":"8d46aff46bb59b7b417d348fd3a1343e560ec413"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209316","number":209316,"mergeCommit":{"message":"[Snapshot and restore] Avoid duplicated error messages (#209316)\n\nFixes https://github.com/elastic/kibana/issues/187065\n\n## Summary\nIn the repository creation endpoint, when the validation failed, we were\nshowing duplicated errors. This was caused by how the validation schema\nwas build. This PR refactors the duplication schema so it doesn't\nduplicate the nama field.\n\n### How to test\n\n* RunES with yarn es snapshot --license=trial -E\npath.repo=/tmp/es-backups\n* Navigate to repos list and try creating a new repo\n* Fill the name input with an string longer than 1000 chars.\n* Verify the error message when saving the repo is not duplicated\n\n### Screenshot\n<img width=\"1032\" alt=\"Screenshot 2025-02-03 at 15 24 27\"\nsrc=\"https://github.com/user-attachments/assets/75231f68-a13e-44bf-8d8a-be488c9f25e5\"\n/>","sha":"8d46aff46bb59b7b417d348fd3a1343e560ec413"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Sonia Sanz Vivas <sonia.sanzvivas@elastic.co>
- Loading branch information