-
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
[Snapshot and restore] Avoid duplicated error messages #209316
[Snapshot and restore] Avoid duplicated error messages #209316
Conversation
Pinging @elastic/kibana-management (Team:Kibana Management) |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
cc @SoniaSanzV |
Unless this is riskier than it looks, I think this could be backported to all releases with this problem. (at very least 9.0.0 and 8.18.0) |
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.
code changes look good and work well
Starting backport for target branches: 8.18, 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/13130383452 |
Fixes elastic#187065 ## Summary In the repository creation endpoint, when the validation failed, we were showing duplicated errors. This was caused by how the validation schema was build. This PR refactors the duplication schema so it doesn't duplicate the nama field. ### How to test * RunES with yarn es snapshot --license=trial -E path.repo=/tmp/es-backups * Navigate to repos list and try creating a new repo * Fill the name input with an string longer than 1000 chars. * Verify the error message when saving the repo is not duplicated ### Screenshot <img width="1032" alt="Screenshot 2025-02-03 at 15 24 27" src="https://github.com/user-attachments/assets/75231f68-a13e-44bf-8d8a-be488c9f25e5" /> (cherry picked from commit 8d46aff)
Fixes elastic#187065 ## Summary In the repository creation endpoint, when the validation failed, we were showing duplicated errors. This was caused by how the validation schema was build. This PR refactors the duplication schema so it doesn't duplicate the nama field. ### How to test * RunES with yarn es snapshot --license=trial -E path.repo=/tmp/es-backups * Navigate to repos list and try creating a new repo * Fill the name input with an string longer than 1000 chars. * Verify the error message when saving the repo is not duplicated ### Screenshot <img width="1032" alt="Screenshot 2025-02-03 at 15 24 27" src="https://github.com/user-attachments/assets/75231f68-a13e-44bf-8d8a-be488c9f25e5" /> (cherry picked from commit 8d46aff)
Fixes elastic#187065 ## Summary In the repository creation endpoint, when the validation failed, we were showing duplicated errors. This was caused by how the validation schema was build. This PR refactors the duplication schema so it doesn't duplicate the nama field. ### How to test * RunES with yarn es snapshot --license=trial -E path.repo=/tmp/es-backups * Navigate to repos list and try creating a new repo * Fill the name input with an string longer than 1000 chars. * Verify the error message when saving the repo is not duplicated ### Screenshot <img width="1032" alt="Screenshot 2025-02-03 at 15 24 27" src="https://github.com/user-attachments/assets/75231f68-a13e-44bf-8d8a-be488c9f25e5" /> (cherry picked from commit 8d46aff)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
#209454) # Backport This will backport the following commits from `main` to `8.x`: - [[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>
… (#209453) # Backport This will backport the following commits from `main` to `8.18`: - [[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>
#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>
Fixes elastic#187065 ## Summary In the repository creation endpoint, when the validation failed, we were showing duplicated errors. This was caused by how the validation schema was build. This PR refactors the duplication schema so it doesn't duplicate the nama field. ### How to test * RunES with yarn es snapshot --license=trial -E path.repo=/tmp/es-backups * Navigate to repos list and try creating a new repo * Fill the name input with an string longer than 1000 chars. * Verify the error message when saving the repo is not duplicated ### Screenshot <img width="1032" alt="Screenshot 2025-02-03 at 15 24 27" src="https://github.com/user-attachments/assets/75231f68-a13e-44bf-8d8a-be488c9f25e5" />
Fixes #187065
Summary
In the repository creation endpoint, when the validation failed, we were showing duplicated errors. This was caused by how the validation schema was build. This PR refactors the duplication schema so it doesn't duplicate the nama field.
How to test
Screenshot