Skip to content

Commit

Permalink
Merge branch '8.1' into backport/8.1/pr-127979
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Mar 23, 2022
2 parents 90b55a1 + 424e97b commit 556b597
Show file tree
Hide file tree
Showing 175 changed files with 2,538 additions and 1,398 deletions.
2 changes: 1 addition & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts

ARG NODE_VERSION=16.13.2
ARG NODE_VERSION=16.14.2

FROM node:${NODE_VERSION} AS base

Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.2
16.14.2
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.2
16.14.2
14 changes: 7 additions & 7 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ check_rules_nodejs_version(minimum_version_string = "3.8.0")
# we can update that rule.
node_repositories(
node_repositories = {
"16.13.2-darwin_amd64": ("node-v16.13.2-darwin-x64.tar.gz", "node-v16.13.2-darwin-x64", "900a952bb77533d349e738ff8a5179a4344802af694615f36320a888b49b07e6"),
"16.13.2-darwin_arm64": ("node-v16.13.2-darwin-arm64.tar.gz", "node-v16.13.2-darwin-arm64", "09d300008ad58792c12622a5eafdb14c931587bb88713df4df64cdf4ff2188d1"),
"16.13.2-linux_arm64": ("node-v16.13.2-linux-arm64.tar.xz", "node-v16.13.2-linux-arm64", "a3cf8e4e9fbea27573eee6da84720bf7227ddd22842b842d48049d6dfe55fb03"),
"16.13.2-linux_s390x": ("node-v16.13.2-linux-s390x.tar.xz", "node-v16.13.2-linux-s390x", "c4ba46fc19366f7377d28a60a98f741bfa38045d7924306244c51d1660afcc8d"),
"16.13.2-linux_amd64": ("node-v16.13.2-linux-x64.tar.xz", "node-v16.13.2-linux-x64", "7f5e9a42d6e86147867d35643c7b1680c27ccd45db85666fc52798ead5e74421"),
"16.13.2-windows_amd64": ("node-v16.13.2-win-x64.zip", "node-v16.13.2-win-x64", "107e3ece84b7fa1e80b3bdf03181d395246c7867e27b17b6d7e6fa9c7932b467"),
"16.14.2-darwin_amd64": ("node-v16.14.2-darwin-x64.tar.gz", "node-v16.14.2-darwin-x64", "d3076ca7fcc7269c8ff9b03fe7d1c277d913a7e84a46a14eff4af7791ff9d055"),
"16.14.2-darwin_arm64": ("node-v16.14.2-darwin-arm64.tar.gz", "node-v16.14.2-darwin-arm64", "a66d9217d2003bd416d3dd06dfd2c7a044c4c9ff2e43a27865790bd0d59c682d"),
"16.14.2-linux_arm64": ("node-v16.14.2-linux-arm64.tar.xz", "node-v16.14.2-linux-arm64", "f7c5a573c06a520d6c2318f6ae204141b8420386553a692fc359f8ae3d88df96"),
"16.14.2-linux_s390x": ("node-v16.14.2-linux-s390x.tar.xz", "node-v16.14.2-linux-s390x", "3197925919ca357e17a31132dc6ef4e5afae819fa09905cfe9f7ff7924a00bf5"),
"16.14.2-linux_amd64": ("node-v16.14.2-linux-x64.tar.xz", "node-v16.14.2-linux-x64", "e40c6f81bfd078976d85296b5e657be19e06862497741ad82902d0704b34bb1b"),
"16.14.2-windows_amd64": ("node-v16.14.2-win-x64.zip", "node-v16.14.2-win-x64", "4731da4fbb2015d414e871fa9118cabb643bdb6dbdc8a69a3ed563266ac93229"),
},
node_version = "16.13.2",
node_version = "16.14.2",
node_urls = [
"https://nodejs.org/dist/v{version}/{filename}",
],
Expand Down
Binary file added dev_docs/tutorials/apm_ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions dev_docs/tutorials/debugging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,49 @@ logging:
- name: elasticsearch.query
level: debug
```

## Debugging Kibana with APM

Kibana is integrated with APM's node and RUM agents.
To learn more about how APM works and what it reports, refer to the [documentation](https://www.elastic.co/guide/en/apm/guide/current/index.html).

We currently track the following types of transactions from Kibana:

Frontend (APM RUM):
* `http-request`- tracks all outgoing API requests
* `page-load` - tracks the inidial loading time of kibana
* `app-change` - tracks application changes

Backend (APM Node):
* `request` - tracks all incoming API requests
* `kibana-platform` - tracks server initiation phases (preboot, setup and start)
* `task-manager` - tracks the operation of the task manager, including claiming pending tasks and marking them as running
* `task-run` - tracks the execution of individual tasks

### Enabling APM on a local environment

In some cases, it is beneficial to enable APM on a local development environment to get an initial undesrtanding of a feature's performance during manual or automatic tests.

1. Create a secondary monitoring deployment to collect APM data. The easiest option is to use [Elastic Cloud](https://cloud.elastic.co/deployments) to create a new deployment.
2. Open Kibana, go to `Integrations` and enable the Elastic APM integration.
3. Scroll down and copy the server URL and secret token. You may also find them in your cloud console under APM & Fleet.
4. Create or open `config\kibana.dev.yml` on your local development environment.
5. Add the following settings:
```
elastic.apm.active: true
elastic.apm.serverUrl: <serverUrl>
elastic.apm.secretToken: <secretToken>
```
6. Once you run kibana and start using it, two new services (kibana, kibana-frontend) should appear under the APM UI on the APM deployment.
![APM UI](./apm_ui.png)

### Enabling APM via environment variables

It is possible to enable APM via environment variables as well.
They take precedence over any values defined in `kibana.yml` or `kibana.dev.yml`

Set the following environment variables to enable APM:

* ELASTIC_APM_ACTIVE
* ELASTIC_APM_SERVER_URL
* ELASTIC_APM_SECRET_TOKEN
52 changes: 48 additions & 4 deletions docs/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

Review important information about the {kib} 8.x releases.

* <<release-notes-8.1.1>>
* <<release-notes-8.1.0>>
//* <<release-notes-8.0.1>>
//* <<release-notes-8.0.0>>
Expand All @@ -21,6 +22,53 @@ Review important information about the {kib} 8.x releases.

--

[[release-notes-8.1.1]]
== {kib} 8.1.1

Review the following information about the {kib} 8.1.1 release.

[float]
[[breaking-changes-8.1.1]]
=== Breaking changes

Breaking changes can prevent your application from optimal operation and performance.
Before you upgrade to 8.1.1, review the breaking changes, then mitigate the impact to your application.

// tag::notable-breaking-changes[]

There are no breaking changes in {kib} 8.1.1.

// end::notable-breaking-changes[]

To review the breaking changes in previous versions, refer to the following:

{kibana-ref-all}/8.0/release-notes-8.0.0.html#breaking-changes-8.0.0[8.0.0] | {kibana-ref-all}/8.0/release-notes-8.0.0-rc2.html#breaking-changes-8.0.0-rc2[8.0.0-rc2] | {kibana-ref-all}/8.0/release-notes-8.0.0-rc1.html#breaking-changes-8.0.0-rc1[8.0.0-rc1] | {kibana-ref-all}/8.0/release-notes-8.0.0-beta1.html#breaking-changes-8.0.0-beta1[8.0.0-beta1] | {kibana-ref-all}/8.0/release-notes-8.0.0-alpha2.html#breaking-changes-8.0.0-alpha2[8.0.0-alpha2] | {kibana-ref-all}/8.0/release-notes-8.0.0-alpha1.html#breaking-changes-8.0.0-alpha1[8.0.0-alpha1]

[float]
[[enhancement-v8.1.1]]
=== Enhancement
Dashboard::
Improves controls empty state {kibana-pull}125728[#125728]

[float]
[[fixes-v8.1.1]]
=== Bug fixes
Data ingest::
The dot expander processor in the Ingest Pipelines UI now allows setting a wildcard (`*`) for the field parameter {kibana-pull}123522[#123522]

Elastic Security::
For the Elastic Security 8.1.1 release information, refer to {security-guide}/release-notes.html[_Elastic Security Solution Release Notes_].

Enterprise Search::
For the Elastic Enterprise Search 8.1.1 release information, refer to {enterprise-search-ref}/changelog.html[_Elastic Enterprise Search Documentation Release notes_].

Fleet::
* Adds a new validation message {kibana-pull}127239[#127239]
* Fixes empty assets on package install {kibana-pull}127070[#127070]
* Hide enroll command when user creates a new agent policy in the Add agent flyout {kibana-pull}126431[#126431]
* Makes input IDs unique in agent policy yaml {kibana-pull}127343[#127343]
* Fixes links to Agent logs for APM, Endpoint, Synthetics, and OSQuery {kibana-pull}127480[#127480]

[[release-notes-8.1.0]]
== {kib} 8.1.0

Expand All @@ -33,8 +81,6 @@ Review the following information about the {kib} 8.1.0 release.
Breaking changes can prevent your application from optimal operation and performance.
Before you upgrade to 8.1.0, review the breaking changes, then mitigate the impact to your application.

// tag::notable-breaking-changes[]

[discrete]
[[breaking-121435]]
.Removes legacy CSV export type
Expand All @@ -59,8 +105,6 @@ The POST URLs that you generated in {kib} 6.2.0 no longer work. For more informa
{kibana-ref-all}/8.1/automating-report-generation.html[Regenerate the POST URLs] that you use to automatatically generate PDF reports.
====

// end::notable-breaking-changes[]

To review the breaking changes in previous versions, refer to the following:

{kibana-ref-all}/8.0/release-notes-8.0.0.html#breaking-changes-8.0.0[8.0.0] | {kibana-ref-all}/8.0/release-notes-8.0.0-rc2.html#breaking-changes-8.0.0-rc2[8.0.0-rc2] | {kibana-ref-all}/8.0/release-notes-8.0.0-rc1.html#breaking-changes-8.0.0-rc1[8.0.0-rc1] | {kibana-ref-all}/8.0/release-notes-8.0.0-beta1.html#breaking-changes-8.0.0-beta1[8.0.0-beta1] | {kibana-ref-all}/8.0/release-notes-8.0.0-alpha2.html#breaking-changes-8.0.0-alpha2[8.0.0-alpha2] | {kibana-ref-all}/8.0/release-notes-8.0.0-alpha1.html#breaking-changes-8.0.0-alpha1[8.0.0-alpha1]
Expand Down
25 changes: 9 additions & 16 deletions docs/developer/advanced/upgrading-nodejs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,26 @@ These files must be updated when upgrading Node.js:
- {kib-repo}blob/{branch}/WORKSPACE.bazel[`WORKSPACE.bazel`] - The version is specified in the `node_version` property.
Besides this property, the list of files under `node_repositories` must be updated along with their respective SHA256 hashes.
These can be found on the https://nodejs.org[nodejs.org] website.
Example for Node.js v14.16.1: https://nodejs.org/dist/v14.16.1/SHASUMS256.txt.asc
Example for Node.js v16.14.2: https://nodejs.org/dist/v16.14.2/SHASUMS256.txt.asc

See PR {kib-repo}pull/96382[#96382] for an example of how the Node.js version has been upgraded previously.

In the 6.8 branch, neither the `.ci/Dockerfile` file nor the `WORKSPACE.bazel` file exists, so when upgrading Node.js in that branch, just skip those files.
See PR {kib-repo}pull/128123[#128123] for an example of how the Node.js version has been upgraded previously.

=== Backporting

The following rules are not set in stone.
Use best judgement when backporting.

Currently version 7.11 and newer run Node.js 14, while 7.10 and older run Node.js 10.
Hence, upgrades to either Node.js 14 or Node.js 10 should be done as separate PRs.

==== Node.js patch upgrades

Typically, you want to backport Node.js *patch* upgrades to all supported release branches that run the same *major* Node.js version:
Typically, you want to backport Node.js *patch* upgrades to all supported release branches that run the same *major* Node.js version (which currently is all of them, but this might change in the future once Node.js v18 is released and becomes LTS):

- If upgrading Node.js 14, and the current release is 7.11.1, the main PR should target `master` and be backported to `7.x` and `7.11`.
- If upgrading Node.js 10, the main PR should target `6.8` only.
- If upgrading Node.js 16, and the current release is 8.1.x, the main PR should target `main` and be backported to `7.17` and `8.1`.

==== Node.js minor upgrades

Typically, you want to backport Node.js *minor* upgrades to the next minor {kib} release branch that runs the same *major* Node.js version:

- If upgrading Node.js 14, and the current release is 7.11.1, the main PR should target `master` and be backported to `7.x`, while leaving the `7.11` branch as-is.
- If upgrading Node.js 10, the main PR should target `6.8` only.
- If upgrading Node.js 16, and the current release is 8.1.x, the main PR should target `main` and be backported to `7.17`, while leaving the `8.1` branch as-is.

=== Upgrading installed Node.js version

Expand All @@ -56,11 +49,11 @@ Run the following to install the new Node.js version. Replace `<version>` with t
nvm install <version>
----

To get the same global npm modules installed with the new version of Node.js as is currently installed, use the `--reinstall-packages-from` command-line argument (optionally replace `14` with the desired source version):
To get the same global npm modules installed with the new version of Node.js as is currently installed, use the `--reinstall-packages-from` command-line argument (optionally replace `16` with the desired source version):

[source,bash]
----
nvm install <version> --reinstall-packages-from=14
nvm install <version> --reinstall-packages-from=16
----

If needed, uninstall the old version of Node.js by running the following. Replace `<old-version>` with the full version number of the version that should be uninstalled:
Expand All @@ -70,11 +63,11 @@ If needed, uninstall the old version of Node.js by running the following. Replac
nvm uninstall <old-version>
----

Optionally, tell nvm to always use the "highest" installed Node.js 14 version. Replace `14` if a different major version is desired:
Optionally, tell nvm to always use the "highest" installed Node.js 16 version. Replace `16` if a different major version is desired:

[source,bash]
----
nvm alias default 14
nvm alias default 16
----

Alternatively, include the full version number at the end to specify a specific default version.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dashboarding"
],
"private": true,
"version": "8.1.1",
"version": "8.1.2",
"branch": "8.1",
"types": "./kibana.d.ts",
"tsdocMetadata": "./build/tsdoc-metadata.json",
Expand Down Expand Up @@ -69,13 +69,13 @@
"url": "https://github.com/elastic/kibana.git"
},
"engines": {
"node": "16.13.2",
"node": "16.14.2",
"yarn": "^1.21.1"
},
"resolutions": {
"**/@babel/runtime": "^7.17.2",
"**/@elastic/transport": "^8.0.2",
"**/@types/node": "16.10.2",
"**/@types/node": "16.11.7",
"**/chokidar": "^3.4.3",
"**/deepmerge": "^4.2.2",
"**/fast-deep-equal": "^3.1.1",
Expand Down Expand Up @@ -640,7 +640,7 @@
"@types/mustache": "^0.8.31",
"@types/ncp": "^2.0.1",
"@types/nock": "^10.0.3",
"@types/node": "16.10.2",
"@types/node": "16.11.7",
"@types/node-fetch": "^2.6.0",
"@types/node-forge": "^1.0.0",
"@types/nodemailer": "^6.4.0",
Expand Down
8 changes: 0 additions & 8 deletions packages/kbn-apm-config-loader/src/config.test.mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ export const packageMock = {
};
jest.doMock(join(mockedRootDir, 'package.json'), () => packageMock.raw, { virtual: true });

export const devConfigMock = {
raw: {} as any,
};
jest.doMock(join(mockedRootDir, 'config', 'apm.dev.js'), () => devConfigMock.raw, {
virtual: true,
});

export const gitRevExecMock = jest.fn();
jest.doMock('child_process', () => ({
...childProcessModule,
Expand All @@ -48,7 +41,6 @@ jest.doMock('fs', () => ({

export const resetAllMocks = () => {
packageMock.raw = {};
devConfigMock.raw = {};
gitRevExecMock.mockReset();
readUuidFileMock.mockReset();
jest.resetModules();
Expand Down
Loading

0 comments on commit 556b597

Please sign in to comment.