Skip to content

Commit 2eceabd

Browse files
Merge branch 'main' into eui/55.1.3
2 parents cad8482 + 11bff75 commit 2eceabd

File tree

94 files changed

+1670
-388
lines changed

Some content is hidden

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

94 files changed

+1670
-388
lines changed

.buildkite/pull_requests.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,25 @@
1616
"trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))",
1717
"always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))",
1818
"skip_ci_labels": ["skip-ci", "jenkins-ci"],
19-
"skip_target_branches": ["6.8", "7.11", "7.12"]
19+
"skip_target_branches": ["6.8", "7.11", "7.12"],
20+
"skip_ci_on_only_changed": [
21+
"^docs/",
22+
"^rfcs/",
23+
"^.ci/.+\\.yml$",
24+
"^.ci/es-snapshots/",
25+
"^.ci/pipeline-library/",
26+
"^.ci/Jenkinsfile_[^/]+$",
27+
"^\\.github/",
28+
"\\.md$",
29+
"^\\.backportrc\\.json$",
30+
"^nav-kibana-dev\\.docnav\\.json$",
31+
"^src/dev/prs/kibana_qa_pr_list\\.json$",
32+
"^\\.buildkite/pull_requests\\.json$"
33+
],
34+
"always_require_ci_on_changed": [
35+
"^docs/developer/plugin-list.asciidoc$",
36+
"/plugins/[^/]+/readme\\.(md|asciidoc)$"
37+
]
2038
}
2139
]
2240
}

.buildkite/scripts/pipelines/pull_request/pipeline.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,11 @@
99
const execSync = require('child_process').execSync;
1010
const fs = require('fs');
1111
const { areChangesSkippable, doAnyChangesMatch } = require('kibana-buildkite-library');
12-
const { SKIPPABLE_PR_MATCHERS } = require('./skippable_pr_matchers');
13-
14-
const REQUIRED_PATHS = [
15-
// this file is auto-generated and changes to it need to be validated with CI
16-
/^docs\/developer\/plugin-list.asciidoc$/,
17-
// don't skip CI on prs with changes to plugin readme files /i is for case-insensitive matching
18-
/\/plugins\/[^\/]+\/readme\.(md|asciidoc)$/i,
19-
];
12+
const prConfigs = require('../../../pull_requests.json');
13+
const prConfig = prConfigs.jobs.find((job) => job.pipelineSlug === 'kibana-pull-request');
14+
15+
const REQUIRED_PATHS = prConfig.always_require_ci_on_changed.map((r) => new RegExp(r, 'i'));
16+
const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed.map((r) => new RegExp(r, 'i'));
2017

