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] Sustainable Kibana Architecture: Move modules owned by @elastic/security-generative-ai (#202848) #204468

Merged
merged 10 commits into from
Dec 16, 2024

Conversation

KDKHD
Copy link
Member

@KDKHD KDKHD commented Dec 16, 2024

Summary

Summarize your PR. If it involves visual changes include a screenshot or gif.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

gsoldevila and others added 5 commits December 15, 2024 21:43
…rity-generative-ai` (elastic#202848)

## 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](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

#### 1 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/elastic-assistant-plugin` |
`x-pack/solutions/security/plugins/elastic_assistant` |

#### 3 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/elastic-assistant` |
`x-pack/platform/packages/shared/kbn-elastic-assistant` |
| `@kbn/elastic-assistant-common` |
`x-pack/platform/packages/shared/kbn-elastic-assistant-common` |
| `@kbn/langchain` | `x-pack/platform/packages/shared/kbn-langchain` |

<details >
<summary>Updated references</summary>

```
./.buildkite/scripts/steps/code_generation/elastic_assistant_codegen.sh
./.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh
./.eslintrc.js
./.github/codeql/codeql-config.yml
./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
./tsconfig.base.json
./tsconfig.base.type_check.json
./tsconfig.refs.json
./x-pack/.i18nrc.json
./x-pack/packages/kbn-elastic-assistant-common/README.md
./x-pack/platform/packages/shared/kbn-elastic-assistant-common/README.md
./x-pack/platform/packages/shared/kbn-elastic-assistant-common/env/README.md
./x-pack/platform/packages/shared/kbn-elastic-assistant-common/impl/capabilities/README.md
./x-pack/platform/packages/shared/kbn-elastic-assistant-common/jest.config.js
./x-pack/platform/packages/shared/kbn-elastic-assistant/README.md
./x-pack/platform/packages/shared/kbn-elastic-assistant/jest.config.js
./x-pack/platform/packages/shared/kbn-langchain/jest.config.js
./x-pack/plugins/elastic_assistant/README.md
./x-pack/plugins/security_solution/docs/openapi/README.md
./x-pack/solutions/security/plugins/elastic_assistant/README.md
./x-pack/solutions/security/plugins/elastic_assistant/jest.config.js
./x-pack/solutions/security/plugins/elastic_assistant/scripts/create_conversations_script.ts
./x-pack/solutions/security/plugins/elastic_assistant/server/__mocks__/docs_from_directory_loader.ts
./x-pack/solutions/security/plugins/elastic_assistant/server/knowledge_base/security_labs/embedding_security_in_llm_workflows.md
./x-pack/solutions/security/plugins/elastic_assistant/server/lib/attack_discovery/graphs/default_attack_discovery_graph/index.ts
./yarn.lock
```

</details><details >
<summary>Updated relative paths</summary>

```
x-pack/platform/packages/shared/kbn-elastic-assistant-common/jest.config.js:21
x-pack/platform/packages/shared/kbn-elastic-assistant-common/scripts/openapi/bundle.js:8
x-pack/platform/packages/shared/kbn-elastic-assistant-common/scripts/openapi/generate.js:8
x-pack/platform/packages/shared/kbn-elastic-assistant-common/tsconfig.json:2
x-pack/platform/packages/shared/kbn-elastic-assistant/jest.config.js:21
x-pack/platform/packages/shared/kbn-elastic-assistant/tsconfig.json:15
x-pack/platform/packages/shared/kbn-elastic-assistant/tsconfig.json:2
x-pack/platform/packages/shared/kbn-langchain/jest.config.js:20
x-pack/platform/packages/shared/kbn-langchain/tsconfig.json:2
x-pack/solutions/security/plugins/elastic_assistant/jest.config.js:14
x-pack/solutions/security/plugins/elastic_assistant/scripts/create_conversations.js:8
x-pack/solutions/security/plugins/elastic_assistant/scripts/draw_graph.js:8
x-pack/solutions/security/plugins/elastic_assistant/scripts/model_evaluator.js:8
x-pack/solutions/security/plugins/elastic_assistant/tsconfig.json:13
x-pack/solutions/security/plugins/elastic_assistant/tsconfig.json:2
```

</details>

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 6de695a)

# Conflicts:
#	.github/CODEOWNERS
#	oas_docs/scripts/merge_serverless_oas.js
#	x-pack/.i18nrc.json
#	x-pack/platform/packages/shared/kbn-elastic-assistant/tsconfig.json
Copy link
Contributor

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.

@KDKHD KDKHD changed the base branch from main to 8.x December 16, 2024 18:33
@KDKHD KDKHD changed the title Recover/backport/8.x/pr 202848 [8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/security-generative-ai (#202848) Dec 16, 2024
@KDKHD KDKHD marked this pull request as ready for review December 16, 2024 18:41
@KDKHD KDKHD requested a review from kibanamachine as a code owner December 16, 2024 18:41
@stephmilovic
Copy link
Contributor

@elasticmachine merge upstream

@KDKHD KDKHD enabled auto-merge (squash) December 16, 2024 19:10
@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 16, 2024

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Integration Tests #1 / Task cost checks detects tasks with cost definitions
  • [job] [logs] Jest Integration Tests #1 / Task cost checks detects tasks with cost definitions

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
integrationAssistant 473 474 +1

Async chunks

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

id before after diff
integrationAssistant 880.5KB 880.5KB +20.0B
securitySolution 13.5MB 13.5MB +8.4KB
total +8.5KB
Unknown metric groups

ESLint disabled line counts

id before after diff
@kbn/elastic-assistant 20 15 -5

Total ESLint disabled count

id before after diff
@kbn/elastic-assistant 21 16 -5

History

@stephmilovic
Copy link
Contributor

@elasticmachine merge upstream

@KDKHD
Copy link
Member Author

KDKHD commented Dec 16, 2024

Failed test is passing locally after 15c595a
image

@KDKHD KDKHD merged commit 49f8fdd into elastic:8.x Dec 16, 2024
8 checks passed
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.

5 participants