Skip to content

Commit 14997b7

Browse files
fix: exclude tests from release build
1 parent d865ff5 commit 14997b7

File tree

3 files changed

+28
-31
lines changed

3 files changed

+28
-31
lines changed

rest-api-spec/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,6 @@ tasks.named("yamlRestCompatTestTransform").configure ({ task ->
7474
task.skipTest("index/91_metrics_no_subobjects/Metrics object indexing with synthetic source", "_source.mode mapping attribute is no-op since 9.0.0")
7575
task.skipTest("index/91_metrics_no_subobjects/Root without subobjects with synthetic source", "_source.mode mapping attribute is no-op since 9.0.0")
7676
task.skipTest("indices.create/20_synthetic_source/synthetic_source with copy_to inside nested object", "temporary until backported")
77+
task.skipTest("update/10_synthetic_source/keyword", "synthetic source recovery behind a feature flag and not enabled in release builds")
78+
task.skipTest("update/10_synthetic_source/stored text", "synthetic source recovery behind a feature flag and not enabled in release builds")
7779
})

server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111

1212
import org.elasticsearch.features.FeatureSpecification;
1313
import org.elasticsearch.features.NodeFeature;
14-
import org.elasticsearch.index.IndexSettings;
1514

16-
import java.util.HashSet;
1715
import java.util.Set;
1816

1917
/**
@@ -34,36 +32,25 @@ public class MapperFeatures implements FeatureSpecification {
3432
public static final NodeFeature SORT_FIELDS_CHECK_FOR_NESTED_OBJECT_FIX = new NodeFeature("mapper.nested.sorting_fields_check_fix");
3533
public static final NodeFeature DYNAMIC_HANDLING_IN_COPY_TO = new NodeFeature("mapper.copy_to.dynamic_handling");
3634

37-
public static final NodeFeature USE_SYNTHETIC_SOURCE_FOR_RECOVERY_BY_DEFAULT = new NodeFeature(
38-
"index.recovery.synthetic_source_default"
39-
);
40-
41-
private static final Set<NodeFeature> DEFAULT_TEST_FEATURES = Set.of(
42-
RangeFieldMapper.DATE_RANGE_INDEXING_FIX,
43-
IgnoredSourceFieldMapper.DONT_EXPAND_DOTS_IN_IGNORED_SOURCE,
44-
SourceFieldMapper.REMOVE_SYNTHETIC_SOURCE_ONLY_VALIDATION,
45-
SourceFieldMapper.SOURCE_MODE_FROM_INDEX_SETTING,
46-
IgnoredSourceFieldMapper.IGNORED_SOURCE_AS_TOP_LEVEL_METADATA_ARRAY_FIELD,
47-
IgnoredSourceFieldMapper.ALWAYS_STORE_OBJECT_ARRAYS_IN_NESTED_OBJECTS,
48-
MapperService.LOGSDB_DEFAULT_IGNORE_DYNAMIC_BEYOND_LIMIT,
49-
DocumentParser.FIX_PARSING_SUBOBJECTS_FALSE_DYNAMIC_FALSE,
50-
CONSTANT_KEYWORD_SYNTHETIC_SOURCE_WRITE_FIX,
51-
META_FETCH_FIELDS_ERROR_CODE_CHANGED,
52-
SPARSE_VECTOR_STORE_SUPPORT,
53-
COUNTED_KEYWORD_SYNTHETIC_SOURCE_NATIVE_SUPPORT,
54-
SORT_FIELDS_CHECK_FOR_NESTED_OBJECT_FIX,
55-
DYNAMIC_HANDLING_IN_COPY_TO,
56-
SourceFieldMapper.SYNTHETIC_RECOVERY_SOURCE,
57-
ObjectMapper.SUBOBJECTS_FALSE_MAPPING_UPDATE_FIX
58-
);
59-
6035
@Override
6136
public Set<NodeFeature> getTestFeatures() {
62-
if (IndexSettings.RECOVERY_USE_SYNTHETIC_SOURCE.isEnabled()) {
63-
final Set<NodeFeature> features = new HashSet<>(DEFAULT_TEST_FEATURES);
64-
features.add(USE_SYNTHETIC_SOURCE_FOR_RECOVERY_BY_DEFAULT);
65-
return features;
66-
}
67-
return DEFAULT_TEST_FEATURES;
37+
return Set.of(
38+
RangeFieldMapper.DATE_RANGE_INDEXING_FIX,
39+
IgnoredSourceFieldMapper.DONT_EXPAND_DOTS_IN_IGNORED_SOURCE,
40+
SourceFieldMapper.REMOVE_SYNTHETIC_SOURCE_ONLY_VALIDATION,
41+
SourceFieldMapper.SOURCE_MODE_FROM_INDEX_SETTING,
42+
IgnoredSourceFieldMapper.IGNORED_SOURCE_AS_TOP_LEVEL_METADATA_ARRAY_FIELD,
43+
IgnoredSourceFieldMapper.ALWAYS_STORE_OBJECT_ARRAYS_IN_NESTED_OBJECTS,
44+
MapperService.LOGSDB_DEFAULT_IGNORE_DYNAMIC_BEYOND_LIMIT,
45+
DocumentParser.FIX_PARSING_SUBOBJECTS_FALSE_DYNAMIC_FALSE,
46+
CONSTANT_KEYWORD_SYNTHETIC_SOURCE_WRITE_FIX,
47+
META_FETCH_FIELDS_ERROR_CODE_CHANGED,
48+
SPARSE_VECTOR_STORE_SUPPORT,
49+
COUNTED_KEYWORD_SYNTHETIC_SOURCE_NATIVE_SUPPORT,
50+
SORT_FIELDS_CHECK_FOR_NESTED_OBJECT_FIX,
51+
DYNAMIC_HANDLING_IN_COPY_TO,
52+
SourceFieldMapper.SYNTHETIC_RECOVERY_SOURCE,
53+
ObjectMapper.SUBOBJECTS_FALSE_MAPPING_UPDATE_FIX
54+
);
6855
}
6956
}

x-pack/plugin/logsdb/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,12 @@ tasks.named('yamlRestTest') {
4343
usesDefaultDistribution()
4444
}
4545

46+
tasks.named("yamlRestTest") {
47+
if (buildParams.isSnapshotBuild() == false) {
48+
systemProperty 'tests.rest.blacklist', [
49+
"resources/rest-api-spec/test/60_synthetic_source_recovery.yml"
50+
].join(',')
51+
}
52+
}
53+
4654

0 commit comments

Comments
 (0)