From 2053e0dd27dc31559e1d01f093bb7e38468217a8 Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 30 Jul 2025 12:48:25 +0100 Subject: [PATCH] Upgrade MinIO (& work around bug) (#131815) Relates https://github.com/minio/minio/issues/21456 Closes https://github.com/elastic/elasticsearch/issues/131742 --- .../test/fixtures/minio/MinioTestContainer.java | 7 ++++--- .../testkit/analyze/MinioRepositoryAnalysisRestIT.java | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/fixtures/minio-fixture/src/main/java/org/elasticsearch/test/fixtures/minio/MinioTestContainer.java b/test/fixtures/minio-fixture/src/main/java/org/elasticsearch/test/fixtures/minio/MinioTestContainer.java index 64518cde6dd16..29cb2607844cc 100644 --- a/test/fixtures/minio-fixture/src/main/java/org/elasticsearch/test/fixtures/minio/MinioTestContainer.java +++ b/test/fixtures/minio-fixture/src/main/java/org/elasticsearch/test/fixtures/minio/MinioTestContainer.java @@ -15,9 +15,10 @@ public final class MinioTestContainer extends DockerEnvironmentAwareTestContainer { - // NB releases earlier than 2025-05-24 are buggy, see https://github.com/minio/minio/issues/21189, and #127166 for a workaround - // However the 2025-05-24 release is also buggy, see https://github.com/minio/minio/issues/21377, and this has no workaround - public static final String DOCKER_BASE_IMAGE = "minio/minio:RELEASE.2025-06-13T11-33-47Z"; + // NB releases earlier than 2025-05-24 are buggy, see https://github.com/minio/minio/issues/21189, and #127166 for a workaround. + // However the 2025-05-24 release is also buggy, see https://github.com/minio/minio/issues/21377, and this has no workaround. + // Also https://github.com/minio/minio/issues/21456 seems to affect releases newer than 2025-05-24, see #131815 for workaround. + public static final String DOCKER_BASE_IMAGE = "minio/minio:RELEASE.2025-07-23T15-54-02Z"; private static final int servicePort = 9000; private final boolean enabled; diff --git a/x-pack/plugin/snapshot-repo-test-kit/qa/minio/src/javaRestTest/java/org/elasticsearch/repositories/blobstore/testkit/analyze/MinioRepositoryAnalysisRestIT.java b/x-pack/plugin/snapshot-repo-test-kit/qa/minio/src/javaRestTest/java/org/elasticsearch/repositories/blobstore/testkit/analyze/MinioRepositoryAnalysisRestIT.java index 0929561909963..bb03585a8fdfe 100644 --- a/x-pack/plugin/snapshot-repo-test-kit/qa/minio/src/javaRestTest/java/org/elasticsearch/repositories/blobstore/testkit/analyze/MinioRepositoryAnalysisRestIT.java +++ b/x-pack/plugin/snapshot-repo-test-kit/qa/minio/src/javaRestTest/java/org/elasticsearch/repositories/blobstore/testkit/analyze/MinioRepositoryAnalysisRestIT.java @@ -33,6 +33,11 @@ public class MinioRepositoryAnalysisRestIT extends AbstractRepositoryAnalysisRes .keystore("s3.client.repository_test_kit.secret_key", "s3_test_secret_key") .setting("s3.client.repository_test_kit.endpoint", minioFixture::getAddress) .setting("xpack.security.enabled", "false") + // Skip listing of pre-existing uploads during a CAS because MinIO sometimes leaks them; also reduce the delay before proceeding + // TODO do not set these if running a MinIO version in which https://github.com/minio/minio/issues/21189 + // and https://github.com/minio/minio/issues/21456 are both fixed + .setting("repository_s3.compare_and_exchange.time_to_live", "-1") + .setting("repository_s3.compare_and_exchange.anti_contention_delay", "100ms") .setting("xpack.ml.enabled", "false") .build();