Skip to content

Commit fe8f654

Browse files
committed
Merge branch 'upstream/master' into tsdb-deal-timestreamp
* upstream/master: (209 commits) Enforce license expiration (elastic#79671) TSDB: Automatically add timestamp mapper (elastic#79136) [DOCS] `_id` is required for bulk API's `update` action (elastic#79774) EQL: Add optional fields and limit joining keys on non-null values only (elastic#79677) [DOCS] Document range enrich policy (elastic#79607) [DOCS] Fix typos in 8.0 security migration (elastic#79802) Allow listing older repositories (elastic#78244) [ML] track inference model feature usage per node (elastic#79752) Remove IncrementalClusterStateWriter & related code (elastic#79738) Reuse previous indices lookup when possible (elastic#79004) Reduce merging in PersistedClusterStateService (elastic#79793) SQL: Adjust JDBC docs to use milliseconds for timeouts (elastic#79628) Remove endpoint for freezing indices (elastic#78918) [ML] add timeout parameter for DELETE trained_models API (elastic#79739) [ML] wait for .ml-state-write alias to be readable (elastic#79731) [Docs] Update edgengram-tokenizer.asciidoc (elastic#79577) [Test][Transform] fix UpdateTransformActionRequestTests failure (elastic#79787) Limit CS Update Task Description Size (elastic#79443) Apply the reader wrapper on can_match source (elastic#78988) [DOCS] Adds new transform limitation item and a note to the tutorial (elastic#79479) ... # Conflicts: # server/src/main/java/org/elasticsearch/index/IndexMode.java # server/src/test/java/org/elasticsearch/index/TimeSeriesModeTests.java
2 parents 78c132d + ad171b1 commit fe8f654

File tree

1,393 files changed

+28967
-11895
lines changed

Some content is hidden

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

1,393 files changed

+28967
-11895
lines changed

.backportrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
"upstream": "elastic/elasticsearch",
33
"targetBranchChoices": [
44
{ "name": "master", "checked": true },
5-
{ "name": "7.x", "checked": true },
5+
"7.16",
66
"7.15",
77
"7.14",
88
"6.8"
99
],
1010
"targetPRLabels": ["backport"],
1111
"branchLabelMapping": {
1212
"^v8.0.0$": "master",
13-
"^v7.16.0$": "7.x",
1413
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
1514
}
1615
}

.ci/jobs.t/elastic+elasticsearch+pull-request+packaging-tests-windows-sample.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
github-hooks: true
2222
status-context: elasticsearch-ci/packaging-tests-windows-sample
2323
cancel-builds-on-update: true
24-
white-list-target-branches:
25-
- master
24+
black-list-target-branches:
25+
- 7.16
26+
- 7.15
27+
- 6.8
2628
excluded-regions:
2729
- ^docs/.*
2830
black-list-labels:

.ci/jobs.t/elastic+elasticsearch+pull-request+packaging-tests-windows.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
github-hooks: true
2222
status-context: elasticsearch-ci/packaging-tests-windows
2323
cancel-builds-on-update: true
24-
white-list-target-branches:
25-
- master
24+
black-list-target-branches:
25+
- 7.16
26+
- 7.15
27+
- 6.8
2628
excluded-regions:
2729
- ^docs/.*
2830
white-list-labels:
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
- job:
3+
name: "elastic+elasticsearch+pull-request+release-tests"
4+
display-name: "elastic / elasticsearch - pull request release-tests"
5+
description: "Testing of Elasticsearch pull requests - release-tests"
6+
workspace: "/dev/shm/elastic+elasticsearch+pull-request+release-tests"
7+
scm:
8+
- git:
9+
refspec: "+refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*"
10+
branches:
11+
- "${ghprbActualCommit}"
12+
triggers:
13+
- github-pull-request:
14+
org-list:
15+
- elastic
16+
allow-whitelist-orgs-as-admins: true
17+
trigger-phrase: '.*run\W+elasticsearch-ci/release-tests.*'
18+
github-hooks: true
19+
status-context: elasticsearch-ci/release-tests
20+
cancel-builds-on-update: true
21+
excluded-regions:
22+
- ^docs/.*
23+
white-list-labels:
24+
- 'test-release'
25+
black-list-target-branches:
26+
- 7.15
27+
- 6.8
28+
builders:
29+
- inject:
30+
properties-file: '.ci/java-versions.properties'
31+
properties-content: |
32+
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
33+
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
34+
JAVA8_HOME=$HOME/.java/java8
35+
JAVA11_HOME=$HOME/.java/java11
36+
JAVA15_HOME=$HOME/.java/openjdk15
37+
- shell: |
38+
#!/usr/local/bin/runbld --redirect-stderr
39+
40+
# Fetch beats artifacts
41+
export ES_VERSION=$(grep 'elasticsearch' build-tools-internal/version.properties | awk '{print $3}')
42+
export BEATS_DIR=$(pwd)/distribution/docker/build/artifacts/beats
43+
44+
mkdir -p ${BEATS_DIR}
45+
curl -o "${BEATS_DIR}/metricbeat-${ES_VERSION}-linux-x86_64.tar.gz" https://snapshots-no-kpi.elastic.co/downloads/beats/metricbeat/metricbeat-${ES_VERSION}-SNAPSHOT-linux-x86_64.tar.gz
46+
curl -o "${BEATS_DIR}/filebeat-${ES_VERSION}-linux-x86_64.tar.gz" https://snapshots-no-kpi.elastic.co/downloads/beats/filebeat/filebeat-${ES_VERSION}-SNAPSHOT-linux-x86_64.tar.gz
47+
48+
$WORKSPACE/.ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dbuild.snapshot=false \
49+
-Dtests.jvm.argline=-Dbuild.snapshot=false -Dlicense.key=${WORKSPACE}/x-pack/license-tools/src/test/resources/public.key -Dbuild.id=deadbeef build

