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

Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-cloud-security-posture #202862

Conversation

gsoldevila
Copy link
Contributor

@gsoldevila gsoldevila commented Dec 4, 2024

Summary

This PR aims at relocating some of the Kibana modules (plugins and packages) into a new folder structure, according to the Sustainable Kibana Architecture initiative.

Important

  • We kindly ask you to:
    • Manually fix the errors in the error section below (if there are any).
    • Search for the packages[\/\\] and plugins[\/\\] patterns in the source code (Babel and Eslint config files), and update them appropriately.
    • Manually review .buildkite/scripts/pipelines/pull_request/pipeline.ts to ensure that any CI pipeline customizations continue to be correctly applied after the changed path names
    • Review all of the updated files, specially the .ts and .js files listed in the sections below, as some of them contain relative paths that have been updated.
    • Think of potential impact of the move, including tooling and configuration files that can be pointing to the relocated modules. E.g.:
      • customised eslint rules
      • docs pointing to source code

Note

  • This PR has been auto-generated.
  • Any manual contributions will be lost if the 'relocate' script is re-run.
  • Try to obtain the missing reviews / approvals before applying manual fixes, and/or keep your changes in a .patch / git stash.
  • Please use #sustainable_kibana_architecture Slack channel for feedback.

5 plugin(s) are going to be relocated:

Id Target folder
@kbn/asset-inventory-plugin x-pack/solutions/security/plugins/asset_inventory
@kbn/cloud-defend-plugin x-pack/solutions/security/plugins/cloud_defend
@kbn/cloud-security-posture-plugin x-pack/solutions/security/plugins/cloud_security_posture
@kbn/kubernetes-security-plugin x-pack/solutions/security/plugins/kubernetes_security
@kbn/session-view-plugin x-pack/solutions/security/plugins/session_view

4 packages(s) are going to be relocated:

Id Target folder
@kbn/cloud-security-posture x-pack/solutions/security/packages/kbn-cloud-security-posture/public
@kbn/cloud-security-posture-common x-pack/platform/packages/shared/kbn-cloud-security-posture/common
@kbn/cloud-security-posture-graph x-pack/solutions/security/packages/kbn-cloud-security-posture/graph
@kbn/security-solution-distribution-bar x-pack/solutions/security/packages/distribution_bar
Updated references
./.eslintrc.js
./.github/codeql/codeql-config.yml
./docs/developer/plugin-list.asciidoc
./package.json
./packages/deeplinks/security/deep_links.ts
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./tsconfig.base.json
./tsconfig.base.type_check.json
./tsconfig.refs.json
./x-pack/.i18nrc.json
./x-pack/platform/packages/shared/kbn-cloud-security-posture/common/README.md
./x-pack/platform/packages/shared/kbn-cloud-security-posture/common/jest.config.js
./x-pack/plugins/security_solution/tsconfig.type_check.json
./x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/jest.config.js
./x-pack/solutions/security/packages/kbn-cloud-security-posture/public/jest.config.js
./x-pack/solutions/security/plugins/cloud_defend/README.md
./x-pack/solutions/security/plugins/cloud_defend/jest.config.js
./x-pack/solutions/security/plugins/cloud_defend/server/lib/telemetry/collectors/types.ts
./x-pack/solutions/security/plugins/cloud_security_posture/README.md
./x-pack/solutions/security/plugins/cloud_security_posture/common/dev_docs/__auto_generated_csp_requirements_test_coverage.md
./x-pack/solutions/security/plugins/cloud_security_posture/common/scripts/__auto_generated_csp_test_log.json
./x-pack/solutions/security/plugins/cloud_security_posture/common/scripts/get_tests.js
./x-pack/solutions/security/plugins/cloud_security_posture/jest.config.js
./x-pack/solutions/security/plugins/kubernetes_security/jest.config.js
./x-pack/solutions/security/plugins/session_view/README.md
./x-pack/solutions/security/plugins/session_view/jest.config.js
./x-pack/test/tsconfig.type_check.json
./x-pack/test_serverless/tsconfig.type_check.json
./yarn.lock
Updated relative paths
x-pack/platform/packages/shared/kbn-cloud-security-posture/common/jest.config.js:10
x-pack/platform/packages/shared/kbn-cloud-security-posture/common/tsconfig.json:2
x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/jest.config.js:11
x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/tsconfig.json:2
x-pack/solutions/security/packages/kbn-cloud-security-posture/public/jest.config.js:10
x-pack/solutions/security/packages/kbn-cloud-security-posture/public/tsconfig.json:2
x-pack/solutions/security/plugins/asset_inventory/tsconfig.json:14
x-pack/solutions/security/plugins/asset_inventory/tsconfig.json:2
x-pack/solutions/security/plugins/cloud_defend/jest.config.js:11
x-pack/solutions/security/plugins/cloud_defend/tsconfig.json:10
x-pack/solutions/security/plugins/cloud_defend/tsconfig.json:2
x-pack/solutions/security/plugins/cloud_security_posture/README.md:18
x-pack/solutions/security/plugins/cloud_security_posture/README.md:19
x-pack/solutions/security/plugins/cloud_security_posture/README.md:20
x-pack/solutions/security/plugins/cloud_security_posture/README.md:21
x-pack/solutions/security/plugins/cloud_security_posture/README.md:22
x-pack/solutions/security/plugins/cloud_security_posture/README.md:23
x-pack/solutions/security/plugins/cloud_security_posture/jest.config.js:11
x-pack/solutions/security/plugins/cloud_security_posture/tsconfig.json:14
x-pack/solutions/security/plugins/cloud_security_posture/tsconfig.json:2
x-pack/solutions/security/plugins/kubernetes_security/jest.config.js:10
x-pack/solutions/security/plugins/kubernetes_security/package.json:8
x-pack/solutions/security/plugins/kubernetes_security/package.json:9
x-pack/solutions/security/plugins/kubernetes_security/tsconfig.json:15
x-pack/solutions/security/plugins/kubernetes_security/tsconfig.json:2
x-pack/solutions/security/plugins/session_view/jest.config.js:10
x-pack/solutions/security/plugins/session_view/package.json:8
x-pack/solutions/security/plugins/session_view/package.json:9
x-pack/solutions/security/plugins/session_view/tsconfig.json:15
x-pack/solutions/security/plugins/session_view/tsconfig.json:2

