Skip to content

Commit

Permalink
Merge branch 'main' into bump_example_compile_version
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Sep 26, 2024
2 parents ce1708a + de4883f commit 08a01bb
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public enum DockerBase {
DEFAULT("ubuntu:20.04", "", "apt-get"),

// "latest" here is intentional, since the image name specifies "8"
UBI("docker.elastic.co/ubi8/ubi-minimal:latest", "-ubi8", "microdnf"),
UBI("docker.elastic.co/ubi8/ubi-minimal:latest", "-ubi", "microdnf"),

// The Iron Bank base image is UBI (albeit hardened), but we are required to parameterize the Docker build
IRON_BANK("${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}", "-ironbank", "yum"),
Expand Down
7 changes: 7 additions & 0 deletions docs/changelog/113570.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pr: 113570
summary: Fix `ignore_above` handling in synthetic source when index level setting
is used
area: Logs
type: bug
issues:
- 113538
3 changes: 3 additions & 0 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ tests:
- class: org.elasticsearch.xpack.transform.integration.TransformIT
method: testStopWaitForCheckpoint
issue: https://github.com/elastic/elasticsearch/issues/106113
- class: org.elasticsearch.smoketest.MlWithSecurityIT
method: test {yaml=ml/3rd_party_deployment/Test start and stop multiple deployments}
issue: https://github.com/elastic/elasticsearch/issues/101458

# Examples:
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ String build() {
public static String getImageName(Distribution distribution) {
String suffix = switch (distribution.packaging) {
case DOCKER -> "";
case DOCKER_UBI -> "-ubi8";
case DOCKER_UBI -> "-ubi";
case DOCKER_IRON_BANK -> "-ironbank";
case DOCKER_CLOUD -> "-cloud";
case DOCKER_CLOUD_ESS -> "-cloud-ess";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ ignore_above mapping level setting on arrays:
match_all: {}

- length: { hits.hits: 1 }
#TODO: synthetic source field reconstruction bug (TBD: add link to the issue here)
#- match: { hits.hits.0._source.keyword: ["foo bar", "the quick brown fox"] }
- match: { hits.hits.0._source.keyword: ["foo bar", "the quick brown fox"] }
- match: { hits.hits.0._source.flattened.value: [ "jumps over", "the quick brown fox" ] }
- match: { hits.hits.0.fields.keyword.0: "foo bar" }
- match: { hits.hits.0.fields.flattened.0.value: "jumps over" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ protected BytesRef preserve(BytesRef value) {
});
}

if (fieldType().ignoreAbove != ignoreAboveDefault) {
if (fieldType().ignoreAbove != Integer.MAX_VALUE) {
layers.add(new CompositeSyntheticFieldLoader.StoredFieldLayer(originalName()) {
@Override
protected void writeValue(Object value, XContentBuilder b) throws IOException {
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@ tasks.named("precommit").configure {

tasks.named("yamlRestCompatTestTransform").configure({ task ->
task.skipTest("security/10_forbidden/Test bulk response with invalid credentials", "warning does not exist for compatibility")
task.skipTest("wildcard/30_ignore_above_synthetic_source/wildcard field type ignore_above", "Temporary until backported")
})

Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ wildcard field type ignore_above:
- length: { hits.hits: 1 }
- match: { hits.hits.0._source.a_wildcard: "foo bar" }
- match: { hits.hits.0._source.b_wildcard: "the quick brown" }
- match: { hits.hits.0._source.c_wildcard: ["bar", "foo"] }
- match: { hits.hits.0._source.c_wildcard: ["bar", "foo", "jumps over the lazy dog"] }
- match: { hits.hits.0._source.d_wildcard: ["bar", "foo", "the quick"] }
- match: { hits.hits.0.fields.a_wildcard.0: "foo bar" }
- match: { hits.hits.0.fields.b_wildcard.0: "the quick brown" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ public FieldMapper.Builder getMergeBuilder() {
protected SyntheticSourceSupport syntheticSourceSupport() {
var layers = new ArrayList<CompositeSyntheticFieldLoader.Layer>();
layers.add(new WildcardSyntheticFieldLoader());
if (ignoreAbove != ignoreAboveDefault) {
if (ignoreAbove != Integer.MAX_VALUE) {
layers.add(new CompositeSyntheticFieldLoader.StoredFieldLayer(originalName()) {
@Override
protected void writeValue(Object value, XContentBuilder b) throws IOException {
Expand Down

0 comments on commit 08a01bb

Please sign in to comment.