Skip to content

Commit 6c63416

Browse files
authored
Merge branch 'main' into lhirlimann-patch-3
2 parents 169f999 + 16fb8b8 commit 6c63416

File tree

46 files changed

+1295
-99
lines changed

Some content is hidden

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

46 files changed

+1295
-99
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
steps:
2-
- label: $FWC_VERSION / fwc
3-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v$FWC_VERSION#fwcTest -Dtests.bwc.snapshot=false
2+
- label: "{{matrix.FWC_VERSION}}" / fwc
3+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v$$FWC_VERSION#fwcTest -Dtests.bwc.snapshot=false
44
timeout_in_minutes: 300
55
agents:
66
provider: gcp
@@ -11,4 +11,4 @@ steps:
1111
setup:
1212
FWC_VERSION: $FWC_LIST
1313
env:
14-
FWC_VERSION: $FWC_VERSION
14+
FWC_VERSION: "{{matrix.FWC_VERSION}}"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is auto-generated. See .buildkite/pipelines/periodic-fwc.template.yml
22
steps:
3-
- label: $FWC_VERSION / fwc
4-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v$FWC_VERSION#fwcTest -Dtests.bwc.snapshot=false
3+
- label: "{{matrix.FWC_VERSION}}" / fwc
4+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v$$FWC_VERSION#fwcTest -Dtests.bwc.snapshot=false
55
timeout_in_minutes: 300
66
agents:
77
provider: gcp
@@ -12,4 +12,4 @@ steps:
1212
setup:
1313
FWC_VERSION: []
1414
env:
15-
FWC_VERSION: $FWC_VERSION
15+
FWC_VERSION: "{{matrix.FWC_VERSION}}"

.buildkite/scripts/fwc-branches.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
# Configure FwC test branches
4+
# We do not want 7.x branch and only to run for branches that:
5+
# - have released at least one minor version (not main)
6+
# - have previous minor unreleased (not the oldest development branch)
7+
FWC_BRANCHES=()
8+
for branch in "${BRANCHES[@]}"; do
9+
if [[ ! "$branch" =~ ^7\..* ]]; then
10+
FWC_BRANCHES+=("$branch")
11+
fi
12+
done
13+
# Remove first and last element
14+
FWC_BRANCHES=("${FWC_BRANCHES[@]:1:${#FWC_BRANCHES[@]}-2}")
15+
16+
shouldRunFwcFor() {
17+
local branch=$1
18+
for fwc_branch in "${FWC_BRANCHES[@]}"; do
19+
if [[ "$fwc_branch" == "$branch" ]]; then
20+
return 0
21+
fi
22+
done
23+
return 1
24+
}

.buildkite/scripts/generate-pr-performance-benchmark.sh

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,69 @@
22

33
set -euo pipefail
44

5+
# uncomment for tests
6+
#function buildkite-agent {
7+
# local command=$1
8+
# echo "$@"
9+
# if [ "$command" == "annotate" ]; then
10+
# while read -r line; do
11+
# echo " read: $line";
12+
# done
13+
# fi
14+
#}
15+
516
env_id_baseline=$(python3 -c 'import uuid; print(uuid.uuid4())')
617
env_id_contender=$(python3 -c 'import uuid; print(uuid.uuid4())')
718
merge_base=$(git merge-base "${GITHUB_PR_TARGET_BRANCH}" HEAD)
819