Copy link
Contributor

github-actions bot commented Dec 4, 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.

@gsoldevila gsoldevila added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:Cloud Security Cloud Security team related Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Dec 4, 2024
@gsoldevila gsoldevila marked this pull request as ready for review December 4, 2024 08:21
@gsoldevila gsoldevila requested review from a team as code owners December 4, 2024 08:21
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

@gsoldevila gsoldevila force-pushed the kbn-team-1309-move-kibana-cloud-security-posture branch 3 times, most recently from f78242c to 8544578 Compare December 9, 2024 11:48
@gsoldevila gsoldevila requested a review from a team as a code owner December 9, 2024 11:48
@kc13greiner kc13greiner self-requested a review December 9, 2024 13:07
Copy link
Contributor

@seanrathier seanrathier left a comment

Choose a reason for hiding this comment

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

Did a quick check for CSPM plugin and it works.
Fixed linting errors in CI

However, the CI is failing on unused i18n translations but they are in fact used

@gsoldevila
Copy link
Contributor Author

Did a quick check for CSPM plugin and it works. Fixed linting errors in CI

However, the CI is failing on unused i18n translations but they are in fact used

Thanks for the contributions! The i18n issue might be caused by outdated paths in .i18nrc.json. Checking . . .

@gsoldevila
Copy link
Contributor Author

Copy link
Contributor

@kc13greiner kc13greiner left a comment

Choose a reason for hiding this comment

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

code ql config changes LGTM!

Copy link
Contributor

@seanrathier seanrathier left a comment

Choose a reason for hiding this comment

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

Fixed lint errors. Thanks!

Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

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

Security solutions changes LGTM!

@seanrathier seanrathier force-pushed the kbn-team-1309-move-kibana-cloud-security-posture branch from 61f8c78 to 949e653 Compare December 12, 2024 19:46
@seanrathier
Copy link
Contributor

I needed to run the relocate script again to fix conflicts.

