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

[Infra] Show the correct error message when the request to/api/metrics/source/ fails #200190

Closed
jennypavlova opened this issue Nov 14, 2024 · 1 comment · Fixed by #200531
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience sdh-linked Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@jennypavlova
Copy link
Member

Kibana version: 8.15.x

Describe the bug: When the request to /api/metrics/source/ fails we show the wrong message regarding the remote cluster connection - the correct message should be related to the source error

Steps to reproduce:

  1. It's not easy to reproduce - the only easy way I see is to "fake" an error API response (4** / 5**)
  2. Then go to Metrics Explorer
  3. A wrong error message is displayed:

Image

Expected behavior:
The error message should be based on the error thrown

To fix that we need is: first to return the source errors if any and then show the remote cluster error (only if the request is successful and no other errors are present)

@jennypavlova jennypavlova added bug Fixes for quality problems that affect the customer experience sdh-linked Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Nov 14, 2024
@jennypavlova jennypavlova self-assigned this Nov 14, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 18, 2024
Closes elastic#200190

## Summary

This PR fixes the issue with the errors shown on the metrics explorer
page - when the metrics indices can't be fetched we should show the
error returned and if there is no fetch error and a remote cluster
configured but no connection is possible we should show the remote
cluster error:

- Example with 504 error

![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)

- Example with remote cluster error

![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)

## Testing
Couldn't find a way to reproduce this so I "faked" the API response to
be an error and checked several cases
- API returns an error, we should show the error:

https://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe

- API doesn't return an error but the remote cluster connection wasn't
possible, we should show the remote cluster error:

https://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb

- If no remote cluster is used/or a remote cluster is connected and the
API response is not returning an error the page should load correctly:

https://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c
(cherry picked from commit 46d4c84)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 18, 2024
Closes elastic#200190

## Summary

This PR fixes the issue with the errors shown on the metrics explorer
page - when the metrics indices can't be fetched we should show the
error returned and if there is no fetch error and a remote cluster
configured but no connection is possible we should show the remote
cluster error:

- Example with 504 error

![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)

- Example with remote cluster error

![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)

## Testing
Couldn't find a way to reproduce this so I "faked" the API response to
be an error and checked several cases
- API returns an error, we should show the error:

https://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe

- API doesn't return an error but the remote cluster connection wasn't
possible, we should show the remote cluster error:

https://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb

- If no remote cluster is used/or a remote cluster is connected and the
API response is not returning an error the page should load correctly:

https://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c
(cherry picked from commit 46d4c84)
jennypavlova added a commit to jennypavlova/kibana that referenced this issue Nov 18, 2024
Closes elastic#200190

## Summary

This PR fixes the issue with the errors shown on the metrics explorer
page - when the metrics indices can't be fetched we should show the
error returned and if there is no fetch error and a remote cluster
configured but no connection is possible we should show the remote
cluster error:

- Example with 504 error

![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)

- Example with remote cluster error

![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)

## Testing
Couldn't find a way to reproduce this so I "faked" the API response to
be an error and checked several cases
- API returns an error, we should show the error:

https://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe

- API doesn't return an error but the remote cluster connection wasn't
possible, we should show the remote cluster error:

https://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb

- If no remote cluster is used/or a remote cluster is connected and the
API response is not returning an error the page should load correctly:

https://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c
(cherry picked from commit 46d4c84)