20+
# PR comment
21+
buildkite-agent meta-data set pr_comment:early_comment_job_id "$BUILDKITE_JOB_ID"
922
buildkite-agent meta-data set pr_comment:custom-body:body \
10-
"This build attempted two ${GITHUB_PR_COMMENT_VAR_BENCHMARK} benchmarks to evaluate performance impact of this PR."
23+
"This build attempts two ${GITHUB_PR_COMMENT_VAR_BENCHMARK} benchmarks to evaluate performance impact of this PR. \
24+
To estimate benchmark completion time inspect previous nightly runs [here](https://buildkite.com/elastic/elasticsearch-performance-esbench-nightly/builds?branch=master)."
1125
buildkite-agent meta-data set pr_comment:custom-baseline:head \
1226
"* Baseline: ${merge_base} (env ID ${env_id_baseline})"
1327
buildkite-agent meta-data set pr_comment:custom-contender:head \
1428
"* Contender: ${GITHUB_PR_TRIGGERED_SHA} (env ID ${env_id_contender})"
1529

16-
cat << _EOF_
30+
# Buildkite annotation
31+
cat << _EOF1_ | buildkite-agent annotate --context "pr-benchmark-notification"
32+
This build attempts two ${GITHUB_PR_COMMENT_VAR_BENCHMARK} benchmarks to evaluate performance impact of PR [${GITHUB_PR_NUMBER}](https://github.com/elastic/elasticsearch/pull/${GITHUB_PR_NUMBER}).
33+
To estimate benchmark completion time inspect previous nightly runs [here](https://buildkite.com/elastic/elasticsearch-performance-esbench-nightly/builds?branch=master).
34+
* Baseline: [${merge_base:0:7}](https://github.com/elastic/elasticsearch/commit/${merge_base}) (env ID ${env_id_baseline})
35+
* Contender: [${GITHUB_PR_TRIGGERED_SHA:0:7}](https://github.com/elastic/elasticsearch/commit/${GITHUB_PR_TRIGGERED_SHA}) (env ID ${env_id_contender})
36+
_EOF1_
37+
38+
cat << _EOF2_
1739
steps:
18-
- label: Trigger baseline benchmark
40+
- label: Trigger baseline benchmark with ${merge_base:0:7}
1941
trigger: elasticsearch-performance-esbench-pr
2042
build:
21-
message: Baseline benchmark for PR${GITHUB_PR_NUMBER}
43+
message: Baseline benchmark for PR ${GITHUB_PR_NUMBER} with ${merge_base:0:7}
2244
branch: master
2345
env:
2446
CONFIGURATION_NAME: ${GITHUB_PR_COMMENT_VAR_BENCHMARK}
2547
ENV_ID: ${env_id_baseline}
2648
REVISION: ${merge_base}
27-
- label: Trigger contender benchmark
49+
- label: Trigger contender benchmark with ${GITHUB_PR_TRIGGERED_SHA:0:7}
2850
trigger: elasticsearch-performance-esbench-pr
2951
build:
30-
message: Contender benchmark for PR${GITHUB_PR_NUMBER}
52+
message: Contender benchmark for PR ${GITHUB_PR_NUMBER} with ${GITHUB_PR_TRIGGERED_SHA:0:7}
3153
branch: master
3254
env:
3355
CONFIGURATION_NAME: ${GITHUB_PR_COMMENT_VAR_BENCHMARK}
3456
ENV_ID: ${env_id_contender}
3557
ES_REPO_URL: https://github.com/${GITHUB_PR_OWNER}/${GITHUB_PR_REPO}.git
3658
REVISION: ${GITHUB_PR_TRIGGERED_SHA}
3759
- wait: ~
38-
- label: Modify PR comment
39-
command: buildkite-agent meta-data set pr_comment:custom-comparison:head "* [Benchmark results](<https://esbench-metrics.kb.us-east-2.aws.elastic-cloud.com:9243/app/dashboards#/view/d9079962-5866-49ef-b9f5-145f2141cd31?_a=(query:(language:kuery,query:'user-tags.env-id:${env_id_baseline} or user-tags.env-id:${env_id_contender}'))>)"
40-
_EOF_
60+
- label: Update PR comment and Buildkite annotation
61+
command: |
62+
buildkite-agent meta-data set pr_comment:custom-body:body "This build ran two ${GITHUB_PR_COMMENT_VAR_BENCHMARK} benchmarks to evaluate performance impact of this PR."
63+
buildkite-agent meta-data set pr_comment:custom-comparison:head "* [Benchmark results](<https://esbench-metrics.kb.us-east-2.aws.elastic-cloud.com:9243/app/dashboards#/view/d9079962-5866-49ef-b9f5-145f2141cd31?_a=(query:(language:kuery,query:'user-tags.env-id:${env_id_baseline} or user-tags.env-id:${env_id_contender}'))>)"
64+
cat << _EOF3_ | buildkite-agent annotate --context "pr-benchmark-notification"
65+
This build ran two ${GITHUB_PR_COMMENT_VAR_BENCHMARK} benchmarks to evaluate performance impact of PR [${GITHUB_PR_NUMBER}](https://github.com/elastic/elasticsearch/pull/${GITHUB_PR_NUMBER}).
66+
* Baseline: [${merge_base:0:7}](https://github.com/elastic/elasticsearch/commit/${merge_base}) (env ID ${env_id_baseline})
67+
* Contender: [${GITHUB_PR_TRIGGERED_SHA:0:7}](https://github.com/elastic/elasticsearch/commit/${GITHUB_PR_TRIGGERED_SHA}) (env ID ${env_id_contender})
68+
* [Benchmark results](<https://esbench-metrics.kb.us-east-2.aws.elastic-cloud.com:9243/app/dashboards#/view/d9079962-5866-49ef-b9f5-145f2141cd31?_a=(query:(language:kuery,query:'user-tags.env-id:${env_id_baseline} or user-tags.env-id:${env_id_contender}'))>)
69+
_EOF3_
70+
_EOF2_

.buildkite/scripts/periodic.trigger.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -euo pipefail
55
echo "steps:"
66

77
source .buildkite/scripts/branches.sh
8+
source .buildkite/scripts/fwc-branches.sh
89

910
IS_FIRST=true
1011
SKIP_DELAY="${SKIP_DELAY:-false}"
@@ -46,8 +47,7 @@ EOF
4647
branch: "$BRANCH"
4748
commit: "$LAST_GOOD_COMMIT"
4849
EOF
49-
# Include forward compatibility tests only for the bugfix branch
50-
if [[ "${BRANCH}" == "${BRANCHES[2]}" ]]; then
50+
if shouldRunFwcFor "$BRANCH"; then
5151
cat <<EOF
5252
- trigger: elasticsearch-periodic-fwc
5353
label: Trigger periodic-fwc pipeline for $BRANCH

build-tools-internal/src/main/groovy/elasticsearch.fwc-test.gradle

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,23 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import org.elasticsearch.gradle.VersionProperties
10+
import org.elasticsearch.gradle.Version
1111
import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask
1212

13-
def fwcVersions = buildParams.bwcVersions.released.findAll { it.major == VersionProperties.elasticsearchVersion.major && it.minor == VersionProperties.elasticsearchVersion.minor }
14-
def previousMinorSnapshot = buildParams.bwcVersions.unreleased.find { it.major == VersionProperties.elasticsearchVersion.major && it.minor == VersionProperties.elasticsearchVersion.minor - 1 }
15-
16-
fwcVersions.each { fwcVersion ->
17-
tasks.register("v${fwcVersion}#fwcTest", StandaloneRestIntegTestTask) {
18-
usesBwcDistribution(previousMinorSnapshot)
19-
usesBwcDistribution(fwcVersion)
20-
systemProperty("tests.old_cluster_version", previousMinorSnapshot)
21-
systemProperty("tests.new_cluster_version", fwcVersion)
22-
nonInputProperties.systemProperty 'tests.fwc', 'true'
13+
Version elasticsearchVersion = Version.fromString(versions.get("elasticsearch"))
14+
def fwcVersions = buildParams.bwcVersions.released.findAll { it.major == elasticsearchVersion.major && it.minor == elasticsearchVersion.minor }
15+
def targetMajor = elasticsearchVersion.minor > 0 ? elasticsearchVersion.major : elasticsearchVersion.major - 1
16+
def targetMinor = elasticsearchVersion.minor > 0 ? elasticsearchVersion.minor - 1 : buildParams.bwcVersions.unreleased.findAll { it.major == targetMajor }*.minor.max()
17+
def previousMinorSnapshot = buildParams.bwcVersions.unreleased.find { it.major == targetMajor && it.minor == targetMinor }
18+
if (previousMinorSnapshot != null) {
19+
fwcVersions.each { fwcVersion ->
20+
tasks.register("v${fwcVersion}#fwcTest", StandaloneRestIntegTestTask) {
21+
usesBwcDistribution(previousMinorSnapshot)
22+
usesBwcDistribution(fwcVersion)
23+
systemProperty("tests.old_cluster_version", previousMinorSnapshot)
24+
systemProperty("tests.new_cluster_version", fwcVersion)
25+
nonInputProperties.systemProperty 'tests.fwc', 'true'
26+
}
2327
}
2428
}
2529

docs/changelog/131940.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 131940
2+
summary: Allow remote enrich after LOOKUP JOIN
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/changelog/133616.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 133616
2+
summary: Add mode filter to _resolve/index
3+
area: Indices APIs
4+
type: enhancement
5+
issues: []

docs/changelog/133775.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 133775
2+
summary: Remove Transfer-Encoding from HTTP request with no content
3+
area: Network
4+
type: bug
5+
issues: []

docs/reference/elasticsearch/roles.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
11
---
22
mapped_pages:
33
- https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-roles.html
4+
applies_to:
5+
stack: all
46
---
57

68
# Roles [built-in-roles]
79

8-
:::{note}
9-
This section provides detailed **reference information** for Elasticsearch privileges.
10+
This section provides detailed **reference information** for {{es}} roles.
1011

11-
Refer to [User roles](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/user-roles.md) in the **Deploy and manage** section for overview, getting started and conceptual information.
12+
To learn how to apply roles for {{stack}}, and to learn how role-based access control works, refer to [User roles](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/user-roles.md).
13+
14+
15+
:::{tip}
16+
{{serverless-full}} uses a different set of predefined roles. To learn more about the roles available in {{serverless-short}} projects, refer to [Elastic Cloud Serverless predefined roles](docs-content://deploy-manage/users-roles/cloud-organization/user-roles.md#general-assign-user-roles-table).
1217
:::
1318

1419
The {{stack-security-features}} apply a default role to all users, including [anonymous users](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/anonymous-access.md). The default role enables users to access the authenticate endpoint, change their own passwords, and get information about themselves.
1520

1621
There is also a set of built-in roles you can explicitly assign to users. These roles have a fixed set of privileges and cannot be updated.
1722

23+
When you assign a user multiple roles, the user receives a union of the roles’ privileges.
24+
25+
If the built-in roles do not address your use case, then you can create additional [custom roles](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles.md).
26+
27+
## Available roles [available-roles]
28+
1829
$$$built-in-roles-apm-system$$$ `apm_system`
1930
: Grants access necessary for the APM system user to send system-level data (such as monitoring) to {{es}}.
2031

@@ -59,8 +70,8 @@ $$$built-in-roles-ingest-user$$$ `ingest_admin`
5970
::::
6071

6172

62-
$$$built-in-roles-kibana-dashboard$$$ `kibana_dashboard_only_user`
63-
: (This role is deprecated, please use [{{kib}} feature privileges](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/kibana-privileges.md#kibana-feature-privileges) instead). Grants read-only access to the {{kib}} Dashboard in every [space in {{kib}}](docs-content://deploy-manage/manage-spaces.md). This role does not have access to editing tools in {{kib}}.
73+
$$$built-in-roles-kibana-dashboard$$$ `kibana_dashboard_only_user` {applies_to}`stack: deprecated`
74+
: This role is deprecated. Use [{{kib}} feature privileges](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/kibana-privileges.md#kibana-feature-privileges) instead. Grants read-only access to the {{kib}} Dashboard in every [space in {{kib}}](docs-content://deploy-manage/manage-spaces.md). This role does not have access to editing tools in {{kib}}.
6475

6576
$$$built-in-roles-kibana-system$$$ `kibana_system`
6677
: Grants access necessary for the {{kib}} system user to read from and write to the {{kib}} indices, manage index templates and tokens, and check the availability of the {{es}} cluster. It also permits activating, searching, and retrieving user profiles, as well as updating user profile data for the `kibana-*` namespace. This role grants read access to the `.monitoring-*` indices and read and write access to the `.reporting-*` indices. For more information, see [Configuring Security in {{kib}}](docs-content://deploy-manage/security/secure-your-cluster-deployment.md).
@@ -71,10 +82,12 @@ $$$built-in-roles-kibana-system$$$ `kibana_system`
7182

7283

7384
$$$built-in-roles-kibana-admin$$$ `kibana_admin`
74-
: Grants access to all features in {{kib}}. For more information on {{kib}} authorization, see [Kibana authorization](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/built-in-roles.md).
85+
: Grants access to all {{kib}} features in all spaces. For more information on {{kib}} authorization, see [Kibana authorization](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/built-in-roles.md).
86+
87+
$$$built-in-roles-kibana-user$$$ `kibana_user` {applies_to}`stack: deprecated`
88+
: This role is deprecated. Use the [`kibana_admin`](#built-in-roles-kibana-admin) role instead. Grants access to all features in {{kib}}.
7589

76-
$$$built-in-roles-kibana-user$$$ `kibana_user`
77-
: (This role is deprecated, please use the [`kibana_admin`](#built-in-roles-kibana-admin) role instead.) Grants access to all features in {{kib}}. For more information on {{kib}} authorization, see [Kibana authorization](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/built-in-roles.md).
90+
For more information on {{kib}} authorization, see [Kibana authorization](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/built-in-roles.md).
7891

7992
$$$built-in-roles-logstash-admin$$$ `logstash_admin`
8093
: Grants access to the `.logstash*` indices for managing configurations, and grants necessary access for logstash-specific APIs exposed by the logstash x-pack plugin.
@@ -104,8 +117,10 @@ $$$built-in-roles-remote-monitoring-agent$$$ `remote_monitoring_agent`
104117
$$$built-in-roles-remote-monitoring-collector$$$ `remote_monitoring_collector`
105118
: Grants the minimum privileges required to collect monitoring data for the {{stack}}.
106119

107-
$$$built-in-roles-reporting-user$$$ `reporting_user`
108-
: Grants the necessary privileges required to use {{report-features}} in {{kib}}, including generating and downloading reports. This role implicitly grants access to all Kibana reporting features, with each user having access only to their own reports. Note that reporting users should also be assigned additional roles that grant read access to the [indices](https://www.elastic.co/guide/en/elasticsearch/reference/current/defining-roles.html#roles-indices-priv) that will be used to generate reports.
120+
$$$built-in-roles-reporting-user$$$ `reporting_user` {applies_to}`stack: deprecated 9.0`
121+
: This role is deprecated. Use [{{kib}} feature privileges](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/kibana-privileges.md#kibana-feature-privileges) instead.
122+
123+
Grants the necessary privileges required to use {{report-features}} in {{kib}}, including generating and downloading reports. This role implicitly grants access to all {{kib}} reporting features, with each user having access only to their own reports. Note that reporting users should also be assigned additional roles that grant read access to the [indices](docs-content://deploy-manage/users-roles/cluster-or-deployment-auth/role-structure.md#roles-indices-priv) that will be used to generate reports.
109124

110125
$$$built-in-roles-rollup-admin$$$ `rollup_admin`
111126
: Grants `manage_rollup` cluster privileges, which enable you to manage and execute all rollup actions.

0 commit comments

Comments
 (0)