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

[8.x] Create the "Asset Inventory" Kibana Plugin (#202291) #202827

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

albertoblaz
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

Closes elastic#201704.

Create an empty "Asset Inventory" plugin with the minimal boilerplate
required to set it up, install it and run it on Kibana with a blank
slate.

I generated the files using the `node scripts/generate_plugin <NAME>`
script as per [this documentation
page](https://docs.elastic.dev/kibana-dev-docs/getting-started/hello-world-app#2-option-2---use-the-automatic-plugin-generator).

### Screenshots

<details><summary>Main page (Sample page)</summary>
<img width="2498" alt="Screenshot 2024-11-29 at 14 20 57"
src="https://github.com/user-attachments/assets/9d8a3751-519b-4661-bc90-cbb1e836b111">
</details>

### Implementation details

- [x] Generated a new Kibana plugin with minimal boilerplate and zero
dependencies
- [x] Use [Cloud Security
Posture](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture)
plugin as configuration reference
- [x] Render "Inventory" title on the main page
- [x] Ensure the plugin is properly integrated into Kibana's build and
can be loaded without errors
- [x] Place the plugin under the `x-pack/plugins` directory
- [x] Include Readme file
- [x] Introduce placeholders for initialization of pipelines and
transforms following [Cloud Security
Posture](https://github.com/elastic/kibana/blob/main/x-pack/plugins/cloud_security_posture/server/plugin.ts)
plugin initialize function.

### PR Checklist

- [ ] No docs for now
~~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~~
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Risks

No risks at all since this is totally green-field and will be hidden by
a feature toggle.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Paulo Silva <paulo.henrique@elastic.co>
(cherry picked from commit e5b1773)

# Conflicts:
#	.github/CODEOWNERS
Copy link
Contributor

github-actions bot commented Dec 3, 2024

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

@albertoblaz albertoblaz self-assigned this Dec 3, 2024
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
assetInventory - 16 +16

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
assetInventory - 6 +6

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
assetInventory - 1.2KB +1.2KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
assetInventory - 3.1KB +3.1KB
Unknown metric groups

API count

id before after diff
assetInventory - 6 +6

async chunk count

id before after diff
assetInventory - 1 +1

ESLint disabled line counts

id before after diff
assetInventory - 5 +5

References to deprecated APIs

id before after diff
assetInventory - 1 +1

Total ESLint disabled count

id before after diff
assetInventory - 5 +5

cc @albertoblaz

@albertoblaz albertoblaz merged commit 692b9b1 into elastic:8.x Dec 4, 2024
8 checks passed
@albertoblaz albertoblaz deleted the backport/8.x/pr-202291 branch December 4, 2024 09:47
albertoblaz added a commit to albertoblaz/kibana that referenced this pull request Dec 17, 2024
albertoblaz added a commit to albertoblaz/kibana that referenced this pull request Dec 18, 2024
kapral18 pushed a commit that referenced this pull request Dec 18, 2024
## Summary

Clean-up all "Asset Inventory" plugin code from the `8.x` branch. 

### Motivation

It was decided in the weekly meetings not to backport any work related
to Asset Inventory because it's a new feature. However, this decision
was made after I had already shipped the first PR that introduced all
the minimal required boilerplate:

- #202291

which was backported with:

- #202827

I couldn't auto revert the merge commit because of this refactor PR that
was merged in between:

- #202862

So I'm deleting and reverting each change manually.

### Checklist

- [x] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Risks

No risk at all.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants