Skip to content

Commit

Permalink
[8.x] Sustainable Kibana Architecture: Update tooling to take into ac…
Browse files Browse the repository at this point in the history
…count the new folders (#202327) (#202419)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Sustainable Kibana Architecture: Update tooling to take into account
the new folders
(#202327)](#202327)

<!--- Backport version: 9.4.3 -->

### 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-02T10:04:35Z","message":"Sustainable
Kibana Architecture: Update tooling to take into account the new folders
(#202327)\n\n## Summary\r\n\r\nOtherwise we're going to be removing APIs
of relocated
modules.","sha":"397314c9524bac9ea3e13155e352a889e5cd8cbe","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","Team:Operations","release_note:skip","v9.0.0","backport:prev-minor"],"title":"Sustainable
Kibana Architecture: Update tooling to take into account the new
folders","number":202327,"url":"https://github.com/elastic/kibana/pull/202327","mergeCommit":{"message":"Sustainable
Kibana Architecture: Update tooling to take into account the new folders
(#202327)\n\n## Summary\r\n\r\nOtherwise we're going to be removing APIs
of relocated
modules.","sha":"397314c9524bac9ea3e13155e352a889e5cd8cbe"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202327","number":202327,"mergeCommit":{"message":"Sustainable
Kibana Architecture: Update tooling to take into account the new folders
(#202327)\n\n## Summary\r\n\r\nOtherwise we're going to be removing APIs
of relocated
modules.","sha":"397314c9524bac9ea3e13155e352a889e5cd8cbe"}}]}]
BACKPORT-->

Co-authored-by: Gerard Soldevila <[email protected]>
  • Loading branch information
kibanamachine and gsoldevila authored Dec 2, 2024
1 parent cff07f7 commit 86c3d01
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/kbn-docs-utils/src/build_api_docs_cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,11 @@ function getTsProject(repoPath: string, overridePath?: string) {
if (!overridePath) {
project.addSourceFilesAtPaths([`${repoPath}/x-pack/plugins/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/x-pack/packages/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/x-pack/platform/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/x-pack/solutions/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/src/plugins/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/src/platform/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/src/core/packages/**/*.ts`, '!**/*.d.ts']);
project.addSourceFilesAtPaths([`${repoPath}/packages/**/*.ts`, '!**/*.d.ts']);
} else {
project.addSourceFilesAtPaths([`${overridePath}/**/*.ts`, '!**/*.d.ts']);
Expand Down
30 changes: 29 additions & 1 deletion packages/kbn-plugin-generator/src/ask_questions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ export const INTERNAL_PLUGIN_LOCATIONS: Array<{ name: string; value: string }> =
name: 'Kibana OSS',
value: Path.resolve(REPO_ROOT, 'src/plugins'),
},
{
name: 'Kibana Platform OSS (private)',
value: Path.resolve(REPO_ROOT, 'src/platform/plugins/private'),
},
{
name: 'Kibana Platform OSS (shared)',
value: Path.resolve(REPO_ROOT, 'src/platform/plugins/shared'),
},
{
name: 'Kibana OSS Functional Testing',
value: Path.resolve(REPO_ROOT, 'test/plugin_functional/plugins'),
Expand All @@ -40,6 +48,26 @@ export const INTERNAL_PLUGIN_LOCATIONS: Array<{ name: string; value: string }> =
name: 'X-Pack',
value: Path.resolve(REPO_ROOT, 'x-pack/plugins'),
},
{
name: 'X-Pack Platform (private)',
value: Path.resolve(REPO_ROOT, 'x-pack/platform/plugins/private'),
},
{
name: 'X-Pack Platform (shared)',
value: Path.resolve(REPO_ROOT, 'x-pack/platform/plugins/shared'),
},
{
name: 'X-Pack Observability',
value: Path.resolve(REPO_ROOT, 'x-pack/solutions/observability/plugins'),
},
{
name: 'X-Pack Security',
value: Path.resolve(REPO_ROOT, 'x-pack/solutions/security/plugins'),
},
{
name: 'X-Pack Search',
value: Path.resolve(REPO_ROOT, 'x-pack/solutions/search/plugins'),
},
{
name: 'X-Pack Functional Testing',
value: Path.resolve(REPO_ROOT, 'x-pack/test/plugin_functional/plugins'),
Expand Down Expand Up @@ -67,7 +95,7 @@ export const QUESTIONS = [
{
name: 'ui',
type: 'confirm',
message: 'Should an UI plugin be generated?',
message: 'Should a UI plugin be generated?',
default: true,
},
{
Expand Down
8 changes: 6 additions & 2 deletions src/dev/notice/generate_notice_from_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ export async function generateNoticeFromSource({ productName, directory, log }:
const select = [
'**/*.{js,mjs,scss,css,ts,tsx}',
'!{node_modules,build,dist,data,built_assets,shared_built_assets}/**',
'!packages/*/{node_modules,build,dist}/**',
'!packages/**/{node_modules,build,dist}/**',
'!src/plugins/*/{node_modules,build,dist}/**',
'!src/core/packages/**/{node_modules,build,dist}/**',
'!src/platform/**/{node_modules,build,dist}/**',
'!x-pack/{node_modules,build,dist,data}/**',
'!x-pack/packages/*/{node_modules,build,dist}/**',
'!x-pack/packages/**/{node_modules,build,dist}/**',
'!x-pack/platform/**/{node_modules,build,dist}/**',
'!x-pack/solutions/**/{node_modules,build,dist}/**',
'!x-pack/plugins/**/{node_modules,build,dist}/**',
'!**/target/**',
];
Expand Down

0 comments on commit 86c3d01

Please sign in to comment.