-
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
[Ingest Manager] Do not allow empty namespace #67492
[Ingest Manager] Do not allow empty namespace #67492
Conversation
Pinging @elastic/ingest-management (Team:Ingest Management) |
I think this change will impact the data resources provider we have in Endpoint Functional test (which are currently disabled). I will keep this in mind when re-enabling them. @elastic/endpoint-management FYI ^ |
💚 Build SucceededTo update your PR or re-run it, just comment with: |
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 LGTM
@@ -9,7 +9,7 @@ import { AgentConfigStatus } from '../../../common'; | |||
|
|||
const AgentConfigBaseSchema = { | |||
name: schema.string(), | |||
namespace: schema.maybe(schema.string()), | |||
namespace: schema.string({ minLength: 1 }), |
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.
@nchaulet Can we use this to also do some validation? For example namespace should not contain - as an example.
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.
Yes we can provide a validate function, where we can add all the custom logic we want
Summary
Resolve #67473
We should not allow empty namespace as it broke Kibana.
This PR add server side validation to avoid empty namespace, I did not add any client side validation as @jen-huang is currently working on this form #66298
Also done in this PR:
UI example