@seanrathier seanrathier added the ci:cloud-deploy Create or update a Cloud deployment label Dec 12, 2024
seanrathier pushed a commit to seanrathier/kibana that referenced this pull request Dec 16, 2024
…na-cloud-security-posture` (elastic#202862)

(cherry picked from commit f508ad2)

# Conflicts:
#	.github/CODEOWNERS
#	.github/codeql/codeql-config.yml
#	package.json
#	tsconfig.base.json
seanrathier pushed a commit to seanrathier/kibana that referenced this pull request Dec 16, 2024
…na-cloud-security-posture` (elastic#202862)

(cherry picked from commit f508ad2)

# Conflicts:
#	.github/CODEOWNERS
#	.github/codeql/codeql-config.yml
#	package.json
#	tsconfig.base.json
@seanrathier
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

seanrathier pushed a commit to seanrathier/kibana that referenced this pull request Dec 16, 2024
…na-cloud-security-posture` (elastic#202862)

(cherry picked from commit f508ad2)

# Conflicts:
#	.github/CODEOWNERS
#	.github/codeql/codeql-config.yml
#	package.json
#	tsconfig.base.json
@seanrathier
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

seanrathier pushed a commit to seanrathier/kibana that referenced this pull request Dec 16, 2024
…na-cloud-security-posture` (elastic#202862)

(cherry picked from commit f508ad2)

# Conflicts:
#	.github/CODEOWNERS
#	.github/codeql/codeql-config.yml
#	package.json
#	tsconfig.base.json
@seanrathier
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

@seanrathier
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

seanrathier pushed a commit to seanrathier/kibana that referenced this pull request Dec 17, 2024
…na-cloud-security-posture` (elastic#202862)

(cherry picked from commit f508ad2)

# Conflicts:
#	.github/CODEOWNERS
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Dec 17, 2024
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

seanrathier pushed a commit to seanrathier/kibana that referenced this pull request Dec 17, 2024
…na-cloud-security-posture` (elastic#202862)

(cherry picked from commit f508ad2)

# Conflicts:
#	.buildkite/scripts/pipelines/pull_request/pipeline.ts
#	.github/CODEOWNERS
#	x-pack/.i18nrc.json
#	x-pack/plugins/telemetry_collection_xpack/schema/xpack_security.json
@seanrathier
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

seanrathier pushed a commit to seanrathier/kibana that referenced this pull request Dec 17, 2024
…na-cloud-security-posture` (elastic#202862)

(cherry picked from commit f508ad2)

# Conflicts:
#	.buildkite/scripts/pipelines/pull_request/pipeline.ts
#	.github/CODEOWNERS
#	x-pack/.i18nrc.json
#	x-pack/plugins/telemetry_collection_xpack/schema/xpack_security.json
@seanrathier
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

stephmilovic pushed a commit that referenced this pull request Dec 18, 2024
…c/kibana-cloud-security-posture` (#202862) (#204474)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Sustainable Kibana Architecture: Move modules owned by
`@elastic/kibana-cloud-security-posture`
(#202862)](#202862)

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

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

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2024-12-16T17:56:03Z","message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/kibana-cloud-security-posture`
(#202862)","sha":"f508ad2bf69745a020cf325089087b29b2d97625","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","Team:
SecuritySolution","Team:Cloud
Security","backport:prev-minor","ci:cloud-deploy"],"number":202862,"url":"https://github.com/elastic/kibana/pull/202862","mergeCommit":{"message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/kibana-cloud-security-posture`
(#202862)","sha":"f508ad2bf69745a020cf325089087b29b2d97625"}},"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/202862","number":202862,"mergeCommit":{"message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/kibana-cloud-security-posture`
(#202862)","sha":"f508ad2bf69745a020cf325089087b29b2d97625"}}]}]
BACKPORT-->

---------

Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine added v8.18.0 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Dec 18, 2024
@rudolf rudolf added the plugin groups Relocate all plugins and packages under their respective platform/solution groups label Dec 18, 2024
kfirpeled pushed a commit that referenced this pull request Dec 18, 2024
…r Kibana sustainability (#204500)

## Summary

Move @kbn/cloud-security-posture-storybook-config package to
`x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook`

Renamed removed the `config` folder to align with the `.storybook`
[naming
convention](https://github.com/elastic/kibana/pull/204500/files#diff-91918a63f6365a8f40f674ab54a8df7ce9aeb313f77fe8eda76284d712ef5425R21).

![Screenshot 2024-12-16 at 5 50
53 PM](https://github.com/user-attachments/assets/de1d0a81-353f-434c-bb2d-989210b35b43)

### Related Issues
- #202862

---------

Co-authored-by: Brad White <Ikuni17@users.noreply.github.com>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 18, 2024
…r Kibana sustainability (elastic#204500)

## Summary

Move @kbn/cloud-security-posture-storybook-config package to
`x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook`

Renamed removed the `config` folder to align with the `.storybook`
[naming
convention](https://github.com/elastic/kibana/pull/204500/files#diff-91918a63f6365a8f40f674ab54a8df7ce9aeb313f77fe8eda76284d712ef5425R21).

![Screenshot 2024-12-16 at 5 50
53 PM](https://github.com/user-attachments/assets/de1d0a81-353f-434c-bb2d-989210b35b43)

### Related Issues
- elastic#202862

---------

Co-authored-by: Brad White <Ikuni17@users.noreply.github.com>
(cherry picked from commit d6cb398)
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.
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Dec 19, 2024
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Dec 19, 2024
…r Kibana sustainability (elastic#204500)

## Summary

Move @kbn/cloud-security-posture-storybook-config package to
`x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook`

Renamed removed the `config` folder to align with the `.storybook`
[naming
convention](https://github.com/elastic/kibana/pull/204500/files#diff-91918a63f6365a8f40f674ab54a8df7ce9aeb313f77fe8eda76284d712ef5425R21).

![Screenshot 2024-12-16 at 5 50
53 PM](https://github.com/user-attachments/assets/de1d0a81-353f-434c-bb2d-989210b35b43)

### Related Issues
- elastic#202862

---------

Co-authored-by: Brad White <Ikuni17@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:cloud-deploy Create or update a Cloud deployment plugin groups Relocate all plugins and packages under their respective platform/solution groups release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants