Skip to content

Commit a85b008

Browse files
committed
Merge remote-tracking branch 'origin/feature/fix-failing-apt-get' into feature/fix-failing-apt-get
2 parents ae98adc + a0e550a commit a85b008

File tree

7 files changed

+47
-213
lines changed

7 files changed

+47
-213
lines changed

build-tools-internal/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ tasks.named("jar") {
381381

382382
spotless {
383383
java {
384+
384385
// workaround for https://github.com/diffplug/spotless/issues/2317
385386
//toggleOffOn()
386387
target project.fileTree("src/main/java") {

docs/changelog/129295.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 129295
2+
summary: Increase the number of retries for apt-get
3+
area: Security
4+
type: enhancement
5+
issues:
6+
- 124490

gradle/build.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ snakeyaml = { group = "org.yaml", name = "snakeyaml", version = { strictly = "2.
4545
spock-core = { group = "org.spockframework", name="spock-core", version.ref="spock" }
4646
spock-junit4 = { group = "org.spockframework", name="spock-junit4", version.ref="spock" }
4747
spock-platform = { group = "org.spockframework", name="spock-bom", version.ref="spock" }
48-
spotless-plugin = "com.diffplug.spotless:spotless-plugin-gradle:7.0.4"
48+
spotless-plugin = "com.diffplug.spotless:spotless-plugin-gradle:6.25.0"
4949
wiremock = "com.github.tomakehurst:wiremock-jre8-standalone:2.23.2"
5050
xmlunit-core = "org.xmlunit:xmlunit-core:2.8.2"
5151

gradle/verification-metadata.xml

Lines changed: 18 additions & 193 deletions
Large diffs are not rendered by default.

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/huggingface/response/HuggingFaceRerankResponseEntityTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ private void assertMissingFieldThrowsIllegalArgumentException(String responseJso
134134
assertThat(thrownException.getMessage(), is("Required [" + missingField + "]"));
135135
}
136136

137-
private void assertTopNLimit(Integer topN, String responseJson, List<RankedDocsResultsTests.RerankExpectation> expectation)
138-
throws IOException {
137+
private void assertTopNLimit(
138+
Integer topN, String responseJson, List<RankedDocsResultsTests.RerankExpectation> expectation) throws IOException {
139139
when(REQUEST_MOCK.getTopN()).thenReturn(topN);
140140

141141
RankedDocsResults parsedResults = HuggingFaceRerankResponseEntity.fromResponse(

x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/MockWritableIndexExpander.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ public static WritableIndexExpander create(boolean stateIndexWritable) {
3030
}
3131

3232
private static void mockWhenIndicesAreNotWritable(WritableIndexExpander writableIndexExpander) {
33-
when(writableIndexExpander.getWritableIndices(anyString())).thenReturn(new ArrayList<>());
34-
when(writableIndexExpander.getWritableIndices(ArgumentMatchers.<Collection<String>>any())).thenReturn(new ArrayList<>());
33+
when(writableIndexExpander.getWritableIndices(anyString()))
34+
.thenReturn(new ArrayList<>());
35+
when(writableIndexExpander.getWritableIndices(ArgumentMatchers.<Collection<String>>any()))
36+
.thenReturn(new ArrayList<>());
3537
}
3638

3739
private static void mockWhenIndicesAreWritable(WritableIndexExpander writableIndexExpander) {

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ public void testAuthenticateCached() throws Exception {
791791

792792
public void testAuthenticateNonExistentRestRequestUserThrowsAuthenticationException() throws Exception {
793793
when(firstRealm.token(threadContext)).thenReturn(
794-
new UsernamePasswordToken("idonotexist", new SecureString("passwd".toCharArray()))
794+
new UsernamePasswordToken("idonotexist", new SecureString("passwd".toCharArray()))
795795
);
796796
try {
797797
authenticateBlocking(restRequest, null);
@@ -2069,23 +2069,23 @@ public void testExpiredToken() throws Exception {
20692069
when(projectIndex.indexExists()).thenReturn(true);
20702070
User user = new User("_username", "r1");
20712071
final Authentication expected = AuthenticationTestHelper.builder()
2072-
.user(user)
2073-
.realmRef(new RealmRef("realm", "custom", "node"))
2074-
.build(false);
2072+
.user(user)
2073+
.realmRef(new RealmRef("realm", "custom", "node"))
2074+
.build(false);
20752075
PlainActionFuture<TokenService.CreateTokenResult> tokenFuture = new PlainActionFuture<>();
20762076
Tuple<byte[], byte[]> newTokenBytes = tokenService.getRandomTokenBytes(randomBoolean());
20772077
try (ThreadContext.StoredContext ctx = threadContext.stashContext()) {
20782078
Authentication originatingAuth = AuthenticationTestHelper.builder()
2079-
.user(new User("creator"))
2080-
.realmRef(new RealmRef("test", "test", "test"))
2081-
.build(false);
2079+
.user(new User("creator"))
2080+
.realmRef(new RealmRef("test", "test", "test"))
2081+
.build(false);
20822082
tokenService.createOAuth2Tokens(
2083-
newTokenBytes.v1(),
2084-
newTokenBytes.v2(),
2085-
expected,
2086-
originatingAuth,
2087-
Collections.emptyMap(),
2088-
tokenFuture
2083+
newTokenBytes.v1(),
2084+
newTokenBytes.v2(),
2085+
expected,
2086+
originatingAuth,
2087+
Collections.emptyMap(),
2088+
tokenFuture
20892089
);
20902090
}
20912091
String token = tokenFuture.get().getAccessToken();
@@ -2104,8 +2104,8 @@ public void testExpiredToken() throws Exception {
21042104
}
21052105
threadContext.putHeader("Authorization", "Bearer " + token);
21062106
ElasticsearchSecurityException e = expectThrows(
2107-
ElasticsearchSecurityException.class,
2108-
() -> authenticateBlocking("_action", transportRequest, null, null)
2107+
ElasticsearchSecurityException.class,
2108+
() -> authenticateBlocking("_action", transportRequest, null, null)
21092109
);
21102110
if (requestIdAlreadyPresent) {
21112111
assertThat(expectAuditRequestId(threadContext), is(reqId.get()));

0 commit comments

Comments
 (0)