-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] fix policy validation #124040
[Fleet] fix policy validation #124040
Conversation
Pinging @elastic/fleet (Team:Fleet) |
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.
Thanks for the fix!
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 860a207)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 860a207)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 860a207)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
We have validated this ticket and found it working fine on 8.0 RC2 BC4 self managed environment.
Build details: Thanks |
Summary
Fixes #123704
Package policy could be submitted with an invalid form (missing required field).
it looks like the problem is that the formState is set to VALID when agent policy is updated on the form, this seems to happen even if the form has validation errors.
https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx#L177
To test:
Add Custom Logs integration: http://localhost:5601/app/fleet/integrations/log-1.0.0/add-integration
Verify that Log file path is empty, and when clicking on the input, it shows up as required.
Verify that the form can't be submitted until the field value is set (changing agent policy should not make the form valid)