Skip to content

Commit

Permalink
docker: allows elasticsearch8 tests to delete with wildcards (#3665)
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <adrian@tetrate.io>
  • Loading branch information
codefromthecrypt authored Dec 29, 2023
1 parent ee5e762 commit 68d77db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ xpack.security.enabled: false
xpack.ml.enabled: false
cluster.initial_master_nodes:
- zipkin-elasticsearch
# This is a test image, so we are not afraid to delete all indices. Avoids:
# Wildcard expressions or all indices are not allowed
action.destructive_requires_name: false
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2021 The OpenZipkin Authors
* Copyright 2015-2023 The OpenZipkin Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -268,6 +268,8 @@ public void clear() throws IOException {
Set<String> toClear = new LinkedHashSet<>();
toClear.add(indexNameFormatter().formatType(TYPE_SPAN));
toClear.add(indexNameFormatter().formatType(TYPE_DEPENDENCY));
// Note: Elasticsearch 8.x requires this config to clear with wildcards:
// action.destructive_requires_name: false
for (String index : toClear) clear(index);
}

Expand Down

0 comments on commit 68d77db

Please sign in to comment.