Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,12 @@ tests:
- class: org.elasticsearch.xpack.search.AsyncSearchTaskTests
method: testWithFailure
issue: https://github.com/elastic/elasticsearch/issues/142821
- class: org.elasticsearch.xpack.esql.qa.multi_node.EsqlClientYamlIT
method: test {p0=esql/40_tsdb/to_aggregate_metric_double with multi_values}
issue: https://github.com/elastic/elasticsearch/issues/142964
- class: org.elasticsearch.reindex.management.ReindexManagementClientYamlTestSuiteIT
method: test {yaml=reindex/30_cancel_reindex/Cancel running reindex returns response and GET confirms completed}
issue: https://github.com/elastic/elasticsearch/issues/142079
- class: org.elasticsearch.packaging.test.DebMetadataTests
method: test05CheckLintian
issue: https://github.com/elastic/elasticsearch/issues/142819
- class: org.elasticsearch.xpack.esql.qa.mixed.FieldExtractorIT
method: testTsIndexConflictingTypes {null}
issue: https://github.com/elastic/elasticsearch/issues/142410
- class: org.elasticsearch.xpack.esql.heap_attack.HeapAttackSubqueryIT
method: testManyRandomKeywordFieldsInSubqueryIntermediateResults
issue: https://github.com/elastic/elasticsearch/issues/143314
Expand All @@ -360,9 +354,6 @@ tests:
- class: org.elasticsearch.index.store.StoreDirectoryMetricsIT
method: testDirectoryMetrics
issue: https://github.com/elastic/elasticsearch/issues/143419
- class: org.elasticsearch.xpack.esql.qa.mixed.EsqlClientYamlIT
method: test {p0=esql/40_tsdb/TS Command grouping on text field}
issue: https://github.com/elastic/elasticsearch/issues/142544
- class: org.elasticsearch.repositories.azure.AzureBlobContainerRetriesTests
method: testWriteLargeBlob
issue: https://github.com/elastic/elasticsearch/issues/143551
Expand All @@ -381,9 +372,6 @@ tests:
- class: org.elasticsearch.compute.lucene.query.LuceneTopNSourceOperatorTests
method: testAccumulateSearchLoad
issue: https://github.com/elastic/elasticsearch/issues/143708
- class: org.elasticsearch.xpack.esql.qa.mixed.FieldExtractorIT
method: testTsIndexConflictingTypes {NONE}
issue: https://github.com/elastic/elasticsearch/issues/142477
- class: org.elasticsearch.xpack.sql.qa.security.CliApiKeyIT
method: testCliConnectionWithInvalidApiKey
issue: https://github.com/elastic/elasticsearch/issues/143646
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.lucene.index.LeafReaderContext;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.common.Explicit;
import org.elasticsearch.common.TriFunction;
Expand Down Expand Up @@ -1939,6 +1940,13 @@ public final void parse(String name, MappingParserContext parserContext, Map<Str
);
}
if (parameter.deprecated) {
// Remove the stack track trace logging after https://github.com/elastic/elasticsearch/issues/143884
if (logger.isDebugEnabled() && "default_metric".equals(propName)) {
logger.debug(
"Parsing [" + contentType() + "] with deprecated [default_metric] config",
new ElasticsearchException("Stack trace retrieval")
);
}
deprecationLogger.warn(
DeprecationCategory.API,
propName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public static ElasticsearchCluster mixedVersionCluster() {
.withNode(node -> node.version(oldVersionString, isDetachedVersion))
.withNode(node -> node.version(Version.CURRENT))
.setting("xpack.security.enabled", "false")
.setting("xpack.license.self_generated.type", "trial");
.setting("xpack.license.self_generated.type", "trial")
// Remove after https://github.com/elastic/elasticsearch/issues/143884 (only the current version will log the stack trace)
.setting("logger.org.elasticsearch.index.mapper.FieldMapper", "DEBUG");
if (supportRetryOnShardFailures(oldVersion) == false) {
cluster.setting("cluster.routing.rebalance.enable", "none");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
@ThreadLeakFilters(filters = TestClustersThreadFilter.class)
public class FieldExtractorIT extends FieldExtractorTestCase {
@ClassRule
public static ElasticsearchCluster cluster = Clusters.testCluster(spec -> {});
public static ElasticsearchCluster cluster = Clusters.testCluster(
// Remove after https://github.com/elastic/elasticsearch/issues/143884
spec -> spec.setting("logger.org.elasticsearch.index.mapper.FieldMapper", "DEBUG")
);

public FieldExtractorIT(MappedFieldType.FieldExtractPreference preference) {
super(preference);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,7 @@ public void testTsIndexConflictingTypes() throws IOException {
}
}
""", null, DEPRECATED_DEFAULT_METRIC_WARNING_HANDLER);
// Remove try-catch after https://github.com/elastic/elasticsearch/issues/143884
try {
ESRestTestCase.createIndex("metrics-long", settings, """
"properties": {
Expand All @@ -1427,8 +1428,12 @@ public void testTsIndexConflictingTypes() throws IOException {
}
""");
} catch (WarningFailureException warningException) {
Map<String, Object> indexMapping = ESRestTestCase.getIndexMapping("metrics-long");
logger.error("Received warning when creating index [metrics-long] with mapping [{}]", indexMapping);
List<String> warnings = warningException.getResponse().getWarnings();
if (warnings.stream()
.anyMatch(warning -> warning.equals("Parameter [default_metric] is deprecated and will be removed in a future version"))) {
Map<String, Object> indexMapping = ESRestTestCase.getIndexMapping("metrics-long");
logger.error("Received warning when creating index [metrics-long] with mapping [{}]", indexMapping);
}
throw warningException;
}
ESRestTestCase.createIndex("metrics-long_dimension", settings, """
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
setup:
- requires:
test_runner_features: [allowed_warnings_regex, allowed_warnings]
# Remove enabling debug logging after https://github.com/elastic/elasticsearch/issues/143884
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one too - if the warning is leaking in from an earlier test then we won't catch it like this. We need the logging enabled for the whole test run.

- do:
cluster.put_settings:
body: >
{
"persistent": {
"logger.org.elasticsearch.index.mapper.FieldMapper": "DEBUG"
}
}
- do:
indices.create:
index: test
Expand Down