-
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
[Fleet] Improve space selector validation when not providing valid space #197117
[Fleet] Improve space selector validation when not providing valid space #197117
Conversation
Pinging @elastic/fleet (Team:Fleet) |
@elasticmachine merge upstream |
…ibana into fix-space-selector-validation
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.
LGTM
Starting backport for target branches: 8.15, 8.16, 8.x |
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
Starting backport for target branches: 8.16, 8.x |
…ace (elastic#197117) (cherry picked from commit b668544)
…ace (elastic#197117) (cherry picked from commit b668544)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…lid space (#197117) (#197224) # Backport This will backport the following commits from `main` to `8.x`: - [[Fleet] Improve space selector validation when not providing valid space (#197117)](#197117) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nicolas Chaulet","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-22T12:12:08Z","message":"[Fleet] Improve space selector validation when not providing valid space (#197117)","sha":"b668544406aa45df70c5c3e1f88ccf2b1c0eb140","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-major"],"title":"[Fleet] Improve space selector validation when not providing valid space","number":197117,"url":"https://github.com/elastic/kibana/pull/197117","mergeCommit":{"message":"[Fleet] Improve space selector validation when not providing valid space (#197117)","sha":"b668544406aa45df70c5c3e1f88ccf2b1c0eb140"}},"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/197117","number":197117,"mergeCommit":{"message":"[Fleet] Improve space selector validation when not providing valid space (#197117)","sha":"b668544406aa45df70c5c3e1f88ccf2b1c0eb140"}}]}] BACKPORT--> Co-authored-by: Nicolas Chaulet <[email protected]>
…alid space (#197117) (#197223) # Backport This will backport the following commits from `main` to `8.16`: - [[Fleet] Improve space selector validation when not providing valid space (#197117)](#197117) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nicolas Chaulet","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-22T12:12:08Z","message":"[Fleet] Improve space selector validation when not providing valid space (#197117)","sha":"b668544406aa45df70c5c3e1f88ccf2b1c0eb140","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-major"],"title":"[Fleet] Improve space selector validation when not providing valid space","number":197117,"url":"https://github.com/elastic/kibana/pull/197117","mergeCommit":{"message":"[Fleet] Improve space selector validation when not providing valid space (#197117)","sha":"b668544406aa45df70c5c3e1f88ccf2b1c0eb140"}},"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/197117","number":197117,"mergeCommit":{"message":"[Fleet] Improve space selector validation when not providing valid space (#197117)","sha":"b668544406aa45df70c5c3e1f88ccf2b1c0eb140"}}]}] BACKPORT--> Co-authored-by: Nicolas Chaulet <[email protected]>
Summary
Resolve #192547
Improve space selector validation to block the policy creation or update if the searched space is invalid
I added a unit test to cover that scenario