# Conflicts:
#	x-pack/plugins/observability_solution/infra/public/pages/metrics/page_template.tsx
kibanamachine added a commit that referenced this issue Nov 18, 2024
…) (#200553)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Infra] Change order of the errors shown on Infra pages
(#200531)](#200531)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT
[{"author":{"name":"jennypavlova","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-18T12:30:32Z","message":"[Infra]
Change order of the errors shown on Infra pages (#200531)\n\nCloses
#200190 \r\n\r\n## Summary\r\n\r\nThis PR fixes the issue with the
errors shown on the metrics explorer\r\npage - when the metrics indices
can't be fetched we should show the\r\nerror returned and if there is no
fetch error and a remote cluster\r\nconfigured but no connection is
possible we should show the remote\r\ncluster error:\r\n\r\n- Example
with 504 error
\r\n\r\n![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)\r\n\r\n-
Example with remote cluster
error\r\n\r\n![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)\r\n\r\n\r\n##
Testing\r\nCouldn't find a way to reproduce this so I \"faked\" the API
response to\r\nbe an error and checked several cases\r\n- API returns an
error, we should show the
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe\r\n\r\n\r\n-
API doesn't return an error but the remote cluster connection
wasn't\r\npossible, we should show the remote cluster
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb\r\n\r\n\r\n-
If no remote cluster is used/or a remote cluster is connected and
the\r\nAPI response is not returning an error the page should load
correctly:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c","sha":"46d4c84f2cb3f778d3b0eca83d0cfa4f25a602c4","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-infra_services"],"title":"[Infra]
Change order of the errors shown on Infra
pages","number":200531,"url":"https://github.com/elastic/kibana/pull/200531","mergeCommit":{"message":"[Infra]
Change order of the errors shown on Infra pages (#200531)\n\nCloses
#200190 \r\n\r\n## Summary\r\n\r\nThis PR fixes the issue with the
errors shown on the metrics explorer\r\npage - when the metrics indices
can't be fetched we should show the\r\nerror returned and if there is no
fetch error and a remote cluster\r\nconfigured but no connection is
possible we should show the remote\r\ncluster error:\r\n\r\n- Example
with 504 error
\r\n\r\n![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)\r\n\r\n-
Example with remote cluster
error\r\n\r\n![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)\r\n\r\n\r\n##
Testing\r\nCouldn't find a way to reproduce this so I \"faked\" the API
response to\r\nbe an error and checked several cases\r\n- API returns an
error, we should show the
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe\r\n\r\n\r\n-
API doesn't return an error but the remote cluster connection
wasn't\r\npossible, we should show the remote cluster
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb\r\n\r\n\r\n-
If no remote cluster is used/or a remote cluster is connected and
the\r\nAPI response is not returning an error the page should load
correctly:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c","sha":"46d4c84f2cb3f778d3b0eca83d0cfa4f25a602c4"}},"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/200531","number":200531,"mergeCommit":{"message":"[Infra]
Change order of the errors shown on Infra pages (#200531)\n\nCloses
#200190 \r\n\r\n## Summary\r\n\r\nThis PR fixes the issue with the
errors shown on the metrics explorer\r\npage - when the metrics indices
can't be fetched we should show the\r\nerror returned and if there is no
fetch error and a remote cluster\r\nconfigured but no connection is
possible we should show the remote\r\ncluster error:\r\n\r\n- Example
with 504 error
\r\n\r\n![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)\r\n\r\n-
Example with remote cluster
error\r\n\r\n![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)\r\n\r\n\r\n##
Testing\r\nCouldn't find a way to reproduce this so I \"faked\" the API
response to\r\nbe an error and checked several cases\r\n- API returns an
error, we should show the
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe\r\n\r\n\r\n-
API doesn't return an error but the remote cluster connection
wasn't\r\npossible, we should show the remote cluster
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb\r\n\r\n\r\n-
If no remote cluster is used/or a remote cluster is connected and
the\r\nAPI response is not returning an error the page should load
correctly:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c","sha":"46d4c84f2cb3f778d3b0eca83d0cfa4f25a602c4"}}]}]
BACKPORT-->

Co-authored-by: jennypavlova <[email protected]>
kibanamachine added a commit that referenced this issue Nov 18, 2024
… (#200554)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Infra] Change order of the errors shown on Infra pages
(#200531)](#200531)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT
[{"author":{"name":"jennypavlova","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-18T12:30:32Z","message":"[Infra]
Change order of the errors shown on Infra pages (#200531)\n\nCloses
#200190 \r\n\r\n## Summary\r\n\r\nThis PR fixes the issue with the
errors shown on the metrics explorer\r\npage - when the metrics indices
can't be fetched we should show the\r\nerror returned and if there is no
fetch error and a remote cluster\r\nconfigured but no connection is
possible we should show the remote\r\ncluster error:\r\n\r\n- Example
with 504 error
\r\n\r\n![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)\r\n\r\n-
Example with remote cluster
error\r\n\r\n![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)\r\n\r\n\r\n##
Testing\r\nCouldn't find a way to reproduce this so I \"faked\" the API
response to\r\nbe an error and checked several cases\r\n- API returns an
error, we should show the
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe\r\n\r\n\r\n-
API doesn't return an error but the remote cluster connection
wasn't\r\npossible, we should show the remote cluster
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb\r\n\r\n\r\n-
If no remote cluster is used/or a remote cluster is connected and
the\r\nAPI response is not returning an error the page should load
correctly:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c","sha":"46d4c84f2cb3f778d3b0eca83d0cfa4f25a602c4","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-infra_services"],"title":"[Infra]
Change order of the errors shown on Infra
pages","number":200531,"url":"https://github.com/elastic/kibana/pull/200531","mergeCommit":{"message":"[Infra]
Change order of the errors shown on Infra pages (#200531)\n\nCloses
#200190 \r\n\r\n## Summary\r\n\r\nThis PR fixes the issue with the
errors shown on the metrics explorer\r\npage - when the metrics indices
can't be fetched we should show the\r\nerror returned and if there is no
fetch error and a remote cluster\r\nconfigured but no connection is
possible we should show the remote\r\ncluster error:\r\n\r\n- Example
with 504 error
\r\n\r\n![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)\r\n\r\n-
Example with remote cluster
error\r\n\r\n![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)\r\n\r\n\r\n##
Testing\r\nCouldn't find a way to reproduce this so I \"faked\" the API
response to\r\nbe an error and checked several cases\r\n- API returns an
error, we should show the
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe\r\n\r\n\r\n-
API doesn't return an error but the remote cluster connection
wasn't\r\npossible, we should show the remote cluster
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb\r\n\r\n\r\n-
If no remote cluster is used/or a remote cluster is connected and
the\r\nAPI response is not returning an error the page should load
correctly:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c","sha":"46d4c84f2cb3f778d3b0eca83d0cfa4f25a602c4"}},"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/200531","number":200531,"mergeCommit":{"message":"[Infra]
Change order of the errors shown on Infra pages (#200531)\n\nCloses
#200190 \r\n\r\n## Summary\r\n\r\nThis PR fixes the issue with the
errors shown on the metrics explorer\r\npage - when the metrics indices
can't be fetched we should show the\r\nerror returned and if there is no
fetch error and a remote cluster\r\nconfigured but no connection is
possible we should show the remote\r\ncluster error:\r\n\r\n- Example
with 504 error
\r\n\r\n![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)\r\n\r\n-
Example with remote cluster
error\r\n\r\n![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)\r\n\r\n\r\n##
Testing\r\nCouldn't find a way to reproduce this so I \"faked\" the API
response to\r\nbe an error and checked several cases\r\n- API returns an
error, we should show the
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe\r\n\r\n\r\n-
API doesn't return an error but the remote cluster connection
wasn't\r\npossible, we should show the remote cluster
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb\r\n\r\n\r\n-
If no remote cluster is used/or a remote cluster is connected and
the\r\nAPI response is not returning an error the page should load
correctly:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c","sha":"46d4c84f2cb3f778d3b0eca83d0cfa4f25a602c4"}}]}]
BACKPORT-->

Co-authored-by: jennypavlova <[email protected]>
jennypavlova added a commit that referenced this issue Nov 18, 2024
…) (#200575)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Infra] Change order of the errors shown on Infra pages
(#200531)](#200531)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT
[{"author":{"name":"jennypavlova","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-18T12:30:32Z","message":"[Infra]
Change order of the errors shown on Infra pages (#200531)\n\nCloses
#200190 \r\n\r\n## Summary\r\n\r\nThis PR fixes the issue with the
errors shown on the metrics explorer\r\npage - when the metrics indices
can't be fetched we should show the\r\nerror returned and if there is no
fetch error and a remote cluster\r\nconfigured but no connection is
possible we should show the remote\r\ncluster error:\r\n\r\n- Example
with 504 error
\r\n\r\n![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)\r\n\r\n-
Example with remote cluster
error\r\n\r\n![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)\r\n\r\n\r\n##
Testing\r\nCouldn't find a way to reproduce this so I \"faked\" the API
response to\r\nbe an error and checked several cases\r\n- API returns an
error, we should show the
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe\r\n\r\n\r\n-
API doesn't return an error but the remote cluster connection
wasn't\r\npossible, we should show the remote cluster
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb\r\n\r\n\r\n-
If no remote cluster is used/or a remote cluster is connected and
the\r\nAPI response is not returning an error the page should load
correctly:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c","sha":"46d4c84f2cb3f778d3b0eca83d0cfa4f25a602c4","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-infra_services"],"number":200531,"url":"https://github.com/elastic/kibana/pull/200531","mergeCommit":{"message":"[Infra]
Change order of the errors shown on Infra pages (#200531)\n\nCloses
#200190 \r\n\r\n## Summary\r\n\r\nThis PR fixes the issue with the
errors shown on the metrics explorer\r\npage - when the metrics indices
can't be fetched we should show the\r\nerror returned and if there is no
fetch error and a remote cluster\r\nconfigured but no connection is
possible we should show the remote\r\ncluster error:\r\n\r\n- Example
with 504 error
\r\n\r\n![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)\r\n\r\n-
Example with remote cluster
error\r\n\r\n![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)\r\n\r\n\r\n##
Testing\r\nCouldn't find a way to reproduce this so I \"faked\" the API
response to\r\nbe an error and checked several cases\r\n- API returns an
error, we should show the
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe\r\n\r\n\r\n-
API doesn't return an error but the remote cluster connection
wasn't\r\npossible, we should show the remote cluster
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb\r\n\r\n\r\n-
If no remote cluster is used/or a remote cluster is connected and
the\r\nAPI response is not returning an error the page should load
correctly:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c","sha":"46d4c84f2cb3f778d3b0eca83d0cfa4f25a602c4"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200531","number":200531,"mergeCommit":{"message":"[Infra]
Change order of the errors shown on Infra pages (#200531)\n\nCloses
#200190 \r\n\r\n## Summary\r\n\r\nThis PR fixes the issue with the
errors shown on the metrics explorer\r\npage - when the metrics indices
can't be fetched we should show the\r\nerror returned and if there is no
fetch error and a remote cluster\r\nconfigured but no connection is
possible we should show the remote\r\ncluster error:\r\n\r\n- Example
with 504 error
\r\n\r\n![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)\r\n\r\n-
Example with remote cluster
error\r\n\r\n![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)\r\n\r\n\r\n##
Testing\r\nCouldn't find a way to reproduce this so I \"faked\" the API
response to\r\nbe an error and checked several cases\r\n- API returns an
error, we should show the
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe\r\n\r\n\r\n-
API doesn't return an error but the remote cluster connection
wasn't\r\npossible, we should show the remote cluster
error:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb\r\n\r\n\r\n-
If no remote cluster is used/or a remote cluster is connected and
the\r\nAPI response is not returning an error the page should load
correctly:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c","sha":"46d4c84f2cb3f778d3b0eca83d0cfa4f25a602c4"}},{"url":"https://github.com/elastic/kibana/pull/200553","number":200553,"branch":"8.16","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/200554","number":200554,"branch":"8.x","state":"OPEN"}]}]
BACKPORT-->
jesuswr pushed a commit to jesuswr/kibana that referenced this issue Nov 18, 2024
Closes elastic#200190 

## Summary

This PR fixes the issue with the errors shown on the metrics explorer
page - when the metrics indices can't be fetched we should show the
error returned and if there is no fetch error and a remote cluster
configured but no connection is possible we should show the remote
cluster error:

- Example with 504 error 

![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)

- Example with remote cluster error

![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)


## Testing
Couldn't find a way to reproduce this so I "faked" the API response to
be an error and checked several cases
- API returns an error, we should show the error:


https://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe


- API doesn't return an error but the remote cluster connection wasn't
possible, we should show the remote cluster error:


https://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb


- If no remote cluster is used/or a remote cluster is connected and the
API response is not returning an error the page should load correctly:


https://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this issue Dec 12, 2024
Closes elastic#200190 

## Summary

This PR fixes the issue with the errors shown on the metrics explorer
page - when the metrics indices can't be fetched we should show the
error returned and if there is no fetch error and a remote cluster
configured but no connection is possible we should show the remote
cluster error:

- Example with 504 error 

![image](https://github.com/user-attachments/assets/65cd8226-8c81-4c64-b043-c9db5a93d3e0)

- Example with remote cluster error

![image](https://github.com/user-attachments/assets/e024a3f8-76e0-4ad7-8aa6-e35ad5c1112a)


## Testing
Couldn't find a way to reproduce this so I "faked" the API response to
be an error and checked several cases
- API returns an error, we should show the error:


https://github.com/user-attachments/assets/c1086b22-1ff5-4333-97a5-b3d1dca16afe


- API doesn't return an error but the remote cluster connection wasn't
possible, we should show the remote cluster error:


https://github.com/user-attachments/assets/151b3ae4-5ca1-4d54-bd58-2729db202cdb


- If no remote cluster is used/or a remote cluster is connected and the
API response is not returning an error the page should load correctly:


https://github.com/user-attachments/assets/f9ef1066-3dfd-4957-8b46-878bf58d2f1c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience sdh-linked Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants