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/security-defend-workflows #202840

Conversation

gsoldevila
Copy link
Contributor

@gsoldevila gsoldevila commented Dec 3, 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.
Do not attempt to push any changes unless you know what you are doing.
Please use #sustainable_kibana_architecture Slack channel for feedback.

1 plugin(s) are going to be relocated:

Id Target folder
@kbn/osquery-plugin x-pack/platform/plugins/shared/osquery

1 package(s) are going to be relocated:

Id Target folder
@kbn/avc-banner src/platform/packages/shared/kbn-avc-banner
Updated references
./.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/mki_security_solution_defend_workflows_osquery.sh
./.buildkite/scripts/steps/code_generation/osquery_codegen.sh
./.buildkite/scripts/steps/functional/osquery_cypress.sh
./.buildkite/scripts/steps/functional/osquery_cypress_burn.sh
./.buildkite/scripts/steps/functional/security_serverless_osquery.sh
./.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh
./.eslintrc.js
./.github/codeql/codeql-config.yml
./.gitignore
./.i18nrc.json
./docs/developer/plugin-list.asciidoc
./oas_docs/scripts/merge_ess_oas.js
./oas_docs/scripts/merge_serverless_oas.js
./package.json
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./src/platform/packages/shared/kbn-avc-banner/jest.config.js
./tsconfig.base.json
./x-pack/.i18nrc.json
./x-pack/platform/plugins/shared/osquery/cypress/README.md
./x-pack/platform/plugins/shared/osquery/jest.config.js
./x-pack/plugins/security_solution/docs/openapi/README.md
./yarn.lock
Updated relative paths
src/platform/packages/shared/kbn-avc-banner/jest.config.js:12
src/platform/packages/shared/kbn-avc-banner/tsconfig.json:2
x-pack/platform/plugins/shared/osquery/cypress/README.md:104
x-pack/platform/plugins/shared/osquery/cypress/README.md:110
x-pack/platform/plugins/shared/osquery/cypress/cypress_base.config.ts:28
x-pack/platform/plugins/shared/osquery/cypress/cypress_base.config.ts:36
x-pack/platform/plugins/shared/osquery/cypress/cypress_base.config.ts:39
x-pack/platform/plugins/shared/osquery/cypress/reporter_config.json:6
x-pack/platform/plugins/shared/osquery/cypress/reporter_config.json:8
x-pack/platform/plugins/shared/osquery/cypress/tasks/archiver.ts:25
x-pack/platform/plugins/shared/osquery/cypress/tsconfig.json:12
x-pack/platform/plugins/shared/osquery/cypress/tsconfig.json:2
x-pack/platform/plugins/shared/osquery/cypress/tsconfig.json:25
x-pack/platform/plugins/shared/osquery/cypress/tsconfig.json:8
x-pack/platform/plugins/shared/osquery/jest.config.js:10
x-pack/platform/plugins/shared/osquery/package.json:10
x-pack/platform/plugins/shared/osquery/package.json:13
x-pack/platform/plugins/shared/osquery/package.json:16
x-pack/platform/plugins/shared/osquery/package.json:18
x-pack/platform/plugins/shared/osquery/package.json:19
x-pack/platform/plugins/shared/osquery/package.json:20
x-pack/platform/plugins/shared/osquery/scripts/openapi/bundle.js:8
x-pack/platform/plugins/shared/osquery/scripts/openapi/generate.js:8
x-pack/platform/plugins/shared/osquery/scripts/schema_formatter/ecs.js:8
x-pack/platform/plugins/shared/osquery/scripts/schema_formatter/osquery.js:8
x-pack/platform/plugins/shared/osquery/tsconfig.json:14
x-pack/platform/plugins/shared/osquery/tsconfig.json:2
x-pack/platform/plugins/shared/osquery/tsconfig.json:20
Script errors
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/cypress/README.md:104
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/cypress/README.md:110
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/package.json:19
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/package.json:19
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/package.json:19
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/package.json:19
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/package.json:19
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/package.json:19
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/package.json:19
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/package.json:19
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/package.json:20
Cannot replace multiple occurrences of "../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/cypress/README.md:104
Cannot replace multiple occurrences of "../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-quaternary/x-pack/platform/plugins/shared/osquery/cypress/README.md:110

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.

@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:Defend Workflows “EDR Workflows” sub-team of Security Solution labels Dec 4, 2024
@gsoldevila gsoldevila marked this pull request as ready for review December 4, 2024 08:26
@gsoldevila gsoldevila requested review from a team as code owners December 4, 2024 08:26
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-defend-workflows (Team:Defend Workflows)

@paul-tavares paul-tavares requested review from tomsonpl and removed request for paul-tavares December 4, 2024 16:37
@tomsonpl
Copy link
Contributor

