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/fleet #202422

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

gsoldevila
Copy link
Contributor

@gsoldevila gsoldevila commented Dec 2, 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.

Are you trying to rebase this PR to solve merge conflicts? Please follow the steps describe here.

2 plugin(s) are going to be relocated:

Id Target folder
@kbn/custom-integrations-plugin src/platform/plugins/shared/custom_integrations
@kbn/fleet-plugin x-pack/platform/plugins/shared/fleet

1 packages(s) are going to be relocated:

Id Target folder
@kbn/deeplinks-fleet src/platform/packages/shared/deeplinks/fleet
Script errors
Cannot replace multiple occurrences of "../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/cypress/README.md:122
Cannot replace multiple occurrences of "../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/cypress/README.md:128
Cannot replace multiple occurrences of "../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/package.json:12
Cannot replace multiple occurrences of "../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/package.json:12
Cannot replace multiple occurrences of "../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/package.json:8
Cannot replace multiple occurrences of "../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/package.json:8
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/cypress/README.md:122
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/cypress/README.md:128
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/package.json:16
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/package.json:16
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/package.json:16
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/package.json:16
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/package.json:16
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/package.json:16
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/package.json:16
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/pgayvallet/DEV/workspaces/elastic/kibana/x-pack/platform/plugins/shared/fleet/package.json:16
Updated relative paths
src/platform/packages/shared/deeplinks/fleet/jest.config.js:12
src/platform/packages/shared/deeplinks/fleet/tsconfig.json:2
src/platform/packages/shared/deeplinks/fleet/tsconfig.type_check.json:2
src/platform/plugins/shared/custom_integrations/jest.config.js:12
src/platform/plugins/shared/custom_integrations/tsconfig.json:2
src/platform/plugins/shared/custom_integrations/tsconfig.json:7
src/platform/plugins/shared/custom_integrations/tsconfig.type_check.json:2
src/platform/plugins/shared/custom_integrations/tsconfig.type_check.json:20
src/platform/plugins/shared/custom_integrations/tsconfig.type_check.json:26
src/platform/plugins/shared/custom_integrations/tsconfig.type_check.json:29
src/platform/plugins/shared/custom_integrations/tsconfig.type_check.json:32
src/platform/plugins/shared/custom_integrations/tsconfig.type_check.json:35
src/platform/plugins/shared/custom_integrations/tsconfig.type_check.json:38
src/platform/plugins/shared/custom_integrations/tsconfig.type_check.json:41
src/platform/plugins/shared/custom_integrations/tsconfig.type_check.json:9
x-pack/platform/plugins/shared/fleet/cypress.config.js:22
x-pack/platform/plugins/shared/fleet/cypress.config.js:25
x-pack/platform/plugins/shared/fleet/cypress.config.space_awareness.ts:26
x-pack/platform/plugins/shared/fleet/cypress.config.space_awareness.ts:29
x-pack/platform/plugins/shared/fleet/cypress.config.ts:25
x-pack/platform/plugins/shared/fleet/cypress.config.ts:28
x-pack/platform/plugins/shared/fleet/cypress/README.md:122
x-pack/platform/plugins/shared/fleet/cypress/README.md:128
x-pack/platform/plugins/shared/fleet/cypress/reporter_config.json:6
x-pack/platform/plugins/shared/fleet/cypress/reporter_config.json:8
x-pack/platform/plugins/shared/fleet/cypress/tasks/login.ts:21
x-pack/platform/plugins/shared/fleet/cypress/tsconfig.json:2
x-pack/platform/plugins/shared/fleet/cypress/tsconfig.json:7
x-pack/platform/plugins/shared/fleet/cypress/tsconfig.type_check.json:2
x-pack/platform/plugins/shared/fleet/cypress/tsconfig.type_check.json:25
x-pack/platform/plugins/shared/fleet/cypress/tsconfig.type_check.json:28
x-pack/platform/plugins/shared/fleet/cypress/tsconfig.type_check.json:31
x-pack/platform/plugins/shared/fleet/cypress/tsconfig.type_check.json:37
x-pack/platform/plugins/shared/fleet/cypress/tsconfig.type_check.json:40
x-pack/platform/plugins/shared/fleet/cypress/tsconfig.type_check.json:7
x-pack/platform/plugins/shared/fleet/jest.config.js:10
x-pack/platform/plugins/shared/fleet/jest.integration.config.js:10
x-pack/platform/plugins/shared/fleet/package.json:11
x-pack/platform/plugins/shared/fleet/package.json:12
x-pack/platform/plugins/shared/fleet/package.json:15
x-pack/platform/plugins/shared/fleet/package.json:16
x-pack/platform/plugins/shared/fleet/package.json:8
x-pack/platform/plugins/shared/fleet/scripts/create_agent_policies/index.js:8
x-pack/platform/plugins/shared/fleet/scripts/create_agents/index.js:8
x-pack/platform/plugins/shared/fleet/scripts/get_all_packages/index.js:8
x-pack/platform/plugins/shared/fleet/scripts/install_all_packages/index.js:8
x-pack/platform/plugins/shared/fleet/scripts/verify_test_packages/index.js:8
x-pack/platform/plugins/shared/fleet/scripts/verify_test_packages/verify_test_packages.ts:25
x-pack/platform/plugins/shared/fleet/scripts/verify_test_packages/verify_test_packages.ts:26
x-pack/platform/plugins/shared/fleet/scripts/verify_test_packages/verify_test_packages.ts:27
x-pack/platform/plugins/shared/fleet/tsconfig.json:2
x-pack/platform/plugins/shared/fleet/tsconfig.json:22
x-pack/platform/plugins/shared/fleet/tsconfig.json:26
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:102
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:105
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:111
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:114
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:120
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:123
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:126
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:129
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:132
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:135
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:144
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:147
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:150
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:153
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:156
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:159
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:162
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:165
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:168
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:171
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:174
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:177
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:180
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:183
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:186
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:189
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:192
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:195
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:198
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:2
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:201
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:204
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:207
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:210
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:213
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:216
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:219
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:222
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:225
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:228
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:23
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:231
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:234
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:237
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:240
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:243
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:246
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:249
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:252
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:255
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:261
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:264
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:27
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:270
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:273
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:276
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:279
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:30
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:36
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:42
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:45
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:57
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:60
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:63
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:66
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:72
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:75
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:78
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:81
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:84
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:87
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:90
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:93
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:96
x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json:99

