Skip to content

Commit

Permalink
elasticsearch: adjust for recent deprecations (#3710)
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <adrian@tetrate.io>
  • Loading branch information
codefromthecrypt authored Jan 25, 2024
1 parent 72de5a8 commit 29044e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ node.name: zipkin-elasticsearch
# Enable development mode and disable bootstrap checks
# See https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
discovery.type: single-node
# Avoid deprecation errors: as of 8.x the only accepted value is true.
cluster.routing.allocation.disk.watermark.enable_for_single_data_node: true

# 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
# Avoid "flood stage disk watermark" errors
cluster.routing.allocation.disk.threshold_enabled: false
# We don't use geoip
ingest.geoip.downloader.enabled: false

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2023 The OpenZipkin Authors
* Copyright 2015-2024 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 @@ -163,12 +163,14 @@ static void aggregateDependencies(ElasticsearchStorage storage, List<Span> spans
final AggregatedHttpResponse response =
webClient.execute(HttpRequest.of(RequestHeaders.of(HttpMethod.GET,
"/_migration/deprecations"))).aggregate().join();
if (!response.contentAscii().isEmpty()) {
String responseBody = response.contentAscii();
if (!responseBody.equals("""
{"cluster_settings":[],"node_settings":[],"index_settings":{},"ml_settings":[],"ccr_auto_followed_system_indices":[]}""")) {
LOGGER.warn("The ElasticSearch instance used during IT's is using deprecated features or "
+ "configuration. This is likely nothing to be really worried about (for example 'xpack.monitoring.enabled' "
+ "setting), but nevertheless it should be looked at to see if our docker image used during "
+ "integration tests needs updating for the next version of ElasticSearch. "
+ "See https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html"
+ "See https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html "
+ "for more information. This is the deprecation warning we received:\n\n"
+ response.contentAscii());
}
Expand Down

0 comments on commit 29044e2

Please sign in to comment.