Skip to content

Commit 38b30d4

Browse files
authored
Merge branch 'main' into migrate-toolbar-button
2 parents eabf375 + 1486741 commit 38b30d4

File tree

671 files changed

+20923
-5215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

671 files changed

+20923
-5215
lines changed
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
steps:
2+
- command: .buildkite/scripts/steps/docker_context/build.sh
3+
label: 'Docker Build Context'
4+
agents:
5+
queue: n2-4
6+
timeout_in_minutes: 30
7+
key: build-docker-context
8+
retry:
9+
automatic:
10+
- exit_status: '*'
11+
limit: 1

.buildkite/pipelines/es_snapshots/verify.yml

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ steps:
6565

6666
- command: .buildkite/scripts/steps/test/jest_integration.sh
6767
label: 'Jest Integration Tests'
68+
parallelism: 2
6869
agents:
6970
queue: n2-4
7071
timeout_in_minutes: 120

.buildkite/scripts/steps/cloud/build_and_deploy.sh

+12-7
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ node scripts/build \
3535
CLOUD_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" docker.elastic.co/kibana-ci/kibana-cloud)
3636
CLOUD_DEPLOYMENT_NAME="kibana-pr-$BUILDKITE_PULL_REQUEST"
3737

38-
jq '
39-
.resources.kibana[0].plan.kibana.docker_image = "'$CLOUD_IMAGE'" |
40-
.name = "'$CLOUD_DEPLOYMENT_NAME'" |
41-
.resources.kibana[0].plan.kibana.version = "'$VERSION'" |
42-
.resources.elasticsearch[0].plan.elasticsearch.version = "'$VERSION'"
43-
' .buildkite/scripts/steps/cloud/deploy.json > /tmp/deploy.json
44-
4538
CLOUD_DEPLOYMENT_ID=$(ecctl deployment list --output json | jq -r '.deployments[] | select(.name == "'$CLOUD_DEPLOYMENT_NAME'") | .id')
4639
JSON_FILE=$(mktemp --suffix ".json")
4740
if [ -z "${CLOUD_DEPLOYMENT_ID}" ]; then
41+
jq '
42+
.resources.kibana[0].plan.kibana.docker_image = "'$CLOUD_IMAGE'" |
43+
.name = "'$CLOUD_DEPLOYMENT_NAME'" |
44+
.resources.kibana[0].plan.kibana.version = "'$VERSION'" |
45+
.resources.elasticsearch[0].plan.elasticsearch.version = "'$VERSION'"
46+
' .buildkite/scripts/steps/cloud/deploy.json > /tmp/deploy.json
47+
4848
ecctl deployment create --track --output json --file /tmp/deploy.json &> "$JSON_FILE"
4949
CLOUD_DEPLOYMENT_USERNAME=$(jq --slurp '.[]|select(.resources).resources[] | select(.credentials).credentials.username' "$JSON_FILE")
5050
CLOUD_DEPLOYMENT_PASSWORD=$(jq --slurp '.[]|select(.resources).resources[] | select(.credentials).credentials.password' "$JSON_FILE")
@@ -59,6 +59,11 @@ if [ -z "${CLOUD_DEPLOYMENT_ID}" ]; then
5959

6060
retry 5 5 vault write "secret/kibana-issues/dev/cloud-deploy/$CLOUD_DEPLOYMENT_NAME" username="$CLOUD_DEPLOYMENT_USERNAME" password="$CLOUD_DEPLOYMENT_PASSWORD"
6161
else
62+
ecctl deployment show "$CLOUD_DEPLOYMENT_ID" --generate-update-payload | jq '
63+
.resources.kibana[0].plan.kibana.docker_image = "'$CLOUD_IMAGE'" |
64+
.resources.kibana[0].plan.kibana.version = "'$VERSION'" |
65+
.resources.elasticsearch[0].plan.elasticsearch.version = "'$VERSION'"
66+
' > /tmp/deploy.json
6267
ecctl deployment update "$CLOUD_DEPLOYMENT_ID" --track --output json --file /tmp/deploy.json &> "$JSON_FILE"
6368
fi
6469

.buildkite/scripts/steps/code_coverage/jest.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ is_test_execution_step
1010

1111
echo '--- Jest code coverage'
1212

13-
.buildkite/scripts/steps/code_coverage/jest_parallel.sh
13+
.buildkite/scripts/steps/code_coverage/jest_parallel.sh jest.config.js
1414

