[Fleet] fix policy validation#124040
Merged
juliaElastic merged 2 commits intoelastic:mainfrom Jan 31, 2022
Merged
Conversation
Contributor
|
Pinging @elastic/fleet (Team:Fleet) |
Contributor
Author
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
kibanamachine
added a commit
to kibanamachine/kibana
that referenced
this pull request
Jan 31, 2022
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 860a207)
kibanamachine
added a commit
to kibanamachine/kibana
that referenced
this pull request
Jan 31, 2022
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 860a207)
kibanamachine
added a commit
to kibanamachine/kibana
that referenced
this pull request
Jan 31, 2022
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 860a207)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
awahab07
pushed a commit
to awahab07/kibana
that referenced
this pull request
Jan 31, 2022
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
kibanamachine
added a commit
that referenced
this pull request
Jan 31, 2022
kibanamachine
added a commit
that referenced
this pull request
Jan 31, 2022
kibanamachine
added a commit
that referenced
this pull request
Jan 31, 2022
|
We have validated this ticket and found it working fine on 8.0 RC2 BC4 self managed environment.
Build details: Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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)