Skip to content

Commit 174b5a1

Browse files
authored
Merge branch 'main' into convert-more-xpack-plugins
2 parents 77f39e7 + 511c509 commit 174b5a1

File tree

26 files changed

+86
-67
lines changed

26 files changed

+86
-67
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,27 @@ package org.elasticsearch.gradle.fixtures;
1313
abstract class AbstractRestResourcesFuncTest extends AbstractGradleFuncTest {
1414

1515
def setup() {
16+
settingsFile.text = """
17+
plugins {
18+
id 'elasticsearch.java-toolchain'
19+
}
20+
21+
toolchainManagement {
22+
jvm {
23+
javaRepositories {
24+
repository('bundledOracleOpendJdk') {
25+
resolverClass = org.elasticsearch.gradle.internal.toolchain.OracleOpenJdkToolchainResolver
26+
}
27+
repository('adoptiumJdks') {
28+
resolverClass = org.elasticsearch.gradle.internal.toolchain.AdoptiumJdkToolchainResolver
29+
}
30+
repository('archivedOracleJdks') {
31+
resolverClass = org.elasticsearch.gradle.internal.toolchain.ArchivedOracleJdkToolchainResolver
32+
}
33+
}
34+
}
35+
}
36+
""" + settingsFile.text
1637
subProject(":test:framework") << "apply plugin: 'elasticsearch.java'"
1738
subProject(":test:test-clusters") << "apply plugin: 'elasticsearch.java'"
1839
subProject(":test:yaml-rest-runner") << "apply plugin: 'elasticsearch.java'"

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/RestrictedBuildApiService.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
3737
map.put(LegacyRestTestBasePlugin.class, ":qa:repository-multi-version");
3838
map.put(LegacyRestTestBasePlugin.class, ":qa:rolling-upgrade-legacy");
3939
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:ent-search");
40-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:fleet");
4140
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:mixed-tier-cluster");
4241
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:repository-old-versions");
4342
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:rolling-upgrade");
@@ -75,7 +74,6 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
7574
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:eql:qa:ccs-rolling-upgrade");
7675
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:eql:qa:correctness");
7776
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:eql:qa:mixed-node");
78-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:fleet:qa:rest");
7977
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:identity-provider:qa:idp-rest-tests");
8078
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:ilm:qa:multi-cluster");
8179
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:ilm:qa:multi-node");

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/distribution/InternalElasticsearchDistributionTypes.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ public class InternalElasticsearchDistributionTypes {
2121
public static final ElasticsearchDistributionType DOCKER_IRONBANK = new DockerIronBankElasticsearchDistributionType();
2222
public static final ElasticsearchDistributionType DOCKER_CLOUD_ESS = new DockerCloudEssElasticsearchDistributionType();
2323
public static final ElasticsearchDistributionType DOCKER_WOLFI = new DockerWolfiElasticsearchDistributionType();
24-
public static final ElasticsearchDistributionType DOCKER_FIPS = new DockerFipsElasticsearchDistributionType();
2524

2625
public static final List<ElasticsearchDistributionType> ALL_INTERNAL = List.of(
2726
DEB,
2827
RPM,
2928
DOCKER,
3029
DOCKER_IRONBANK,
3130
DOCKER_WOLFI,
32-
DOCKER_CLOUD_ESS,
33-
DOCKER_FIPS
31+
DOCKER_CLOUD_ESS
3432
);
3533
}

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/DistroTestPlugin.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.DEB;
5252
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.DOCKER;
5353
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.DOCKER_CLOUD_ESS;
54-
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.DOCKER_FIPS;
5554
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.DOCKER_IRONBANK;
5655
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.DOCKER_WOLFI;
5756
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.RPM;
@@ -152,7 +151,6 @@ private static Map<ElasticsearchDistributionType, TaskProvider<?>> lifecycleTask
152151
lifecyleTasks.put(DOCKER_IRONBANK, project.getTasks().register(taskPrefix + ".docker-ironbank"));
153152
lifecyleTasks.put(DOCKER_CLOUD_ESS, project.getTasks().register(taskPrefix + ".docker-cloud-ess"));
154153
lifecyleTasks.put(DOCKER_WOLFI, project.getTasks().register(taskPrefix + ".docker-wolfi"));
155-
lifecyleTasks.put(DOCKER_FIPS, project.getTasks().register(taskPrefix + ".docker-fips"));
156154
lifecyleTasks.put(ARCHIVE, project.getTasks().register(taskPrefix + ".archives"));
157155
lifecyleTasks.put(DEB, project.getTasks().register(taskPrefix + ".packages"));
158156
lifecyleTasks.put(RPM, lifecyleTasks.get(DEB));

libs/entitlement/src/main/java/org/elasticsearch/entitlement/instrumentation/Transformer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public byte[] transform(
4646
return instrumenter.instrumentClass(className, classfileBuffer, verifyClasses);
4747
} else {
4848
// System.out.println("Not transforming " + className);
49-
return classfileBuffer;
49+
return null;
5050
}
5151
}
5252

muted-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,9 @@ tests:
395395
- class: org.elasticsearch.xpack.ilm.actions.SearchableSnapshotActionIT
396396
method: testResumingSearchableSnapshotFromPartialToFull
397397
issue: https://github.com/elastic/elasticsearch/issues/125789
398+
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
399+
method: test {p0=transform/transforms_stats/Test get transform stats with timeout}
400+
issue: https://github.com/elastic/elasticsearch/issues/125975
398401

399402
# Examples:
400403
#

server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/TransportForceMergeAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected void shardOperation(
100100
SubscribableListener.<IndexShard>newForked(l -> {
101101
IndexShard indexShard = indicesService.indexServiceSafe(shardRouting.shardId().getIndex())
102102
.getShard(shardRouting.shardId().id());
103-
indexShard.ensureMutable(l.map(unused -> indexShard));
103+
indexShard.ensureMutable(l.map(unused -> indexShard), false);
104104
}).<EmptyResult>andThen((l, indexShard) -> {
105105
threadPool.executor(ThreadPool.Names.FORCE_MERGE).execute(ActionRunnable.supply(l, () -> {
106106
indexShard.forceMerge(request);

server/src/main/java/org/elasticsearch/action/bulk/TransportShardBulkAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ protected void shardOperationOnPrimary(
161161
IndexShard primary,
162162
ActionListener<PrimaryResult<BulkShardRequest, BulkShardResponse>> listener
163163
) {
164-
primary.ensureMutable(listener.delegateFailure((l, ignored) -> super.shardOperationOnPrimary(request, primary, l)));
164+
primary.ensureMutable(listener.delegateFailure((l, ignored) -> super.shardOperationOnPrimary(request, primary, l)), true);
165165
}
166166

167167
@Override

server/src/main/java/org/elasticsearch/action/update/TransportUpdateAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ protected void shardOperation(final UpdateRequest request, final ActionListener<
209209
var executor = executor(indexService);
210210
assert ThreadPool.assertCurrentThreadPool(Names.SYSTEM_WRITE, Names.WRITE);
211211

212-
SubscribableListener.newForked(indexShard::ensureMutable)
212+
SubscribableListener.<Void>newForked((l) -> indexShard.ensureMutable(l, false))
213213
// Make sure to fork back to a `write` thread pool if necessary
214214
.<UpdateHelper.Result>andThen(executor, threadPool.getThreadContext(), (l, unused) -> ActionListener.completeWith(l, () -> {
215215
assert ThreadPool.assertCurrentThreadPool(Names.SYSTEM_WRITE, Names.WRITE);

server/src/main/java/org/elasticsearch/index/CompositeIndexEventListener.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,22 @@ public void indexShardStateChanged(
138138
}
139139

140140
@Override
141-
public void beforeIndexShardMutableOperation(IndexShard indexShard, ActionListener<Void> listener) {
142-
iterateBeforeIndexShardMutableOperation(indexShard, listener.delegateResponse((l, e) -> {
141+
public void beforeIndexShardMutableOperation(IndexShard indexShard, boolean permitAcquired, ActionListener<Void> listener) {
142+
iterateBeforeIndexShardMutableOperation(indexShard, permitAcquired, listener.delegateResponse((l, e) -> {
143143
logger.warn(() -> format("%s failed to invoke the listener before ensuring shard mutability", indexShard.shardId()), e);
144144
l.onFailure(e);
145145
}));
146146
}
147147

148-
private void iterateBeforeIndexShardMutableOperation(IndexShard indexShard, ActionListener<Void> outerListener) {
148+
private void iterateBeforeIndexShardMutableOperation(
149+
IndexShard indexShard,
150+
boolean permitAcquired,
151+
ActionListener<Void> outerListener
152+
) {
149153
callListeners(
150154
indexShard,
151155
listeners.stream()
152-
.map(iel -> (Consumer<ActionListener<Void>>) (l) -> iel.beforeIndexShardMutableOperation(indexShard, l))
156+
.map(iel -> (Consumer<ActionListener<Void>>) (l) -> iel.beforeIndexShardMutableOperation(indexShard, permitAcquired, l))
153157
.iterator(),
154158
outerListener
155159
);

0 commit comments

Comments
 (0)