1515
tar -czf kibana-jest-thread-coverage.tar.gz target/kibana-coverage/jest
1616

1717
echo "--- Merging code coverage for a thread"
1818
yarn nyc report --nycrc-path src/dev/code_coverage/nyc_config/nyc.jest.config.js --reporter json
1919
rm -rf target/kibana-coverage/jest/*
20-
mv target/kibana-coverage/jest-combined/coverage-final.json "target/kibana-coverage/jest/jest-merged-coverage-$(date +%s%3N).json"
20+
mv target/kibana-coverage/jest-combined/coverage-final.json "target/kibana-coverage/jest/jest-merged-coverage-$(date +%s%3N).json"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
.buildkite/scripts/bootstrap.sh
6+
7+
echo "--- Create Kibana Docker contexts"
8+
mkdir -p target
9+
node scripts/build --skip-initialize --skip-generic-folders --skip-platform-folders --skip-archives
10+
11+
echo "--- Build default context"
12+
DOCKER_BUILD_FOLDER=$(mktemp -d)
13+
14+
tar -xf target/kibana-[0-9]*-docker-build-context.tar.gz -C "$DOCKER_BUILD_FOLDER"
15+
cd $DOCKER_BUILD_FOLDER
16+
docker build .

.buildkite/scripts/steps/storybooks/build_and_upload.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const STORYBOOKS = [
1616
'canvas',
1717
'ci_composite',
1818
'cloud',
19-
'codeeditor',
2019
'custom_integrations',
2120
'dashboard_enhanced',
2221
'dashboard',
@@ -31,13 +30,13 @@ const STORYBOOKS = [
3130
'expression_tagcloud',
3231
'fleet',
3332
'infra',
33+
'kibana_react',
3434
'lists',
3535
'observability',
3636
'presentation',
3737
'security_solution',
3838
'shared_ux',
3939
'ui_actions_enhanced',
40-
'url_template_editor',
4140
];
4241

4342
const GITHUB_CONTEXT = 'Build and Publish Storybooks';

.buildkite/scripts/steps/test/jest.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ is_test_execution_step
1010

1111
echo '--- Jest'
1212
checks-reporter-with-killswitch "Jest Unit Tests $((BUILDKITE_PARALLEL_JOB+1))" \
13-
.buildkite/scripts/steps/test/jest_parallel.sh
13+
.buildkite/scripts/steps/test/jest_parallel.sh jest.config.js

.buildkite/scripts/steps/test/jest_parallel.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ while read -r config; do
2525

2626
((i=i+1))
2727
# uses heredoc to avoid the while loop being in a sub-shell thus unable to overwrite exitCode
28-
done <<< "$(find src x-pack packages -name ${1:-jest.config.js} -not -path "*/__fixtures__/*" | sort)"
28+
done <<< "$(find src x-pack packages -name "$1" -not -path "*/__fixtures__/*" | sort)"
2929

3030
exit $exitCode

.github/workflows/label-qa-fixed-in.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
}
3838
}
3939
prnumber: ${{ github.event.number }}
40-
token: ${{ secrets.GITHUB_TOKEN }}
40+
token: ${{ secrets.FLEET_TECH_KIBANA_USER_TOKEN }}
4141
- uses: sergeysova/jq-action@v2
4242
id: issues_to_label
4343
with:
@@ -75,4 +75,4 @@ jobs:
7575
}
7676
issueid: ${{ matrix.issueNodeId }}
7777
labelids: ${{ needs.fetch_issues_to_label.outputs.label_ids }}
78-
token: ${{ secrets.GITHUB_TOKEN }}
78+
token: ${{ secrets.FLEET_TECH_KIBANA_USER_TOKEN }}

docs/apm/transactions.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Learn more about a trace sample in the *Metadata* tab:
151151
* User - Requires additional configuration, but allows you to see which user experienced the current transaction.
152152

153153
TIP: All of this data is stored in documents in Elasticsearch.
154-
This means you can select "Actions - View sample document" to see the actual Elasticsearch document under the discover tab.
154+
This means you can select "Actions - View transaction in Discover" to see the actual Elasticsearch document under the discover tab.
155155

156156
*Trace sample logs*
157157

docs/development/core/public/kibana-plugin-core-public.kibanaexecutioncontext.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export declare type KibanaExecutionContext = {
1313
readonly type: string;
1414
readonly name: string;
1515
readonly id: string;
16-
readonly description: string;
16+
readonly description?: string;
1717
readonly url?: string;
18-
parent?: KibanaExecutionContext;
18+
child?: KibanaExecutionContext;
1919
};
2020
```

docs/development/core/server/kibana-plugin-core-server.kibanaexecutioncontext.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export declare type KibanaExecutionContext = {
1313
readonly type: string;
1414
readonly name: string;
1515
readonly id: string;
16-
readonly description: string;
16+
readonly description?: string;
1717
readonly url?: string;
18-
parent?: KibanaExecutionContext;
18+
child?: KibanaExecutionContext;
1919
};
2020
```

docs/user/ml/index.asciidoc

+2-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ If {stack-security-features} are enabled, users must have the necessary
2626
privileges to use {ml-features}. Refer to
2727
{ml-docs}/setup.html#setup-privileges[Set up {ml-features}].
2828

29-
NOTE: There are limitations in {ml-features} that affect {kib}. For more information, refer to {ml-docs}/ml-limitations.html[Machine learning].
29+
NOTE: There are limitations in {ml-features} that affect {kib}. For more
30+
information, refer to {ml-docs}/ml-limitations.html[{ml-cap}].
3031

3132
--
3233

@@ -84,8 +85,6 @@ and {ml-docs}/ml-ad-overview.html[{ml-cap} {anomaly-detect}].
8485
[[xpack-ml-dfanalytics]]
8586
== {dfanalytics-cap}
8687

87-
experimental[]
88-
8988
The Elastic {ml} {dfanalytics} feature enables you to analyze your data using
9089
{classification}, {oldetection}, and {regression} algorithms and generate new
9190
indices that contain the results alongside your source data.

docs/user/troubleshooting/trace-query.asciidoc

+10-10
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ Now, you can see the request to {es} has been initiated by the `[Logs] Unique Vi
2929
[source,text]
3030
----
3131
[DEBUG][execution_context] stored the execution context: {
32-
"parent": {
33-
"type": "application",
34-
"name": "dashboard",
35-
"id": "edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b",
36-
"description": "[Logs] Web Traffic","url":"/view/edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b"
32+
"type": "application",
33+
"name": "dashboard",
34+
"id": "edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b",
35+
"description": "[Logs] Web Traffic","url":"/view/edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b"
36+
"child": {
37+
"type": "visualization",
38+
"name": "Vega",
39+
"id": "cb099a20-ea66-11eb-9425-113343a037e3",
40+
"description": "[Logs] Unique Visitor Heatmap",
41+
"url": "/app/visualize#/edit/cb099a20-ea66-11eb-9425-113343a037e3"
3742
},
38-
"type": "visualization",
39-
"name": "Vega",
40-
"id": "cb099a20-ea66-11eb-9425-113343a037e3",
41-
"description": "[Logs] Unique Visitor Heatmap",
42-
"url": "/app/visualize#/edit/cb099a20-ea66-11eb-9425-113343a037e3"
4343
}
4444
----

jest.config.integration.js

-27
This file was deleted.

jest.config.js

-24
This file was deleted.

nav-kibana-dev.docnav.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"id": "kibDevTutorialBuildingDistributable",
4747
"label": "Building a Kibana distributable"
4848
},
49-
{ "id": "kibDevTutorialServerEndpoint" }
49+
{ "id": "kibDevTutorialServerEndpoint" },
50+
{ "id": "kibDevTutorialAdvancedSettings"}
5051
]
5152
},
5253
{

packages/kbn-analytics/src/metrics/ui_counter.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@
88

99
import { METRIC_TYPE } from './';
1010

11-
export type UiCounterMetricType = METRIC_TYPE.CLICK | METRIC_TYPE.LOADED | METRIC_TYPE.COUNT;
11+
export type UiCounterMetricType =
12+
| METRIC_TYPE.CLICK
13+
| METRIC_TYPE.LOADED
14+
| METRIC_TYPE.COUNT
15+
| string;
1216
export interface UiCounterMetricConfig {
13-
type: UiCounterMetricType;
17+
type: string;
1418
appName: string;
1519
eventName: string;
1620
count?: number;
1721
}
1822

1923
export interface UiCounterMetric {
20-
type: UiCounterMetricType;
24+
type: string;
2125
appName: string;
2226
eventName: string;
2327
count: number;

0 commit comments

Comments
 (0)