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

[Fleet] Improve space selector validation when not providing valid space #197117

Merged
merged 4 commits into from
Oct 22, 2024

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Oct 21, 2024

Summary

Resolve #192547

Improve space selector validation to block the policy creation or update if the searched space is invalid

Screenshot 2024-10-21 at 2 27 15 PM

I added a unit test to cover that scenario

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development labels Oct 21, 2024
@nchaulet nchaulet self-assigned this Oct 21, 2024
@nchaulet nchaulet requested a review from a team as a code owner October 21, 2024 18:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

@nchaulet nchaulet marked this pull request as draft October 21, 2024 18:50
@nchaulet nchaulet marked this pull request as ready for review October 21, 2024 19:17
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.7MB 1.7MB +408.0B

cc @nchaulet

Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

LGTM

@nchaulet nchaulet merged commit b668544 into elastic:main Oct 22, 2024
24 checks passed
@kibanamachine
Copy link
Contributor

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

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

@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.15 Backport failed because of merge conflicts
8.16
8.x

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 197117

Questions ?

Please refer to the Backport tool documentation

@nchaulet nchaulet added v8.16.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development labels Oct 22, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 22, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 22, 2024
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
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 Oct 22, 2024
…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]>
kibanamachine added a commit that referenced this pull request Oct 22, 2024
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet]: Space Field Validation Fails on creating a new policy
4 participants