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] Disable infra plugin in serverless projects #165289

Conversation

crespocarlos
Copy link
Contributor

@crespocarlos crespocarlos commented Aug 31, 2023

closes #158925

Summary

This PR disables the infra plugin in the oblt and security projects

Oblt

Navbar
image

Saved Objects
image

Server-side APIs
image

Infra routes
/metrics/inventory

image

Alert rules
image

APM

Infra links hidden in the Transaction "Investigate" pop up menu
image

Infra links removed from Services Overview Instance actions
image

** Server Routes **

image image image

Security

Saved Objects
image

Server-side APIs
image

Infra routes
/metrics/inventory

image

How to test

  • Start a local ES instance
  • run yarn serverless-oblt and yarn serverless-security
  • Validate the screenshots above.

@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!)

@crespocarlos crespocarlos changed the title Disable infra in serverless [Infra] Disable infra plugin in serverless projects Aug 31, 2023
@crespocarlos crespocarlos added release_note:fix Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services backport:skip This commit does not require backporting v8.11.0 labels Aug 31, 2023
@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@crespocarlos
Copy link
Contributor Author

buildkite test this

@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@weltenwort
Copy link
Member

/oblt-deploy-serverless

@crespocarlos
Copy link
Contributor Author

/oblt-deploy-serverless

@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@crespocarlos crespocarlos marked this pull request as ready for review September 4, 2023 13:59
@crespocarlos crespocarlos requested review from a team as code owners September 4, 2023 13:59
@crespocarlos
Copy link
Contributor Author

Hi @weltenwort , thanks for reviewing it.

  1. Can we also mark the infra plugin as optional in the apm plugin's server-side types? That way we can let the compiler enforce the softness of the dependency in the server-side code too.

Done! I had to touch 3 endpoints. While doing this I also found a couple more places in the UI that depended on InfraLocators. Fixed those too.

  1. When starting Kibana I noticed that it disables the plugin ux because it has a dependency on infra. Can we clarify whether ux is supposed to be disabled?

Apparently ux didn't even need to depend on infra. I've removed it from the dependency list.

@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@tonyghiani tonyghiani closed this Sep 7, 2023
@tonyghiani tonyghiani reopened this Sep 7, 2023
@tonyghiani
Copy link
Contributor

I closed it by mistake, I was in the wrong browser tab I'm sorry 🙏

@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@crespocarlos crespocarlos added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:fix labels Sep 7, 2023
Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

LGTM, tested on a QA serverless project 👍 thanks for taking care of this.

I'll leave it to the apm-ui team to judge whether throwing exceptions is the appropriate way of handling a disabled infra dependency.

Copy link
Contributor

@MiriamAparicio MiriamAparicio left a comment

Choose a reason for hiding this comment

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

LGTM

@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 8, 2023

💚 Build Succeeded

  • Buildkite Build
  • Commit: 77f4914
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-165289-77f4914bacdc

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
apm 3.7MB 3.7MB +130.0B

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5594 +5594
total size - 6.0MB +6.0MB

History

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

@crespocarlos crespocarlos merged commit 7ba3554 into elastic:main Sep 8, 2023
@crespocarlos crespocarlos deleted the 158925-disable-infra-in-serverless-projets branch September 8, 2023 13:05
mohamedhamed-ahmed added a commit that referenced this pull request Sep 20, 2023
closes #164995
closes #165618
closes #166596

## 📝  Summary

### Observability Log Explorer Locators:

This PR adds 2 new customized locators to the Observability log explorer
profile. At the moment we implemented:

       1- Single dataset selector locator
       2- All dataset selector locator

With more locators to come in the future depending on the use cases.

### Log Explorer Locators:

We also added a log explorer locator that navigates to discover, this
can be used in case the **Observability Log Explorer** plugin is
disabled.

### Logs Onboarding:

