Skip to content

Commit 2261655

Browse files
authored
Merge branch 'main' into test/fix-bbq-bwc
2 parents 8d4c339 + d9beed1 commit 2261655

File tree

15 files changed

+71
-60
lines changed

15 files changed

+71
-60
lines changed

.buildkite/hooks/pre-command

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ export GRADLE_BUILD_CACHE_USERNAME
4444
GRADLE_BUILD_CACHE_PASSWORD=$(vault read -field=password secret/ci/elastic-elasticsearch/migrated/gradle-build-cache)
4545
export GRADLE_BUILD_CACHE_PASSWORD
4646

47+
DEVELOCITY_ACCESS_KEY="gradle-enterprise.elastic.co=$(vault read -field=accesskey secret/ci/elastic-elasticsearch/migrated/gradle-build-cache)"
48+
export DEVELOCITY_ACCESS_KEY
49+
4750
BUILDKITE_API_TOKEN=$(vault read -field=token secret/ci/elastic-elasticsearch/buildkite-api-token)
4851
export BUILDKITE_API_TOKEN
4952

.ci/init.gradle

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
1+
final String buildCacheUrl = System.getProperty('org.elasticsearch.build.cache.url')
2+
final boolean buildCachePush = Boolean.valueOf(System.getProperty('org.elasticsearch.build.cache.push', 'false'))
3+
14
gradle.settingsEvaluated { settings ->
25
settings.pluginManager.withPlugin("com.gradle.develocity") {
36
settings.develocity {
4-
server = 'https://gradle-enterprise.elastic.co'
7+
server = "https://gradle-enterprise.elastic.co"
58
}
6-
}
7-
}
8-
9-
final String buildCacheUrl = System.getProperty('org.elasticsearch.build.cache.url')
10-
final boolean buildCachePush = Boolean.valueOf(System.getProperty('org.elasticsearch.build.cache.push', 'false'))
11-
12-
if (buildCacheUrl) {
13-
gradle.settingsEvaluated { settings ->
14-
settings.buildCache {
15-
local {
16-
// Disable the local build cache in CI since we use ephemeral workers and it incurs an IO penalty
17-
enabled = false
18-
}
19-
remote(HttpBuildCache) {
20-
url = buildCacheUrl
21-
push = buildCachePush
22-
credentials {
23-
username = System.getenv("GRADLE_BUILD_CACHE_USERNAME")
24-
password = System.getenv("GRADLE_BUILD_CACHE_PASSWORD")
9+
if (buildCacheUrl) {
10+
settings.buildCache {
11+
local {
12+
// Disable the local build cache in CI since we use ephemeral workers and it incurs an IO penalty
13+
enabled = false
14+
}
15+
remote(settings.develocity.buildCache) {
16+
enabled = true
17+
push = buildCachePush
2518
}
2619
}
2720
}
2821
}
2922
}
23+
24+

build-conventions/settings.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
* your election, the "Elastic License 2.0", the "GNU Affero General Public
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
9+
10+
plugins {
11+
id "com.gradle.develocity" version "3.18.1"
12+
}
13+
914
rootProject.name = 'build-conventions'
1015

1116
dependencyResolutionManagement {

build-tools-internal/settings.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ pluginManagement {
88
includeBuild "../build-tools"
99
}
1010

11+
plugins {
12+
id "com.gradle.develocity" version "3.18.1"
13+
}
14+
1115
dependencyResolutionManagement {
1216
versionCatalogs {
1317
buildLibs {

build-tools/settings.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
pluginManagement {
1010
includeBuild "../build-conventions"
1111
}
12-
12+
plugins {
13+
id "com.gradle.develocity" version "3.18.1"
14+
}
1315
include 'reaper'
1416

1517
dependencyResolutionManagement {

docs/changelog/122575.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 122575
2+
summary: Return an empty suggestion when suggest phase times out
3+
area: Suggesters
4+
type: bug
5+
issues:
6+
- 122548

muted-tests.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,6 @@ tests:
198198
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
199199
method: test {p0=ml/3rd_party_deployment/Test start deployment fails while model download in progress}
200200
issue: https://github.com/elastic/elasticsearch/issues/120810
201-
- class: org.elasticsearch.indices.mapping.UpdateMappingIntegrationIT
202-
issue: https://github.com/elastic/elasticsearch/issues/116126
203201
- class: org.elasticsearch.xpack.security.authc.service.ServiceAccountIT
204202
method: testAuthenticateShouldNotFallThroughInCaseOfFailure
205203
issue: https://github.com/elastic/elasticsearch/issues/120902
@@ -361,9 +359,6 @@ tests:
361359
issue: https://github.com/elastic/elasticsearch/issues/122378
362360
- class: org.elasticsearch.telemetry.apm.ApmAgentSettingsIT
363361
issue: https://github.com/elastic/elasticsearch/issues/122546
364-
- class: org.elasticsearch.search.SearchTimeoutIT
365-
method: testSuggestTimeoutWithPartialResults
366-
issue: https://github.com/elastic/elasticsearch/issues/122548
367362
- class: org.elasticsearch.xpack.inference.mapper.SemanticInferenceMetadataFieldsRecoveryTests
368363
method: testSnapshotRecovery {p0=false p1=false}
369364
issue: https://github.com/elastic/elasticsearch/issues/122549

server/src/internalClusterTest/java/org/elasticsearch/search/SearchTimeoutIT.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,7 @@ protected TermSuggestion innerExecute(
484484
CharsRefBuilder spare
485485
) {
486486
contextIndexSearcher.throwTimeExceededException();
487-
assert false;
488-
return new TermSuggestion(name, suggestion.getSize(), SortBy.SCORE);
487+
throw new AssertionError("should have thrown TimeExceededException");
489488
}
490489

491490
@Override

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ static TransportVersion def(int id) {
129129
public static final TransportVersion INGEST_PIPELINE_CONFIGURATION_AS_MAP = def(8_797_0_00);
130130
public static final TransportVersion LOGSDB_TELEMETRY_CUSTOM_CUTOFF_DATE_FIX_8_17 = def(8_797_0_01);
131131
public static final TransportVersion SOURCE_MODE_TELEMETRY_FIX_8_17 = def(8_797_0_02);
132+
public static final TransportVersion INITIAL_ELASTICSEARCH_8_17_3 = def(8_797_0_03);
132133
public static final TransportVersion INDEXING_PRESSURE_THROTTLING_STATS = def(8_798_0_00);
133134
public static final TransportVersion REINDEX_DATA_STREAMS = def(8_799_0_00);
134135
public static final TransportVersion ESQL_REMOVE_NODE_LEVEL_PLAN = def(8_800_0_00);

server/src/main/java/org/elasticsearch/search/query/QueryPhase.java

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,7 @@ static void executeRank(SearchContext searchContext) throws QueryPhaseExecutionE
126126

127127
static void executeQuery(SearchContext searchContext) throws QueryPhaseExecutionException {
128128
if (searchContext.hasOnlySuggest()) {
129-
try {
130-
SuggestPhase.execute(searchContext);
131-
} catch (ContextIndexSearcher.TimeExceededException timeExceededException) {
132-
SearchTimeoutException.handleTimeout(
133-
searchContext.request().allowPartialSearchResults(),
134-
searchContext.shardTarget(),
135-
searchContext.queryResult()
136-
);
137-
}
129+
SuggestPhase.execute(searchContext);
138130
searchContext.queryResult().topDocs(new TopDocsAndMaxScore(Lucene.EMPTY_TOP_DOCS, Float.NaN), new DocValueFormat[0]);
139131
return;
140132
}
@@ -150,18 +142,10 @@ static void executeQuery(SearchContext searchContext) throws QueryPhaseExecution
150142

151143
addCollectorsAndSearch(searchContext);
152144

153-
try {
154-
RescorePhase.execute(searchContext);
155-
SuggestPhase.execute(searchContext);
156-
if (searchContext.getProfilers() != null) {
157-
searchContext.queryResult().profileResults(searchContext.getProfilers().buildQueryPhaseResults());
158-
}
159-
} catch (ContextIndexSearcher.TimeExceededException timeExceededException) {
160-
SearchTimeoutException.handleTimeout(
161-
searchContext.request().allowPartialSearchResults(),
162-
searchContext.shardTarget(),
163-
searchContext.queryResult()
164-
);
145+
RescorePhase.execute(searchContext);
146+
SuggestPhase.execute(searchContext);
147+
if (searchContext.getProfilers() != null) {
148+
searchContext.queryResult().profileResults(searchContext.getProfilers().buildQueryPhaseResults());
165149
}
166150
}
167151

0 commit comments

Comments
 (0)