tomsonpl commented Dec 5, 2024

/ci

@gsoldevila gsoldevila force-pushed the kbn-team-1309-move-kibana-security-defend-workflows branch from 6a1e875 to 2cb6320 Compare December 5, 2024 14:58
@tomsonpl
Copy link
Contributor

tomsonpl commented Dec 6, 2024

Hey @gsoldevila 👋 Thanks for putting in the effort! Could you clarify something for me? Osquery is being moved to platform because it’s utilized in both Security and Observability, correct? If that’s the case, what happens with the imports that Osquery currently has from security_solution and timelines?
Does this PR address the issue of invalid imports?

@gsoldevila
Copy link
Contributor Author

Hey @gsoldevila 👋 Thanks for putting in the effort! Could you clarify something for me? Osquery is being moved to platform because it’s utilized in both Security and Observability, correct? If that’s the case, what happens with the imports that Osquery currently has from security_solution and timelines? Does this PR address the issue of invalid imports?

Ideally this would need to be addressed, for the time being I added an exception in
https://github.com/elastic/kibana/blob/main/.eslintrc.js#L2006,L2007
See related discussion

@gsoldevila gsoldevila force-pushed the kbn-team-1309-move-kibana-security-defend-workflows branch from 264dcea to 73ec807 Compare December 10, 2024 15:10
@gsoldevila gsoldevila requested a review from a team as a code owner December 10, 2024 15:10
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 solution changes LGTM

@kc13greiner kc13greiner self-requested a review December 10, 2024 17:31
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.

Changes to .github/codeql/codeql-config.yml lgtm!

@tomsonpl
Copy link
Contributor

@gsoldevila - who should continue working on this PR, should there be someone from Osquery team assigned, or you're still in the process of adjusting the PR?

@tomsonpl tomsonpl marked this pull request as draft December 12, 2024 15:33
@tomsonpl tomsonpl marked this pull request as ready for review December 12, 2024 19:33
@tomsonpl tomsonpl marked this pull request as draft December 12, 2024 19:33
@tomsonpl tomsonpl marked this pull request as ready for review December 13, 2024 07:43
Copy link
Contributor

@tomsonpl tomsonpl 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 code changes LGTM, I pushed a few commits updating paths so the Osquery cypress tests work fine again 👍

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@tomsonpl tomsonpl enabled auto-merge (squash) December 13, 2024 10:13
Copy link
Member

@ashokaditya ashokaditya left a comment

Choose a reason for hiding this comment

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

Thanks for talking on the huge set of changes. Appreciate the effort. 🚀

@tomsonpl tomsonpl merged commit 42af4e6 into elastic:main Dec 13, 2024
8 checks passed
@gsoldevila gsoldevila added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:skip This commit does not require backporting labels Dec 13, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12317668339

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12317668436

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 202840

Questions ?

Please refer to the Backport tool documentation

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

You might need to backport the following PRs to 8.x:
- Sustainable Kibana Architecture: Move modules owned by @elastic/security-scalability (#202849)
- [Synthetics] migrate first set of tests (#198950)
- [Obs UX Management] Migrate leftover code owner !! (#203814)
- Sustainable Kibana Architecture: Add scripts/relocate CLI (beta) (#203803)
- [UA] kibana-core ownership (#203410)
- [Security Solution] - Update codeowners (#202046)

Manual backport

To create the backport manually run:

node scripts/backport --pr 202840

Questions ?

Please refer to the Backport tool documentation

gsoldevila added a commit to gsoldevila/kibana that referenced this pull request Dec 13, 2024
…rity-defend-workflows` (elastic#202840)

(cherry picked from commit 42af4e6)

# Conflicts:
#	.github/CODEOWNERS
#	oas_docs/scripts/merge_serverless_oas.js
@gsoldevila
Copy link
Contributor Author

💚 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

gsoldevila added a commit that referenced this pull request Dec 13, 2024
…c/security-defend-workflows` (#202840) (#204232)

# Backport

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

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

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

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-13T11:08:36Z","message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/security-defend-workflows`
(#202840)","sha":"42af4e60a42380a27e10927fa62af15dfd239c57","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:Defend
Workflows","backport:prev-minor"],"number":202840,"url":"https://github.com/elastic/kibana/pull/202840","mergeCommit":{"message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/security-defend-workflows`
(#202840)","sha":"42af4e60a42380a27e10927fa62af15dfd239c57"}},"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/202840","number":202840,"mergeCommit":{"message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/security-defend-workflows`
(#202840)","sha":"42af4e60a42380a27e10927fa62af15dfd239c57"}}]}]
BACKPORT-->
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) 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:Defend Workflows “EDR Workflows” sub-team of Security Solution v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants