Skip to content

Commit

Permalink
Merge branch 'main' into fix/149803
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula authored Jan 31, 2023
2 parents 787e02b + e62fdcb commit 07730b3
Show file tree
Hide file tree
Showing 908 changed files with 32,559 additions and 28,509 deletions.
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@

### Kibana React (to be deprecated)
/src/plugins/kibana_react/ @elastic/appex-sharedux
/src/plugins/kibana_react/public/code_editor @elastic/appex-sharedux @elastic/kibana-presentation
/src/plugins/kibana_react/public/@elastic/appex-sharedux @elastic/kibana-presentation

### Home Plugin and Packages
/src/plugins/home/public @elastic/appex-sharedux
Expand Down Expand Up @@ -1040,6 +1040,9 @@ packages/shared-ux/button/exit_full_screen/types @elastic/appex-sharedux
packages/shared-ux/card/no_data/impl @elastic/appex-sharedux
packages/shared-ux/card/no_data/mocks @elastic/appex-sharedux
packages/shared-ux/card/no_data/types @elastic/appex-sharedux
packages/shared-ux/code_editor/impl @elastic/shared-ux
packages/shared-ux/code_editor/mocks @elastic/shared-ux
packages/shared-ux/code_editor/types @elastic/shared-ux
packages/shared-ux/file/context @elastic/appex-sharedux
packages/shared-ux/file/file_picker/impl @elastic/appex-sharedux
packages/shared-ux/file/file_upload/impl @elastic/appex-sharedux
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ disabledPlugins
webpackstats.json
/config/*
!/config/kibana.yml
!/config/kibana.serverless.yml
!/config/node.options
coverage
selenium
Expand Down
5 changes: 5 additions & 0 deletions .telemetryrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@
"exclude": [
"src/plugins/kibana_usage_collection/server/collectors/config_usage/register_config_usage_collector.ts"
]
},
{
"output": "src/plugins/telemetry/schema/kbn_packages.json",
"root": "packages/",
"exclude": []
}
]
9 changes: 9 additions & 0 deletions config/kibana.serverless.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# as work on serverless picks up we will add config values to this file that
# define how Kibana will run in "serverless" mode. To start Kibana locally with
# this configuration, pass `--serverless` or run `yarn start-serverless`

# configuration is applied in the following order, later values override
# 1. kibana.yml
# 2. kibana.serverless.yml (when --serverless is passed)
# 3. kibana.dev.yml
# 4. kibana.serverless.dev.yml (when --serverless is passed)
18 changes: 7 additions & 11 deletions dev_docs/operations/packages_idm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,16 @@ Package types allow us to have many different packages, pre-defined build tasks,
: These packages can be imported from all other packages.

`shared-browser`
: These packages can be imported from `shared-browser` and `plugin-browser` packages. `shared-browser` packages may include Storybooks.
: These packages can be imported from `shared-browser` and `public` directories within `plugin` packages. `shared-browser` packages may include Storybooks.

`shared-server`
: These packages can be imported from `shared-server` and `plugin-server` packages.
: These packages can be imported from `shared-server` and `server` directories within `plugin` packages.

`shared-scss`
: These packages can be imported by `shared-browser` and `plugin-browser` packages, and expose an `index.scss` file to consumers instead of an `index.ts` file.
: These packages can be imported by `shared-browser` and `public` directories within `plugin` packages, and expose an `index.scss` file to consumers instead of an `index.ts` file.

`plugin-browser`
: These packages expose types to other packages via a root `types.ts` file. Module IDs must end with `-plugin-browser`. Consumers must use `import type` statements.

`plugin-server`
: These packages expose types to other packages via a root `types.ts` file. Module IDs must end with `-plugin-server`. Consumers must use `import type` statements.
`plugin`
: These packages were automatically created from the existing plugins at the time we switched everything over to packages. Module IDs must end with `-plugin`. Consumers must use `import type` statements.

`functional-test`
: These packages expose one or more functional testing configurations, including API integration tests, and can not be imported by other packages. Separating functional and integration tests allows us to iterate on tests without rebuilding the application. Similarly, iterating and updating the application should mostly mean the tests don't need to rebuild.
Expand Down Expand Up @@ -160,8 +157,7 @@ The solution to resolving a circular dependency has, thus far, been to break out

There are a few package naming rules:
- all packages must use the `@kbn/` namespace
- `plugin-browser`-type packages must end with `-plugin-browser`
- `plugin-server- type packages must end with `-plugin-server`
- `plugin`-type packages must end with `-plugin`
- considering that we operate in a global namespace, avoid overly generic names

Other than these rules, it's up to you and your team to decide on an appropriate name for your package.
Expand Down Expand Up @@ -205,4 +201,4 @@ We're now entering Phase 2 of the plan, more details about the phases of our pla

[status]: #what-works-now
[idm-rfc]: https://docs.google.com/document/d/1Bhg601MoGQjqGMGdLWSLnkopRexwrcbf_0MNcUkhx3I "Internal Dependency Management RFC on Google Docs"
[pkgDirs]: https://github.com/elastic/kibana/blob/main/packages/kbn-bazel-packages/src/bazel_package_dirs.ts#L22
[pkgDirs]: https://github.com/elastic/kibana/blob/main/packages/kbn-repo-packages/src/repo_package_dirs.js#L19
3 changes: 2 additions & 1 deletion docs/api/osquery-manager/live-queries/get-all.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ experimental[] Get live queries.
(Optional, string) An identifier for the space. When `space_id` is not provided in the URL, the default space is used.


=== Query parameters
[[osquery-manager-live-queries-api-get-all-query-params]]
==== Query parameters

`page`::
(Optional, integer) The page number to return. The default is `1`.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/osquery-manager/packs/delete.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ WARNING: Once you delete a pack, _it cannot be recovered_.
`200`::
Indicates that the pack is deleted. Returns an empty response body.


[[osquery-manager-packs-api-delete-example]]
==== Example

Delete a pack object with the `bbe5b070-0c51-11ed-b0f8-ad31b008e832` ID:
Expand Down
4 changes: 2 additions & 2 deletions docs/api/osquery-manager/packs/get-all.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ experimental[] Get packs.
`space_id`::
(Optional, string) The space identifier. When `space_id` is not provided in the URL, the default space is used.


=== Query parameters
[[osquery-manager-packs-api-get-all-query-params]]
==== Query parameters

`page`::
(Optional, integer) The page number to return. The default is `1`.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/osquery-manager/saved-queries/delete.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ WARNING: Once you delete a saved query, _it cannot be recovered_.
`200`::
Indicates the saved query is deleted. Returns an empty response body.


[[osquery-manager-saved-queries-api-delete-example]]
==== Example

Delete a saved query object with the `42ba9c50-0cc5-11ed-aa1d-2b27890bc90d` ID:
Expand Down
4 changes: 2 additions & 2 deletions docs/api/osquery-manager/saved-queries/get-all.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ experimental[] Get saved queries.
`space_id`::
(Optional, string) The space identifier. When `space_id` is not provided in the URL, the default space is used.


=== Query parameters
[[osquery-manager-saved-queries-api-get-all-query-params]]
==== Query parameters

`page`::
(Optional, integer) The page number to return. The default is `1`.
Expand Down
2 changes: 1 addition & 1 deletion docs/apm/service-maps.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ iOS agent:: _Not yet supported_
Java agent:: ≥ v1.13.0
.NET agent:: ≥ v1.3.0
Node.js agent:: ≥ v3.6.0
PHP agent:: _Not yet supported_
PHP agent:: ≥ v1.2.0
Python agent:: ≥ v5.5.0
Ruby agent:: ≥ v3.6.0
Real User Monitoring (RUM) agent:: ≥ v4.7.0
16 changes: 11 additions & 5 deletions docs/apm/troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,19 @@ Instead, we should strip away the unique information and group our transactions
In this case, that means naming all blog transactions, `/blog`, and all documentation transactions, `/guide`.

If you feel like you'd be losing valuable information by following this naming convention, don't fret!
You can always add additional metadata to your transactions using {apm-guide-ref-v}/metadata.html#labels-fields[labels] (indexed) or
{apm-guide-ref-v}/metadata.html#custom-fields[custom context] (non-indexed).
You can always add additional metadata to your transactions using {apm-guide-ref}/metadata.html#labels-fields[labels] (indexed) or
{apm-guide-ref}/metadata.html#custom-fields[custom context] (non-indexed).

After ensuring you've correctly named your transactions,
you might still see an error in the APM app related to too many transaction names.
If this is the case, you can increase the default number of transaction groups displayed in the APM app by configuring
<<apm-settings-kb,`xpack.apm.ui.transactionGroupBucketSize`>>.
you might still see errors in the APM app related to transaction group limit reached:

`The number of transaction groups has been reached. Current APM server capacity for handling unique transaction groups has been reached. There are at least X transactions missing in this list. Please decrease the number of transaction groups in your service or increase the memory allocated to APM server.`

You will see this warning if an agent is creating too many transaction groups. This could indicate incorrect instrumentation which will have to be fixed in your application. Alternatively you can increase the memory of the APM server.

`Number of transaction groups exceed the allowed maximum(1,000) that are displayed. The maximum number of transaction groups displayed in Kibana has been reached. Try narrowing down results by using the query bar..`

You will see this warning if your results have more than `1000` unique transaction groups. Alternatively you can use the query bar to reduce the number of unique transaction groups in your results.

**More information**

Expand Down
4 changes: 4 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ as uiSettings within the code.
|Console provides the user with tools for storing and executing requests against Elasticsearch.
|{kib-repo}blob/{branch}/src/plugins/content_management/README.md[contentManagement]
|The content management plugin provides functionality to manage content in Kibana.
|{kib-repo}blob/{branch}/src/plugins/controls/README.mdx[controls]
|The Controls plugin contains Embeddables which can be used to add user-friendly interactivity to apps.
Expand Down
8 changes: 0 additions & 8 deletions docs/settings/apm-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,12 @@ Maximum number of traces per request for generating the global service map. Defa
`xpack.apm.ui.enabled` {ess-icon}::
Set to `false` to hide the APM app from the main menu. Defaults to `true`.

`xpack.apm.ui.transactionGroupBucketSize` {ess-icon}::
Number of top transaction groups displayed in the APM app. Defaults to `1000`.

`xpack.apm.ui.maxTraceItems` {ess-icon}::
Maximum number of child items displayed when viewing trace details. Defaults to `1000`.

`xpack.observability.annotations.index` {ess-icon}::
Index name where Observability annotations are stored. Defaults to `observability-annotations`.

`xpack.apm.searchAggregatedTransactions` {ess-icon}::
Enables Transaction histogram metrics. Defaults to `auto` so the UI will use metric indices over transaction indices for transactions if aggregated transactions are found. When set to `always`, additional configuration in APM Server is required. When set to `never` and aggregated transactions are not used.
+
See {apm-guide-ref}/transaction-metrics.html[Configure transaction metrics] for more information.

`xpack.apm.metricsInterval` {ess-icon}::
Sets a `fixed_interval` for date histograms in metrics aggregations. Defaults to `30`.

Expand Down
9 changes: 8 additions & 1 deletion docs/user/security/audit-logging.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ Refer to the corresponding {es} logs for potential write errors.
| `unknown` | User is creating a case comment.
| `failure` | User is not authorized to create a case comment.

.2+| `case_comment_bulk_create`
| `unknown` | User is creating multiple case comments.
| `failure` | User is not authorized to create multiple case comments.

.1+| `case_user_action_create_comment`
| `success` | User has created a case comment.

Expand Down Expand Up @@ -376,6 +380,10 @@ Refer to the corresponding {es} logs for potential write errors.
| `success` | User has accessed a case comment.
| `failure` | User is not authorized to access a case comment.

.2+| `case_comment_bulk_get`
| `success` | User has accessed multiple case comments.
| `failure` | User is not authorized to access multiple case comments.

.2+| `case_comment_get_all`
| `success` | User has accessed case comments.
| `failure` | User is not authorized to access case comments.
Expand All @@ -400,7 +408,6 @@ Refer to the corresponding {es} logs for potential write errors.
| `success` | User has accessed the user activity of a case.
| `failure` | User is not authorized to access the user activity of a case.


.2+| `case_user_actions_find`
| `success` | User has accessed the user activity of a case as part of a search operation.
| `failure` | User is not authorized to access the user activity of a case.
Expand Down
2 changes: 1 addition & 1 deletion fleet_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[
{
"name": "apm",
"version": "8.7.0-preview-1674665274",
"version": "8.7.0-preview-1675078021",
"forceAlignStackVersion": true
},
{
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"makelogs": "node scripts/makelogs",
"spec_to_console": "node scripts/spec_to_console",
"start": "node scripts/kibana --dev",
"start-serverless": "node scripts/kibana --dev --serverless",
"storybook": "node scripts/storybook",
"test:ftr": "node scripts/functional_tests",
"test:ftr:runner": "node scripts/functional_test_runner",
Expand Down Expand Up @@ -94,7 +95,7 @@
},
"dependencies": {
"@appland/sql-parser": "^1.5.1",
"@babel/runtime": "^7.20.7",
"@babel/runtime": "^7.20.13",
"@dnd-kit/core": "^3.1.1",
"@dnd-kit/sortable": "^4.0.0",
"@dnd-kit/utilities": "^2.0.0",
Expand Down Expand Up @@ -143,6 +144,9 @@
"@kbn/cell-actions": "link:packages/kbn-cell-actions",
"@kbn/chart-expressions-common": "link:src/plugins/chart_expressions/common",
"@kbn/chart-icons": "link:packages/kbn-chart-icons",
"@kbn/code-editor": "link:packages/shared-ux/code_editor/impl",
"@kbn/code-editor-mocks": "link:packages/shared-ux/code_editor/mocks",
"@kbn/code-editor-types": "link:packages/shared-ux/code_editor/types",
"@kbn/coloring": "link:packages/kbn-coloring",
"@kbn/config": "link:packages/kbn-config",
"@kbn/config-mocks": "link:packages/kbn-config-mocks",
Expand Down Expand Up @@ -665,7 +669,7 @@
"@babel/eslint-plugin": "^7.19.1",
"@babel/generator": "^7.20.7",
"@babel/helper-plugin-utils": "^7.20.2",
"@babel/parser": "^7.20.7",
"@babel/parser": "^7.20.13",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
Expand All @@ -677,7 +681,7 @@
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@babel/register": "^7.18.9",
"@babel/traverse": "^7.20.12",
"@babel/traverse": "^7.20.13",
"@babel/types": "^7.20.7",
"@bazel/ibazel": "^0.16.2",
"@bazel/typescript": "4.6.2",
Expand Down Expand Up @@ -1155,7 +1159,7 @@
"resolve": "^1.22.0",
"rxjs-marbles": "^7.0.1",
"sass-loader": "^10.4.1",
"selenium-webdriver": "^4.7.1",
"selenium-webdriver": "^4.8.0",
"simple-git": "^3.16.0",
"sinon": "^7.4.2",
"sort-package-json": "^1.53.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function create({
logger?: jest.Mocked<LoggerFactory>;
configService?: jest.Mocked<IConfigService>;
} = {}): DeeplyMockedKeys<CoreContext> {
return { coreId: Symbol(), env, logger, configService };
return { coreId: Symbol(), env: env as DeeplyMockedKeys<typeof env>, logger, configService };
}

export const mockCoreContext = {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,7 @@ export function HeaderLogo({ href, navigateToApp, loadingCount$, ...observables
defaultMessage: 'Elastic home',
})}
>
<LoadingIndicator
loadingCount$={loadingCount$!}
showPlainSpinner={Boolean(logo || customizedLogo)}
/>
<LoadingIndicator loadingCount$={loadingCount$!} customLogo={logo} />
{customizedLogo ? (
<img src={customizedLogo} width="200" height="84" alt="custom mark" />
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ describe('kbnLoadingIndicator', () => {
expect(wrapper).toMatchSnapshot();
});

it('shows EuiLoadingSpinner when showPlainSpinner is true', () => {
it('shows logo image when customLogo is set', () => {
const wrapper = shallow(
<LoadingIndicator loadingCount$={new BehaviorSubject(1)} showPlainSpinner={true} />
<LoadingIndicator loadingCount$={new BehaviorSubject(1)} customLogo={'customLogo'} />
);
// Pause the check beyond the 250ms delay that it has
setTimeout(() => {
Expand Down
Loading

0 comments on commit 07730b3

Please sign in to comment.