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] Do not show error state on input if there are no errors #157160

Merged
merged 1 commit into from
May 9, 2023

Conversation

hop-dev
Copy link
Contributor

@hop-dev hop-dev commented May 9, 2023

Summary

Fixes this bug, where there was previously an error with a policy input but it has been corrected by the user, we still show it in the error state without an error message:
Screenshot 2023-05-09 at 12 26 04

Note there is no error message, where a correct error input looks like this:
Screenshot 2023-05-09 at 12 27 44

The error is simply that [] is truthy so was showing as having errors

@hop-dev hop-dev added Team:Fleet Team label for Observability Data Collection Fleet team v8.8.0 labels May 9, 2023
@hop-dev hop-dev self-assigned this May 9, 2023
@hop-dev hop-dev requested a review from a team as a code owner May 9, 2023 13:08
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

🚀

@hop-dev hop-dev enabled auto-merge (squash) May 9, 2023 13:15
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #18 / ObservabilityApp Observability alerts / Add to case > When user has all privileges for cases opens a modal when Add to existing case is clicked

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 960.1KB 960.1KB +18.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 399 403 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 479 483 +4
total +6

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @hop-dev

@hop-dev hop-dev merged commit 5ceeaa0 into elastic:main May 9, 2023
@hop-dev hop-dev deleted the input-ui-error-bug branch May 9, 2023 14:15
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 9, 2023
…tic#157160)

## Summary
Fixes this bug, where there was previously an error with this input but
it has been solved, we still have it in the error state:
<img width="1030" alt="Screenshot 2023-05-09 at 12 26 04"
src="https://github.com/elastic/kibana/assets/3315046/4381523a-d839-4425-af5f-0f56e6aa9199">

Note there is no error message, where a correct error input looks like
this:
<img width="379" alt="Screenshot 2023-05-09 at 12 27 44"
src="https://github.com/elastic/kibana/assets/3315046/4b7a498a-ac9a-46d8-94e1-525f4b090cfd">

The error is simply that `[]` is truthy so was showing as having errors

(cherry picked from commit 5ceeaa0)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

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 May 9, 2023
…#157160) (#157172)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Fleet] Do not show error state on input if there are no errors
(#157160)](#157160)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Mark
Hopkin","email":"mark.hopkin@elastic.co"},"sourceCommit":{"committedDate":"2023-05-09T14:15:27Z","message":"[Fleet]
Do not show error state on input if there are no errors (#157160)\n\n##
Summary\r\nFixes this bug, where there was previously an error with this
input but\r\nit has been solved, we still have it in the error
state:\r\n<img width=\"1030\" alt=\"Screenshot 2023-05-09 at 12 26
04\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3315046/4381523a-d839-4425-af5f-0f56e6aa9199\">\r\n\r\nNote
there is no error message, where a correct error input looks
like\r\nthis:\r\n<img width=\"379\" alt=\"Screenshot 2023-05-09 at 12 27
44\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3315046/4b7a498a-ac9a-46d8-94e1-525f4b090cfd\">\r\n\r\nThe
error is simply that `[]` is truthy so was showing as having
errors","sha":"5ceeaa0333025f6ff6e28208a367e05622b40dc6","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","v8.8.0","v8.9.0"],"number":157160,"url":"https://github.com/elastic/kibana/pull/157160","mergeCommit":{"message":"[Fleet]
Do not show error state on input if there are no errors (#157160)\n\n##
Summary\r\nFixes this bug, where there was previously an error with this
input but\r\nit has been solved, we still have it in the error
state:\r\n<img width=\"1030\" alt=\"Screenshot 2023-05-09 at 12 26
04\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3315046/4381523a-d839-4425-af5f-0f56e6aa9199\">\r\n\r\nNote
there is no error message, where a correct error input looks
like\r\nthis:\r\n<img width=\"379\" alt=\"Screenshot 2023-05-09 at 12 27
44\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3315046/4b7a498a-ac9a-46d8-94e1-525f4b090cfd\">\r\n\r\nThe
error is simply that `[]` is truthy so was showing as having
errors","sha":"5ceeaa0333025f6ff6e28208a367e05622b40dc6"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/157160","number":157160,"mergeCommit":{"message":"[Fleet]
Do not show error state on input if there are no errors (#157160)\n\n##
Summary\r\nFixes this bug, where there was previously an error with this
input but\r\nit has been solved, we still have it in the error
state:\r\n<img width=\"1030\" alt=\"Screenshot 2023-05-09 at 12 26
04\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3315046/4381523a-d839-4425-af5f-0f56e6aa9199\">\r\n\r\nNote
there is no error message, where a correct error input looks
like\r\nthis:\r\n<img width=\"379\" alt=\"Screenshot 2023-05-09 at 12 27
44\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3315046/4b7a498a-ac9a-46d8-94e1-525f4b090cfd\">\r\n\r\nThe
error is simply that `[]` is truthy so was showing as having
errors","sha":"5ceeaa0333025f6ff6e28208a367e05622b40dc6"}}]}]
BACKPORT-->

Co-authored-by: Mark Hopkin <mark.hopkin@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants