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

fix(slo): handle permission error #167933

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

kdelemme
Copy link
Contributor

@kdelemme kdelemme commented Oct 3, 2023

Resolves #167924

🍒 Summary

This PR catches any security_exception error thrown by the transform install API, and return a 403 with the root cause message.
The react query hooks have been updated to handle any server error, and particularly show the error.body.message if any, or fallback to the error.message which is the related status message, e.g. Forbidden, Bad Request, ...

Small toast Larger toast With plain error
Screenshot 2023-10-03 at 3 41 14 PM Screenshot 2023-10-03 at 3 41 31 PM Screenshot 2023-10-03 at 4 10 35 PM

@kdelemme kdelemme added release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" Feature:SLO v8.12.0 labels Oct 3, 2023
@kdelemme kdelemme self-assigned this Oct 3, 2023
@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.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@kdelemme kdelemme marked this pull request as ready for review October 3, 2023 20:12
@kdelemme kdelemme requested a review from a team as a code owner October 3, 2023 20:12
@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

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
observability 1.0MB 1.0MB +376.0B

History

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

cc @kdelemme

Copy link
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

LGTM

While reviewing this I found another bug that I documented in this issue: #168051

@kdelemme kdelemme merged commit 335fc9b into elastic:main Oct 5, 2023
19 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Oct 5, 2023
@kdelemme kdelemme deleted the fix/slo-permission-error branch October 5, 2023 13:17
kdelemme added a commit to kdelemme/kibana that referenced this pull request Oct 6, 2023
@kdelemme
Copy link
Contributor Author

kdelemme commented Oct 6, 2023

💚 All backports created successfully

Status Branch Result
8.11

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kdelemme added a commit to kdelemme/kibana that referenced this pull request Oct 6, 2023
kdelemme added a commit that referenced this pull request Oct 10, 2023
# Backport

This will backport the following commits from `main` to `8.11`:
- [fix(slo): handle permission error
(#167933)](#167933)

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

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

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-10-05T13:17:32Z","message":"fix(slo):
handle permission error
(#167933)","sha":"335fc9b2409855f4aeebf360c0747141b2fcf03b","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","Team:
Actionable
Observability","Feature:SLO","v8.12.0"],"number":167933,"url":"https://github.com/elastic/kibana/pull/167933","mergeCommit":{"message":"fix(slo):
handle permission error
(#167933)","sha":"335fc9b2409855f4aeebf360c0747141b2fcf03b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/167933","number":167933,"mergeCommit":{"message":"fix(slo):
handle permission error
(#167933)","sha":"335fc9b2409855f4aeebf360c0747141b2fcf03b"}},{"url":"https://github.com/elastic/kibana/pull/168231","number":168231,"branch":"8.10","state":"OPEN"}]}]
BACKPORT-->
dej611 pushed a commit to dej611/kibana that referenced this pull request Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:SLO release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.11.0 v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SLO] Improve error messages on permission issue
6 participants