mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
3 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
|
58c8aff91c
|
[8.x] Sustainable Kibana Architecture: Categorise straightforward packages (#199630) (#201340)
# Backport This will backport the following commits from `main` to `8.x`: - [Sustainable Kibana Architecture: Categorise `straightforward` packages (#199630)](https://github.com/elastic/kibana/pull/199630) <!--- 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-11-22T09:33:25Z","message":"Sustainable Kibana Architecture: Categorise `straightforward` packages (#199630)\n\n## Summary\r\n\r\nThis PR is part of the Kibana Sustainable Architecture effort.\r\n\r\nThe goal is to start categorising Kibana packages into _generic\r\nplatform_ (`group: \"platform\"`) vs _solution-specific_.\r\n\r\n```\r\ngroup?: 'search' | 'security' | 'observability' | 'platform'\r\nvisibility?: 'private' | 'shared'\r\n```\r\nUncategorised modules are considered to be `group: 'common', visibility:\r\n'shared'` by default.\r\n\r\nWe want to prevent code from solution A to depend on code from solution\r\nB.\r\nThus, the rules are pretty simple:\r\n\r\n* Modules can only depend on:\r\n * Modules in the same group\r\n * OR modules with 'shared' visibility\r\n* Modules in `'observability', 'security', 'search'` groups are\r\nmandatorily `visibility: \"private\"`.\r\n\r\nLong term, the goal is to re-organise packages into dedicated folders,\r\ne.g.:\r\n\r\n```\r\nx-pack/platform/plugins/private\r\nx-pack/observability/packages\r\n```\r\n\r\nFor this first wave, we have categorised packages that seem\r\n\"straightforward\":\r\n* Any packages that have:\r\n * at least one dependant module\r\n * all dependants belong to the same group\r\n* Categorise all Core packages:\r\n * `@kbn/core-...-internal` => _platform/private_\r\n * everything else => _platform/shared_\r\n* Categorise as _platform/shared_ those packages that:\r\n * Have at least one dependant in the _platform_ group.\r\n * Don't have any `devOnly: true` dependants.\r\n\r\n### What we ask from you, as CODEOWNERS of the _package manifests_, is\r\nthat you confirm that the categorisation is correct:\r\n\r\n* `group: \"platform\", visibility: \"private\"` if it's a package that\r\nshould only be used from platform code, not from any solution code. It\r\nwill be loaded systematically in all serverless flavors, but solution\r\nplugins and packages won't be able to `import` from it.\r\n* `group: \"platform\", visibility: \"shared\"` if it's a package that can\r\nbe consumed by both platform and solutions code. It will be loaded\r\nsystematically in all serverless flavors, and anybody can import / use\r\ncode from it.\r\n* `group: \"observability\" | \"security\" | \"search\", visibility:\r\n\"private\"` if it's a package that is intented to be used exclusively\r\nfrom a given solution. It won't be accessible nor loaded from other\r\nsolutions nor platform code.\r\n\r\nPlease refer to\r\n[#kibana-sustainable-architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nfor any related questions.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"b24fdf5d3f6b7454a4edcedb8141b82f571e1d74","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","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services"],"number":199630,"url":"https://github.com/elastic/kibana/pull/199630","mergeCommit":{"message":"Sustainable Kibana Architecture: Categorise `straightforward` packages (#199630)\n\n## Summary\r\n\r\nThis PR is part of the Kibana Sustainable Architecture effort.\r\n\r\nThe goal is to start categorising Kibana packages into _generic\r\nplatform_ (`group: \"platform\"`) vs _solution-specific_.\r\n\r\n```\r\ngroup?: 'search' | 'security' | 'observability' | 'platform'\r\nvisibility?: 'private' | 'shared'\r\n```\r\nUncategorised modules are considered to be `group: 'common', visibility:\r\n'shared'` by default.\r\n\r\nWe want to prevent code from solution A to depend on code from solution\r\nB.\r\nThus, the rules are pretty simple:\r\n\r\n* Modules can only depend on:\r\n * Modules in the same group\r\n * OR modules with 'shared' visibility\r\n* Modules in `'observability', 'security', 'search'` groups are\r\nmandatorily `visibility: \"private\"`.\r\n\r\nLong term, the goal is to re-organise packages into dedicated folders,\r\ne.g.:\r\n\r\n```\r\nx-pack/platform/plugins/private\r\nx-pack/observability/packages\r\n```\r\n\r\nFor this first wave, we have categorised packages that seem\r\n\"straightforward\":\r\n* Any packages that have:\r\n * at least one dependant module\r\n * all dependants belong to the same group\r\n* Categorise all Core packages:\r\n * `@kbn/core-...-internal` => _platform/private_\r\n * everything else => _platform/shared_\r\n* Categorise as _platform/shared_ those packages that:\r\n * Have at least one dependant in the _platform_ group.\r\n * Don't have any `devOnly: true` dependants.\r\n\r\n### What we ask from you, as CODEOWNERS of the _package manifests_, is\r\nthat you confirm that the categorisation is correct:\r\n\r\n* `group: \"platform\", visibility: \"private\"` if it's a package that\r\nshould only be used from platform code, not from any solution code. It\r\nwill be loaded systematically in all serverless flavors, but solution\r\nplugins and packages won't be able to `import` from it.\r\n* `group: \"platform\", visibility: \"shared\"` if it's a package that can\r\nbe consumed by both platform and solutions code. It will be loaded\r\nsystematically in all serverless flavors, and anybody can import / use\r\ncode from it.\r\n* `group: \"observability\" | \"security\" | \"search\", visibility:\r\n\"private\"` if it's a package that is intented to be used exclusively\r\nfrom a given solution. It won't be accessible nor loaded from other\r\nsolutions nor platform code.\r\n\r\nPlease refer to\r\n[#kibana-sustainable-architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nfor any related questions.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"b24fdf5d3f6b7454a4edcedb8141b82f571e1d74"}},"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/199630","number":199630,"mergeCommit":{"message":"Sustainable Kibana Architecture: Categorise `straightforward` packages (#199630)\n\n## Summary\r\n\r\nThis PR is part of the Kibana Sustainable Architecture effort.\r\n\r\nThe goal is to start categorising Kibana packages into _generic\r\nplatform_ (`group: \"platform\"`) vs _solution-specific_.\r\n\r\n```\r\ngroup?: 'search' | 'security' | 'observability' | 'platform'\r\nvisibility?: 'private' | 'shared'\r\n```\r\nUncategorised modules are considered to be `group: 'common', visibility:\r\n'shared'` by default.\r\n\r\nWe want to prevent code from solution A to depend on code from solution\r\nB.\r\nThus, the rules are pretty simple:\r\n\r\n* Modules can only depend on:\r\n * Modules in the same group\r\n * OR modules with 'shared' visibility\r\n* Modules in `'observability', 'security', 'search'` groups are\r\nmandatorily `visibility: \"private\"`.\r\n\r\nLong term, the goal is to re-organise packages into dedicated folders,\r\ne.g.:\r\n\r\n```\r\nx-pack/platform/plugins/private\r\nx-pack/observability/packages\r\n```\r\n\r\nFor this first wave, we have categorised packages that seem\r\n\"straightforward\":\r\n* Any packages that have:\r\n * at least one dependant module\r\n * all dependants belong to the same group\r\n* Categorise all Core packages:\r\n * `@kbn/core-...-internal` => _platform/private_\r\n * everything else => _platform/shared_\r\n* Categorise as _platform/shared_ those packages that:\r\n * Have at least one dependant in the _platform_ group.\r\n * Don't have any `devOnly: true` dependants.\r\n\r\n### What we ask from you, as CODEOWNERS of the _package manifests_, is\r\nthat you confirm that the categorisation is correct:\r\n\r\n* `group: \"platform\", visibility: \"private\"` if it's a package that\r\nshould only be used from platform code, not from any solution code. It\r\nwill be loaded systematically in all serverless flavors, but solution\r\nplugins and packages won't be able to `import` from it.\r\n* `group: \"platform\", visibility: \"shared\"` if it's a package that can\r\nbe consumed by both platform and solutions code. It will be loaded\r\nsystematically in all serverless flavors, and anybody can import / use\r\ncode from it.\r\n* `group: \"observability\" | \"security\" | \"search\", visibility:\r\n\"private\"` if it's a package that is intented to be used exclusively\r\nfrom a given solution. It won't be accessible nor loaded from other\r\nsolutions nor platform code.\r\n\r\nPlease refer to\r\n[#kibana-sustainable-architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nfor any related questions.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"b24fdf5d3f6b7454a4edcedb8141b82f571e1d74"}}]}] BACKPORT--> |
||
|
af956f6c9e
|
[8.x] Kibana Sustainable Architecture: Expose StatusResponse in core-status-common (#200524) (#200685)
# Backport This will backport the following commits from `main` to `8.x`: - [Kibana Sustainable Architecture: Expose `StatusResponse` in core-status-common (#200524)](https://github.com/elastic/kibana/pull/200524) <!--- 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-11-18T13:34:54Z","message":"Kibana Sustainable Architecture: Expose `StatusResponse` in core-status-common (#200524)\n\n## Summary\n\n- Exposes the interfaces that define the format of the response of the\n`/api/status` endpoint.\n- Moves them from `@kbn/core-status-common-internal` to\n`@kbn/core-status-common`.\n- Removes the former package, as it no longer contains anything.\n- Fixes some of the illegal dependencies uncovered by\nhttps://github.com/elastic/kibana/pull/199630.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"ab0375f56fb9af1548631bf07e7c3fc4c06dc012","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:prev-minor"],"number":200524,"url":"https://github.com/elastic/kibana/pull/200524","mergeCommit":{"message":"Kibana Sustainable Architecture: Expose `StatusResponse` in core-status-common (#200524)\n\n## Summary\n\n- Exposes the interfaces that define the format of the response of the\n`/api/status` endpoint.\n- Moves them from `@kbn/core-status-common-internal` to\n`@kbn/core-status-common`.\n- Removes the former package, as it no longer contains anything.\n- Fixes some of the illegal dependencies uncovered by\nhttps://github.com/elastic/kibana/pull/199630.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"ab0375f56fb9af1548631bf07e7c3fc4c06dc012"}},"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/200524","number":200524,"mergeCommit":{"message":"Kibana Sustainable Architecture: Expose `StatusResponse` in core-status-common (#200524)\n\n## Summary\n\n- Exposes the interfaces that define the format of the response of the\n`/api/status` endpoint.\n- Moves them from `@kbn/core-status-common-internal` to\n`@kbn/core-status-common`.\n- Removes the former package, as it no longer contains anything.\n- Fixes some of the illegal dependencies uncovered by\nhttps://github.com/elastic/kibana/pull/199630.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"ab0375f56fb9af1548631bf07e7c3fc4c06dc012"}}]}] BACKPORT--> |
||
|
7b820130ab
|
[8.x] Add ESLINT constraints to detect inter-group dependencies (#194810) (#197670)
# Backport This will backport the following commits from `main` to `8.x`: - [Add ESLINT constraints to detect inter-group dependencies (#194810)](https://github.com/elastic/kibana/pull/194810) <!--- 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-10-22T11:34:19Z","message":"Add ESLINT constraints to detect inter-group dependencies (#194810)\n\n## Summary\r\n\r\nAddresses https://github.com/elastic/kibana-team/issues/1175\r\n\r\nAs part of the **Sustainable Kibana Architecture** initiative, this PR\r\nsets the foundation to start classifying plugins in isolated groups,\r\nmatching our current solutions / project types:\r\n\r\n* It adds support for the following fields in the packages' manifests\r\n(kibana.jsonc):\r\n* `group?: 'search' | 'security' | 'observability' | 'platform' |\r\n'common'`\r\n * `visibility?: 'private' | 'shared'`\r\n\r\n* It proposes a folder structure to automatically infer groups:\r\n```javascript\r\n 'src/platform/plugins/shared': {\r\n group: 'platform',\r\n visibility: 'shared',\r\n },\r\n 'src/platform/plugins/internal': {\r\n group: 'platform',\r\n visibility: 'private',\r\n },\r\n 'x-pack/platform/plugins/shared': {\r\n group: 'platform',\r\n visibility: 'shared',\r\n },\r\n 'x-pack/platform/plugins/internal': {\r\n group: 'platform',\r\n visibility: 'private',\r\n },\r\n 'x-pack/solutions/observability/plugins': {\r\n group: 'observability',\r\n visibility: 'private',\r\n },\r\n 'x-pack/solutions/security/plugins': {\r\n group: 'security',\r\n visibility: 'private',\r\n },\r\n 'x-pack/solutions/search/plugins': {\r\n group: 'search',\r\n visibility: 'private',\r\n },\r\n```\r\n\r\n* If a plugin is moved to one of the specific locations above, the group\r\nand visibility in the manifest (if specified) must match those inferred\r\nfrom the path.\r\n* Plugins that are not relocated are considered: `group: 'common',\r\nvisibility: 'shared'` by default. As soon as we specify a custom\r\n`group`, the ESLINT rules will check violations against dependencies /\r\ndependants.\r\n\r\nThe ESLINT rules are pretty simple:\r\n* Plugins can only depend on:\r\n * Plugins in the same group\r\n * OR plugins with `'shared'` visibility\r\n* Plugins in `'observability', 'security', 'search'` groups are\r\nmandatorily `'private'`.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"2a085e103afe8c7bdfb626d0dc683fc8be0e6c05","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","backport missing","v9.0.0","release_note:feature","backport:prev-minor"],"number":194810,"url":"https://github.com/elastic/kibana/pull/194810","mergeCommit":{"message":"Add ESLINT constraints to detect inter-group dependencies (#194810)\n\n## Summary\r\n\r\nAddresses https://github.com/elastic/kibana-team/issues/1175\r\n\r\nAs part of the **Sustainable Kibana Architecture** initiative, this PR\r\nsets the foundation to start classifying plugins in isolated groups,\r\nmatching our current solutions / project types:\r\n\r\n* It adds support for the following fields in the packages' manifests\r\n(kibana.jsonc):\r\n* `group?: 'search' | 'security' | 'observability' | 'platform' |\r\n'common'`\r\n * `visibility?: 'private' | 'shared'`\r\n\r\n* It proposes a folder structure to automatically infer groups:\r\n```javascript\r\n 'src/platform/plugins/shared': {\r\n group: 'platform',\r\n visibility: 'shared',\r\n },\r\n 'src/platform/plugins/internal': {\r\n group: 'platform',\r\n visibility: 'private',\r\n },\r\n 'x-pack/platform/plugins/shared': {\r\n group: 'platform',\r\n visibility: 'shared',\r\n },\r\n 'x-pack/platform/plugins/internal': {\r\n group: 'platform',\r\n visibility: 'private',\r\n },\r\n 'x-pack/solutions/observability/plugins': {\r\n group: 'observability',\r\n visibility: 'private',\r\n },\r\n 'x-pack/solutions/security/plugins': {\r\n group: 'security',\r\n visibility: 'private',\r\n },\r\n 'x-pack/solutions/search/plugins': {\r\n group: 'search',\r\n visibility: 'private',\r\n },\r\n```\r\n\r\n* If a plugin is moved to one of the specific locations above, the group\r\nand visibility in the manifest (if specified) must match those inferred\r\nfrom the path.\r\n* Plugins that are not relocated are considered: `group: 'common',\r\nvisibility: 'shared'` by default. As soon as we specify a custom\r\n`group`, the ESLINT rules will check violations against dependencies /\r\ndependants.\r\n\r\nThe ESLINT rules are pretty simple:\r\n* Plugins can only depend on:\r\n * Plugins in the same group\r\n * OR plugins with `'shared'` visibility\r\n* Plugins in `'observability', 'security', 'search'` groups are\r\nmandatorily `'private'`.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"2a085e103afe8c7bdfb626d0dc683fc8be0e6c05"}},"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/194810","number":194810,"mergeCommit":{"message":"Add ESLINT constraints to detect inter-group dependencies (#194810)\n\n## Summary\r\n\r\nAddresses https://github.com/elastic/kibana-team/issues/1175\r\n\r\nAs part of the **Sustainable Kibana Architecture** initiative, this PR\r\nsets the foundation to start classifying plugins in isolated groups,\r\nmatching our current solutions / project types:\r\n\r\n* It adds support for the following fields in the packages' manifests\r\n(kibana.jsonc):\r\n* `group?: 'search' | 'security' | 'observability' | 'platform' |\r\n'common'`\r\n * `visibility?: 'private' | 'shared'`\r\n\r\n* It proposes a folder structure to automatically infer groups:\r\n```javascript\r\n 'src/platform/plugins/shared': {\r\n group: 'platform',\r\n visibility: 'shared',\r\n },\r\n 'src/platform/plugins/internal': {\r\n group: 'platform',\r\n visibility: 'private',\r\n },\r\n 'x-pack/platform/plugins/shared': {\r\n group: 'platform',\r\n visibility: 'shared',\r\n },\r\n 'x-pack/platform/plugins/internal': {\r\n group: 'platform',\r\n visibility: 'private',\r\n },\r\n 'x-pack/solutions/observability/plugins': {\r\n group: 'observability',\r\n visibility: 'private',\r\n },\r\n 'x-pack/solutions/security/plugins': {\r\n group: 'security',\r\n visibility: 'private',\r\n },\r\n 'x-pack/solutions/search/plugins': {\r\n group: 'search',\r\n visibility: 'private',\r\n },\r\n```\r\n\r\n* If a plugin is moved to one of the specific locations above, the group\r\nand visibility in the manifest (if specified) must match those inferred\r\nfrom the path.\r\n* Plugins that are not relocated are considered: `group: 'common',\r\nvisibility: 'shared'` by default. As soon as we specify a custom\r\n`group`, the ESLINT rules will check violations against dependencies /\r\ndependants.\r\n\r\nThe ESLINT rules are pretty simple:\r\n* Plugins can only depend on:\r\n * Plugins in the same group\r\n * OR plugins with `'shared'` visibility\r\n* Plugins in `'observability', 'security', 'search'` groups are\r\nmandatorily `'private'`.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"2a085e103afe8c7bdfb626d0dc683fc8be0e6c05"}}]}] BACKPORT--> |