@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 Team:Fleet Team label for Observability Data Collection Fleet team backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Dec 2, 2024
@gsoldevila gsoldevila requested review from a team as code owners December 2, 2024 10:20
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Contributor

github-actions bot commented Dec 2, 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 changed the title Move modules owned by @elastic/fleet Sustainable Kibana Architecture: Move modules owned by @elastic/fleet Dec 2, 2024
Copy link
Contributor

@szwarckonrad szwarckonrad left a comment

Choose a reason for hiding this comment

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

Defend Workflows changes LGTM!

Note: All changes within x-pack/plugins/security_solution/*/endpoint are limited to updating references in comments, with no impact on the code or behavior whatsoever.

@@ -18,7 +18,7 @@ import { request } from './common';
* Credentials in the `kibana.dev.yml` config file will be used to authenticate
* with Kibana when credentials are not provided via environment variables
*/
const KIBANA_DEV_YML_PATH = '../../../config/kibana.dev.yml';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure this path was correct event before the relocation.
@elastic/fleet could you please review and fix if needed in a follow-up PR? TIA

"reporterOptions": {
"html": false,
"json": true,
"mochaFile": "../../../../../target/kibana-fleet/cypress/results/TEST-fleet-cypress-[hash].xml",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure these 2 relative paths are correct.
I imagine the target folder should be straight under the root, and I don't think this was the case even before the relocation.
@elastic/fleet Could you please review and fix in a follow-up PR if needed? TIA

Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

SCSS only

Copy link
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

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

The file filter shows that Kibana Security owns 1 affected file, but when filtered there are none. I pulled the changes to scan through and I cannot see that we own any modified files. I cannot remove our team for review, so I am approving to not hold up the PR. If I missed something, please let us know.

@gsoldevila gsoldevila added backport:skip This commit does not require backporting and removed backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Dec 4, 2024
@nchaulet
Copy link
Member

nchaulet commented Dec 4, 2024

I tried the fleet app and got the following error when trying to add a fleet server, not sure what changed that could cause this?

Screenshot 2024-12-04 at 1 49 13 PM

@gsoldevila gsoldevila force-pushed the kbn-team-1309-move-fleet branch from b93cc84 to 29d1b68 Compare December 4, 2024 21:28
@gsoldevila gsoldevila force-pushed the kbn-team-1309-move-fleet branch from 0faee6a to e6116db Compare December 5, 2024 16:24
@nchaulet
Copy link
Member

nchaulet commented Dec 5, 2024

@gsoldevila I pushed this that seems to fix fleet usage of styled components 2dbedae

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

Tested a few fleet screens and everything seems to work 🚀

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.

LGTM

@rudolf rudolf added the plugin groups Relocate all plugins and packages under their respective platform/solution groups label Dec 18, 2024
@dokmic dokmic force-pushed the kbn-team-1309-move-fleet branch from d11a1f1 to 65f1f90 Compare December 18, 2024 14:23
@dokmic dokmic force-pushed the kbn-team-1309-move-fleet branch from 65f1f90 to 134b017 Compare December 18, 2024 23:56
@pgayvallet pgayvallet force-pushed the kbn-team-1309-move-fleet branch from 42bd00a to a2aa6f0 Compare December 23, 2024 16:21
Copy link
Contributor

@shainaraskas shainaraskas left a comment

Choose a reason for hiding this comment

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

get_doc_links lgtm

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 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:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.