2118
const getPipeline = (filename, removeSteps = true) => {
2219
const str = fs.readFileSync(filename).toString();

.buildkite/scripts/pipelines/pull_request/skippable_pr_matchers.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

.buildkite/scripts/steps/es_snapshots/build.sh

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ echo "--- Build Elasticsearch"
6969
:distribution:archives:darwin-aarch64-tar:assemble \
7070
:distribution:archives:darwin-tar:assemble \
7171
:distribution:docker:docker-export:assemble \
72-
:distribution:docker:cloud-docker-export:assemble \
7372
:distribution:archives:linux-aarch64-tar:assemble \
7473
:distribution:archives:linux-tar:assemble \
7574
:distribution:archives:windows-zip:assemble \
@@ -86,19 +85,26 @@ docker images "docker.elastic.co/elasticsearch/elasticsearch" --format "{{.Tag}}
8685
docker images "docker.elastic.co/elasticsearch/elasticsearch" --format "{{.Tag}}" | xargs -n1 bash -c 'docker save docker.elastic.co/elasticsearch/elasticsearch:${0} | gzip > ../es-build/elasticsearch-${0}-docker-image.tar.gz'
8786

8887
echo "--- Create kibana-ci docker cloud image archives"
89-
ES_CLOUD_ID=$(docker images "docker.elastic.co/elasticsearch-ci/elasticsearch-cloud" --format "{{.ID}}")
90-
ES_CLOUD_VERSION=$(docker images "docker.elastic.co/elasticsearch-ci/elasticsearch-cloud" --format "{{.Tag}}")
91-
KIBANA_ES_CLOUD_VERSION="$ES_CLOUD_VERSION-$ELASTICSEARCH_GIT_COMMIT"
92-
KIBANA_ES_CLOUD_IMAGE="docker.elastic.co/kibana-ci/elasticsearch-cloud:$KIBANA_ES_CLOUD_VERSION"
93-
94-
docker tag "$ES_CLOUD_ID" "$KIBANA_ES_CLOUD_IMAGE"
95-
96-
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
97-
trap 'docker logout docker.elastic.co' EXIT
98-
docker image push "$KIBANA_ES_CLOUD_IMAGE"
99-
100-
export ELASTICSEARCH_CLOUD_IMAGE="$KIBANA_ES_CLOUD_IMAGE"
101-
export ELASTICSEARCH_CLOUD_IMAGE_CHECKSUM="$(docker images "$KIBANA_ES_CLOUD_IMAGE" --format "{{.Digest}}")"
88+
# Ignore build failures. This docker image downloads metricbeat and filebeat.
89+
# When we bump versions, these dependencies may not exist yet, but we don't want to
90+
# block the rest of the snapshot promotion process
91+
set +e
92+
./gradlew :distribution:docker:cloud-docker-export:assemble && {
93+
ES_CLOUD_ID=$(docker images "docker.elastic.co/elasticsearch-ci/elasticsearch-cloud" --format "{{.ID}}")
94+
ES_CLOUD_VERSION=$(docker images "docker.elastic.co/elasticsearch-ci/elasticsearch-cloud" --format "{{.Tag}}")
95+
KIBANA_ES_CLOUD_VERSION="$ES_CLOUD_VERSION-$ELASTICSEARCH_GIT_COMMIT"
96+
KIBANA_ES_CLOUD_IMAGE="docker.elastic.co/kibana-ci/elasticsearch-cloud:$KIBANA_ES_CLOUD_VERSION"
97+
echo $ES_CLOUD_ID $ES_CLOUD_VERSION $KIBANA_ES_CLOUD_VERSION $KIBANA_ES_CLOUD_IMAGE
98+
docker tag "$ES_CLOUD_ID" "$KIBANA_ES_CLOUD_IMAGE"
99+
100+
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
101+
trap 'docker logout docker.elastic.co' EXIT
102+
docker image push "$KIBANA_ES_CLOUD_IMAGE"
103+
104+
export ELASTICSEARCH_CLOUD_IMAGE="$KIBANA_ES_CLOUD_IMAGE"
105+
export ELASTICSEARCH_CLOUD_IMAGE_CHECKSUM="$(docker images "$KIBANA_ES_CLOUD_IMAGE" --format "{{.Digest}}")"
106+
}
107+
set -e
102108

103109
echo "--- Create checksums for snapshot files"
104110
cd "$destination"

dev_docs/getting_started/troubleshooting.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,17 @@ git clean -fdxn -e /config -e /.vscode
2626
# review the files which will be deleted, consider adding some more excludes (-e)
2727
# re-run without the dry-run (-n) flag to actually delete the files
2828
```
29+
30+
### search.check_ccs_compatibility error
31+
32+
If you run into an error that says something like:
33+
34+
```
35+
[class org.elasticsearch.action.search.SearchRequest] is not compatible version 8.1.0 and the 'search.check_ccs_compatibility' setting is enabled.
36+
```
37+
38+
it means you are using a new Elasticsearch feature that will not work in a CCS environment because the feature does not exist in older versions. If you are working on an experimental feature and are okay with this limitation, you will have to move the failing test into a special test suite that does not use this setting to get ci to pass. Take this path cautiously. If you do not remember to move the test back into the default test suite when the feature is GA'ed, it will not have proper CCS test coverage.
39+
40+
We added this test coverage in version `8.1` because we accidentally broke core Kibana features (for example, when Discover started using the new fields parameter) for our CCS users. CCS is not a corner case and (excluding certain experimental features) Kibana should always work for our CCS users. This setting is our way of ensuring test coverage.
41+
42+
Please reach out to the [Kibana Operations team](https://github.com/orgs/elastic/teams/kibana-operations) if you have further questions.

docs/settings/security-settings.asciidoc

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -112,34 +112,20 @@ In addition to <<authentication-provider-settings,the settings that are valid fo
112112
NOTE: You can configure only one anonymous provider per {kib} instance.
113113

114114
xpack.security.authc.providers.anonymous.<provider-name>.credentials {ess-icon}::
115-
Credentials that {kib} should use internally to authenticate anonymous requests to {es}. Possible values are: username and password, API key, or the constant `elasticsearch_anonymous_user` if you want to leverage {ref}/anonymous-access.html[{es} anonymous access].
115+
Credentials that {kib} should use internally to authenticate anonymous requests to {es}.
116116
+
117117
For example:
118118
+
119119
[source,yaml]
120120
----------------------------------------
121-
# Username and password credentials
122121
xpack.security.authc.providers.anonymous.anonymous1:
123122
credentials:
124123
username: "anonymous_service_account"
125124
password: "anonymous_service_account_password"
126-
127-
# API key (concatenated and base64-encoded)
128-
xpack.security.authc.providers.anonymous.anonymous1:
129-
credentials:
130-
apiKey: "VnVhQ2ZHY0JDZGJrUW0tZTVhT3g6dWkybHAyYXhUTm1zeWFrdzl0dk5udw=="
131-
132-
# API key (as returned from Elasticsearch API)
133-
xpack.security.authc.providers.anonymous.anonymous1:
134-
credentials:
135-
apiKey.id: "VuaCfGcBCdbkQm-e5aOx"
136-
apiKey.key: "ui2lp2axTNmsyakw9tvNnw"
137-
138-
# Elasticsearch anonymous access
139-
xpack.security.authc.providers.anonymous.anonymous1:
140-
credentials: "elasticsearch_anonymous_user"
141125
----------------------------------------
142126

127+
For more information, refer to <<anonymous-authentication>>.
128+
143129
[float]
144130
[[http-authentication-settings]]
145131
==== HTTP authentication settings

docs/user/security/authentication/index.asciidoc

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,11 @@ Anyone with access to the network {kib} is exposed to will be able to access {ki
332332

333333
Anonymous authentication gives users access to {kib} without requiring them to provide credentials. This can be useful if you want your users to skip the login step when you embed dashboards in another application or set up a demo {kib} instance in your internal network, while still keeping other security features intact.
334334

335-
To enable anonymous authentication in {kib}, you must decide what credentials the anonymous service account {kib} should use internally to authenticate anonymous requests.
335+
To enable anonymous authentication in {kib}, you must specify the credentials the anonymous service account {kib} should use internally to authenticate anonymous requests.
336336

337337
NOTE: You can configure only one anonymous authentication provider per {kib} instance.
338338

339-
There are three ways to specify these credentials:
340-
341-
If you have a user who can authenticate to {es} using username and password, for instance from the Native or LDAP security realms, you can also use these credentials to impersonate the anonymous users. Here is how your `kibana.yml` might look if you use username and password credentials:
339+
You must have a user account that can authenticate to {es} using a username and password, for instance from the Native or LDAP security realms, so that you can use these credentials to impersonate the anonymous users. Here is how your `kibana.yml` might look:
342340

343341
[source,yaml]
344342
-----------------------------------------------
@@ -350,45 +348,6 @@ xpack.security.authc.providers:
350348
password: "anonymous_service_account_password"
351349
-----------------------------------------------
352350

353-
If using username and password credentials isn't desired or feasible, then you can create a dedicated <<api-keys, API key>> for the anonymous service account. In this case, your `kibana.yml` might look like this:
354-
355-
[source,yaml]
356-
-----------------------------------------------
357-
xpack.security.authc.providers:
358-
anonymous.anonymous1:
359-
order: 0
360-
credentials:
361-
apiKey: "VnVhQ2ZHY0JDZGJrUW0tZTVhT3g6dWkybHAyYXhUTm1zeWFrdzl0dk5udw=="
362-
-----------------------------------------------
363-
364-
The previous configuration snippet uses an API key string that is the result of base64-encoding of the `id` and `api_key` fields returned from the {es} API, joined by a colon. You can also specify these fields separately, and {kib} will do the concatenation and base64-encoding for you:
365-
366-
[source,yaml]
367-
-----------------------------------------------
368-
xpack.security.authc.providers:
369-
anonymous.anonymous1:
370-
order: 0
371-
credentials:
372-
apiKey.id: "VuaCfGcBCdbkQm-e5aOx"
373-
apiKey.key: "ui2lp2axTNmsyakw9tvNnw"
374-
-----------------------------------------------
375-
376-
It's also possible to use {kib} anonymous access in conjunction with the {es} anonymous access.
377-
378-
Prior to configuring {kib}, ensure that anonymous access is enabled and properly configured in {es}. See {ref}/anonymous-access.html[Enabling anonymous access] for more information.
379-
380-
Here is how your `kibana.yml` might look like if you want to use {es} anonymous access to impersonate anonymous users in {kib}:
381-
382-
[source,yaml]
383-
-----------------------------------------------
384-
xpack.security.authc.providers:
385-
anonymous.anonymous1:
386-
order: 0
387-
credentials: "elasticsearch_anonymous_user" <1>
388-
-----------------------------------------------
389-
390-
<1> The `elasticsearch_anonymous_user` is a special constant that indicates you want to use the {es} anonymous user.
391-
392351
[float]
393352
===== Anonymous access and other types of authentication
394353

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@
220220
"@types/mapbox__vector-tile": "1.3.0",
221221
"@types/moment-duration-format": "^2.2.3",
222222
"@types/react-is": "^16.7.1",
223+
"@types/rrule": "^2.2.9",
223224
"JSONStream": "1.3.5",
224225
"abort-controller": "^3.0.0",
225226
"antlr4ts": "^0.5.0-alpha.3",
@@ -309,6 +310,7 @@
309310
"loader-utils": "^1.2.3",
310311
"lodash": "^4.17.21",
311312
"lru-cache": "^4.1.5",
313+
"luxon": "^2.3.2",
312314
"lz-string": "^1.4.4",
313315
"mapbox-gl-draw-rectangle-mode": "1.0.4",
314316
"maplibre-gl": "2.1.9",
@@ -405,6 +407,7 @@
405407
"reselect": "^4.0.0",
406408
"resize-observer-polyfill": "^1.5.1",
407409
"rison-node": "1.0.2",
410+
"rrule": "2.6.4",
408411
"rxjs": "^7.5.5",
409412
"safe-squel": "^5.12.5",
410413
"seedrandom": "^3.0.5",

packages/kbn-shared-ux-components/src/empty_state/kibana_no_data_page.stories.tsx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ type Params = Pick<NoDataPageProps, 'solution' | 'logo'> & DataServiceFactoryCon
3939

4040
export const PureComponent = (params: Params) => {
4141
const { solution, logo, hasESData, hasUserDataView } = params;
42+
4243
const serviceParams = { hasESData, hasUserDataView, hasDataViews: false };
43-
const services = servicesFactory(serviceParams);
44+
const services = servicesFactory({ ...serviceParams, hasESData, hasUserDataView });
4445
return (
4546
<SharedUxServicesProvider {...services}>
4647
<KibanaNoDataPage
@@ -51,6 +52,26 @@ export const PureComponent = (params: Params) => {
5152
);
5253
};
5354

55+
export const PureComponentLoadingState = () => {
56+
const dataCheck = () => new Promise<boolean>((resolve, reject) => {});
57+
const services = {
58+
...servicesFactory({ hasESData: false, hasUserDataView: false, hasDataViews: false }),
59+
data: {
60+
hasESData: dataCheck,
61+
hasUserDataView: dataCheck,
62+
hasDataView: dataCheck,
63+
},
64+
};
65+
return (
66+
<SharedUxServicesProvider {...services}>
67+
<KibanaNoDataPage
68+
onDataViewCreated={action('onDataViewCreated')}
69+
noDataConfig={noDataConfig}
70+
/>
71+
</SharedUxServicesProvider>
72+
);
73+
};
74+
5475
PureComponent.argTypes = {
5576
solution: {
5677
control: 'text',

packages/kbn-shared-ux-components/src/empty_state/kibana_no_data_page.test.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import React from 'react';
1010
import { act } from 'react-dom/test-utils';
1111

12+
import { EuiLoadingElastic } from '@elastic/eui';
1213
import { mountWithIntl } from '@kbn/test-jest-helpers';
1314
import { SharedUxServicesProvider, mockServicesFactory } from '@kbn/shared-ux-services';
1415

@@ -68,4 +69,28 @@ describe('Kibana No Data Page', () => {
6869
expect(component.find(NoDataViews).length).toBe(1);
6970
expect(component.find(NoDataConfigPage).length).toBe(0);
7071
});
72+
73+
test('renders loading indicator', async () => {
74+
const dataCheck = () => new Promise<boolean>((resolve, reject) => {});
75+
const services = {
76+
...mockServicesFactory(),
77+
data: {
78+
hasESData: dataCheck,
79+
hasUserDataView: dataCheck,
80+
hasDataView: dataCheck,
81+
},
82+
};
83+
const component = mountWithIntl(
84+
<SharedUxServicesProvider {...services}>
85+
<KibanaNoDataPage noDataConfig={noDataConfig} onDataViewCreated={onDataViewCreated} />
86+
</SharedUxServicesProvider>
87+
);
88+
89+
await act(() => new Promise(setImmediate));
90+
component.update();
91+
92+
expect(component.find(EuiLoadingElastic).length).toBe(1);
93+
expect(component.find(NoDataViews).length).toBe(0);
94+
expect(component.find(NoDataConfigPage).length).toBe(0);
95+
});
7196
});

0 commit comments

Comments
 (0)