.ci/jobs.t/elastic+elasticsearch+pull-request+rest-compatibility.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
github-hooks: true
1919
status-context: elasticsearch-ci/rest-compatibility
2020
cancel-builds-on-update: true
21-
white-list-target-branches:
22-
- master
21+
black-list-target-branches:
22+
- 7.16
23+
- 7.15
24+
- 6.8
2325
excluded-regions:
2426
- ^docs/.*
2527
black-list-labels:

build-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/precommit/FormattingPrecommitPlugin.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ private Object[] getTargets(String projectPath) {
8989
return new String[] {
9090
"src/*/java/org/elasticsearch/action/admin/cluster/repositories/**/*.java",
9191
"src/*/java/org/elasticsearch/action/admin/cluster/snapshots/**/*.java",
92-
"src/test/java/org/elasticsearch/common/xcontent/support/AbstractFilteringTestCase.java",
9392
"src/test/java/org/elasticsearch/common/xcontent/support/XContentMapValuesTests.java",
9493
"src/*/java/org/elasticsearch/index/IndexMode.java",
9594
"src/*/java/org/elasticsearch/index/IndexRouting.java",
@@ -98,6 +97,10 @@ private Object[] getTargets(String projectPath) {
9897
"src/*/java/org/elasticsearch/repositories/**/*.java",
9998
"src/*/java/org/elasticsearch/search/aggregations/**/*.java",
10099
"src/*/java/org/elasticsearch/snapshots/**/*.java" };
100+
} else if (projectPath.equals(":test:framework")) {
101+
return new String[] {
102+
"src/test/java/org/elasticsearch/common/xcontent/support/AbstractFilteringTestCase.java",
103+
};
101104
} else {
102105
// Normally this isn"t necessary, but we have Java sources in
103106
// non-standard places
@@ -115,6 +118,10 @@ private Object[] getTargets(String projectPath) {
115118
":client:sniffer",
116119
":client:test",
117120
":distribution:archives:integ-test-zip",
121+
":distribution:bwc:bugfix",
122+
":distribution:bwc:maintenance",
123+
":distribution:bwc:minor",
124+
":distribution:bwc:staged",
118125
":distribution:docker",
119126
":docs",
120127
":example-plugins:custom-settings",
@@ -203,7 +210,6 @@ private Object[] getTargets(String projectPath) {
203210
":test:fixtures:geoip-fixture",
204211
":test:fixtures:krb5kdc-fixture",
205212
":test:fixtures:old-elasticsearch",
206-
":test:framework",
207213
":test:logger-usage",
208214
":x-pack:docs",
209215
":x-pack:license-tools",

build-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/precommit/LicenseHeadersTask.java

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import org.w3c.dom.Element;
3737
import org.w3c.dom.NodeList;
3838
import org.xml.sax.SAXException;
39-
39+
import org.gradle.api.model.ObjectFactory;
4040
import javax.xml.parsers.DocumentBuilderFactory;
4141
import javax.xml.parsers.ParserConfigurationException;
4242
import java.io.BufferedWriter;
@@ -51,6 +51,8 @@
5151
import java.util.List;
5252
import java.util.Map;
5353
import java.util.stream.Collectors;
54+
import javax.inject.Inject;
55+
import java.io.Serializable;
5456

5557
/**
5658
* Checks files for license headers..
@@ -95,17 +97,18 @@ public List<String> getExcludes() {
9597
return excludes;
9698
}
9799

98-
public Map<String, String> getAdditionalLicenses() {
99-
return additionalLicenses;
100-
}
101-
102100
public void setExcludes(List<String> excludes) {
103101
this.excludes = excludes;
104102
}
105103

106104
@OutputFile
107105
private File reportFile = new File(getProject().getBuildDir(), "reports/licenseHeaders/rat.xml");
108106

107+
private static List<License> conventionalLicenses = Arrays.asList(
108+
// Dual SSPLv1 and Elastic
109+
new License("DUAL", "SSPL+Elastic License", "the Elastic License 2.0 or the Server")
110+
);
111+
109112
/**
110113
* Allowed license families for this project.
111114
*/
@@ -118,13 +121,17 @@ public void setExcludes(List<String> excludes) {
118121
*/
119122
@Input
120123
private List<String> excludes = new ArrayList<String>();
124+
125+
private ListProperty<License> additionalLicenses;
126+
121127
/**
122128
* Additional license families that may be found. The key is the license category name (5 characters),
123129
* followed by the family name and the value list of patterns to search for.
124130
*/
125131
@Input
126-
protected Map<String, String> additionalLicenses = new HashMap<String, String>();
127-
132+
public ListProperty<License> getAdditionalLicenses() {
133+
return additionalLicenses;
134+
}
128135
/**
129136
* Add a new license type.
130137
* <p>
@@ -139,7 +146,12 @@ public void additionalLicense(final String categoryName, String familyName, Stri
139146
throw new IllegalArgumentException("License category name must be exactly 5 characters, got " + categoryName);
140147
}
141148

142-
additionalLicenses.put(categoryName + familyName, pattern);
149+
additionalLicenses.add(new License(categoryName, familyName, pattern));
150+
}
151+
152+
@Inject
153+
public LicenseHeadersTask(ObjectFactory objectFactory) {
154+
additionalLicenses = objectFactory.listProperty(License.class).convention(conventionalLicenses);
143155
}
144156

145157
@TaskAction
@@ -160,14 +172,10 @@ public void runRat() {
160172
matchers.add(subStringMatcher("GEN ", "Generated", "ANTLR GENERATED CODE"));
161173
// Vendored Code
162174
matchers.add(subStringMatcher("VEN ", "Vendored", "@notice"));
163-
// Dual SSPLv1 and Elastic
164-
matchers.add(subStringMatcher("DUAL", "SSPL+Elastic License", "the Elastic License 2.0 or the Server"));
165175

166-
for (Map.Entry<String, String> additional : additionalLicenses.entrySet()) {
167-
String category = additional.getKey().substring(0, 5);
168-
String family = additional.getKey().substring(5);
169-
matchers.add(subStringMatcher(category, family, additional.getValue()));
170-
}
176+
additionalLicenses.get().forEach(l ->
177+
matchers.add(subStringMatcher(l.licenseFamilyCategory, l.licenseFamilyName, l.substringPattern))
178+
);
171179

172180
reportConfiguration.setHeaderMatcher(new HeaderMatcherMultiplexer(matchers.toArray(IHeaderMatcher[]::new)));
173181
reportConfiguration.setApprovedLicenseNames(approvedLicenses.stream().map(license -> {
@@ -190,7 +198,6 @@ private IHeaderMatcher subStringMatcher(String licenseFamilyCategory, String lic
190198
SubstringLicenseMatcher substringLicenseMatcher = new SubstringLicenseMatcher();
191199
substringLicenseMatcher.setLicenseFamilyCategory(licenseFamilyCategory);
192200
substringLicenseMatcher.setLicenseFamilyName(licenseFamilyName);
193-
194201
SubstringLicenseMatcher.Pattern pattern = new SubstringLicenseMatcher.Pattern();
195202
pattern.setSubstring(substringPattern);
196203
substringLicenseMatcher.addConfiguredPattern(pattern);
@@ -249,4 +256,16 @@ private static List<Element> elementList(NodeList resourcesNodes) {
249256
}
250257
return nodeList;
251258
}
259+
260+
static class License implements Serializable {
261+
private String licenseFamilyCategory;
262+
private String licenseFamilyName;
263+
private String substringPattern;
264+
265+
public License(String licenseFamilyCategory, String licenseFamilyName, String substringPattern) {
266+
this.licenseFamilyCategory = licenseFamilyCategory;
267+
this.licenseFamilyName = licenseFamilyName;
268+
this.substringPattern = substringPattern;
269+
}
270+
}
252271
}

build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/InternalBwcGitPluginFuncTest.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ class InternalBwcGitPluginFuncTest extends AbstractGitAwareGradleFuncTest {
2121
2222
bwcGitConfig {
2323
bwcVersion = project.provider { Version.fromString("7.9.1") }
24-
bwcBranch = project.provider { "7.x" }
24+
bwcBranch = project.provider { "7.9" }
2525
checkoutDir = project.provider{file("build/checkout")}
2626
}
2727
"""
28-
execute("git branch origin/7.x", file("cloned"))
28+
execute("git branch origin/7.9", file("cloned"))
2929
}
3030

3131
def "current repository can be cloned"() {

0 commit comments

Comments
 (0)