The PR also replaces the temp navigation to the default discover we
implemented for[ 8.10
here](#163218) with the above new
Observability Log Explorer locators.

### APM:

After [disabling infra plugin in serverless
projects](#165289), APM links to
infra locators in serverless have been replaced to use the above
locators.

### Observability Landing Page:

The landing page now redirects to the Log Explorer if `logs-*-*` has
data in it, otherwise the flow continues as before.

### Necessary Refactoring:

To avoid the circular dependency between `ObservabilityLogExplorer` &
`ObservabilityOnboarding` after each one using the other's locator and
importing the necessary types, I moved the type definition for all
locators in the `deeplinks` package.

## ✅  Testing

- Onboarding Wizard in Serverless and Stateful

    1. Navigate to the onboarding flow `/app/observabilityOnboarding/`
    2. Choose either System logs or Stream log files
    3. Go through the onboarding wizard
    4. Click the Explore logs button at the end
5. You should be redirected to observability log explorer with the
integration and dataset preselected.

- APM links in Serverless

1. Navigate to APM and click on the logs links as shown in the Demos
below
2. All links should navigate to Observability Log Explorer with the
queries set in the search bar.

## 🎥 Demos

- APM Serverless


https://github.com/elastic/kibana/assets/11225826/7161364e-333f-4ac4-87d5-7f1ffec699b3


- APM Stateful


https://github.com/elastic/kibana/assets/11225826/058c9587-b766-4d4f-a73d-50fd381be4bb


- Onboarding Serverless



https://github.com/elastic/kibana/assets/11225826/ee1cab42-f91c-4558-aa5f-4fa7e8963427

- Onboarding Stateful



https://github.com/elastic/kibana/assets/11225826/a376a12b-499b-4488-a75a-d06e81f8e21d

- Observability Landing Page 



https://github.com/elastic/kibana/assets/11225826/c1c084ca-b1b1-4c4b-a4e6-ae8e157dcf57

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Marco Antonio Ghiani <[email protected]>
Co-authored-by: Marco Antonio Ghiani <[email protected]>
gergoabraham pushed a commit to gergoabraham/kibana that referenced this pull request Sep 21, 2023
closes elastic#164995
closes elastic#165618
closes elastic#166596

## 📝  Summary

### Observability Log Explorer Locators:

This PR adds 2 new customized locators to the Observability log explorer
profile. At the moment we implemented:

       1- Single dataset selector locator
       2- All dataset selector locator

With more locators to come in the future depending on the use cases.

### Log Explorer Locators:

We also added a log explorer locator that navigates to discover, this
can be used in case the **Observability Log Explorer** plugin is
disabled.

### Logs Onboarding:

The PR also replaces the temp navigation to the default discover we
implemented for[ 8.10
here](elastic#163218) with the above new
Observability Log Explorer locators.

### APM:

After [disabling infra plugin in serverless
projects](elastic#165289), APM links to
infra locators in serverless have been replaced to use the above
locators.

### Observability Landing Page:

The landing page now redirects to the Log Explorer if `logs-*-*` has
data in it, otherwise the flow continues as before.

### Necessary Refactoring:

To avoid the circular dependency between `ObservabilityLogExplorer` &
`ObservabilityOnboarding` after each one using the other's locator and
importing the necessary types, I moved the type definition for all
locators in the `deeplinks` package.

## ✅  Testing

- Onboarding Wizard in Serverless and Stateful

    1. Navigate to the onboarding flow `/app/observabilityOnboarding/`
    2. Choose either System logs or Stream log files
    3. Go through the onboarding wizard
    4. Click the Explore logs button at the end
5. You should be redirected to observability log explorer with the
integration and dataset preselected.

- APM links in Serverless

1. Navigate to APM and click on the logs links as shown in the Demos
below
2. All links should navigate to Observability Log Explorer with the
queries set in the search bar.

## 🎥 Demos

- APM Serverless


https://github.com/elastic/kibana/assets/11225826/7161364e-333f-4ac4-87d5-7f1ffec699b3


- APM Stateful


https://github.com/elastic/kibana/assets/11225826/058c9587-b766-4d4f-a73d-50fd381be4bb


- Onboarding Serverless



https://github.com/elastic/kibana/assets/11225826/ee1cab42-f91c-4558-aa5f-4fa7e8963427

- Onboarding Stateful



https://github.com/elastic/kibana/assets/11225826/a376a12b-499b-4488-a75a-d06e81f8e21d

- Observability Landing Page 



https://github.com/elastic/kibana/assets/11225826/c1c084ca-b1b1-4c4b-a4e6-ae8e157dcf57

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Marco Antonio Ghiani <[email protected]>
Co-authored-by: Marco Antonio Ghiani <[email protected]>
Kerry350 added a commit that referenced this pull request Sep 27, 2023
## Summary

Closes #165227.

Removes configurable app targets. Only the standard logs app is
registered (Note: [Infra is disabled in
serverless](#165289) observability
/ security projects currently).

---------

Co-authored-by: Kibana Machine <[email protected]>
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 ci:build-serverless-image release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Infra UI] Disable infra plugin in serverless projects
10 participants