Skip to content

Commit 2cae184

Browse files
committed
Merge branch 'main' of github.com:elastic/elasticsearch into bugfix/fix-priveledges-in-system-migration-block-main
2 parents 1d907cd + 385a4a6 commit 2cae184

File tree

4 files changed

+35
-10
lines changed

4 files changed

+35
-10
lines changed

.buildkite/scripts/dra-workflow.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WORKFLOW="${DRA_WORKFLOW:-snapshot}"
66
BRANCH="${BUILDKITE_BRANCH:-}"
77

88
# Don't publish main branch to staging
9-
if [[ "$BRANCH" == *.x && "$WORKFLOW" == "staging" ]]; then
9+
if [[ ("$BRANCH" == "main" || "$BRANCH" == *.x) && "$WORKFLOW" == "staging" ]]; then
1010
exit 0
1111
fi
1212

.buildkite/scripts/dra-workflow.trigger.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ echo "steps:"
77
source .buildkite/scripts/branches.sh
88

99
for BRANCH in "${BRANCHES[@]}"; do
10-
if [[ "$BRANCH" == "main" ]]; then
11-
export VERSION_QUALIFIER="alpha1"
10+
if [[ "$BRANCH" == "9.0" ]]; then
11+
export VERSION_QUALIFIER="beta1"
1212
fi
1313

1414
INTAKE_PIPELINE_SLUG="elasticsearch-intake"

muted-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,6 @@ tests:
267267
- class: org.elasticsearch.datastreams.DataStreamsClientYamlTestSuiteIT
268268
method: test {p0=data_stream/140_data_stream_aliases/Create data stream alias with filter}
269269
issue: https://github.com/elastic/elasticsearch/issues/121014
270-
- class: org.elasticsearch.xpack.esql.parser.StatementParserTests
271-
method: testNamedFunctionArgumentInMap
272-
issue: https://github.com/elastic/elasticsearch/issues/121020
273270
- class: org.elasticsearch.xpack.security.profile.ProfileIntegTests
274271
method: testSuggestProfilesWithName
275272
issue: https://github.com/elastic/elasticsearch/issues/121022
@@ -370,6 +367,9 @@ tests:
370367
issue: https://github.com/elastic/elasticsearch/issues/121293
371368
- class: org.elasticsearch.xpack.inference.common.InferenceServiceNodeLocalRateLimitCalculatorTests
372369
issue: https://github.com/elastic/elasticsearch/issues/121294
370+
- class: org.elasticsearch.env.NodeEnvironmentTests
371+
method: testGetBestDowngradeVersion
372+
issue: https://github.com/elastic/elasticsearch/issues/121316
373373

374374
# Examples:
375375
#

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/StatementParserTests.java

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2466,8 +2466,29 @@ by fn2(f3, {"option1":["string1","string2"],"option2":[1,2,3],"option3":2.0,"opt
24662466
assertEquals(List.of(referenceAttribute("bar", KEYWORD)), dissect.extractedFields());
24672467
UnresolvedRelation ur = as(dissect.child(), UnresolvedRelation.class);
24682468
assertEquals(ur, relation("test"));
2469+
}
24692470

2471+
public void testNamedFunctionArgumentInMapWithNamedParameters() {
24702472
// map entry values provided in named parameter, arrays are not supported by named parameters yet
2473+
assumeTrue(
2474+
"named parameters for identifiers and patterns require snapshot build",
2475+
EsqlCapabilities.Cap.NAMED_PARAMETER_FOR_FIELD_AND_FUNCTION_NAMES_SIMPLIFIED_SYNTAX.isEnabled()
2476+
);
2477+
LinkedHashMap<String, Object> expectedMap1 = new LinkedHashMap<>(4);
2478+
expectedMap1.put("option1", "string");
2479+
expectedMap1.put("option2", 1);
2480+
expectedMap1.put("option3", List.of(2.0, 3.0, 4.0));
2481+
expectedMap1.put("option4", List.of(true, false));
2482+
LinkedHashMap<String, Object> expectedMap2 = new LinkedHashMap<>(4);
2483+
expectedMap2.put("option1", List.of("string1", "string2"));
2484+
expectedMap2.put("option2", List.of(1, 2, 3));
2485+
expectedMap2.put("option3", 2.0);
2486+
expectedMap2.put("option4", true);
2487+
LinkedHashMap<String, Object> expectedMap3 = new LinkedHashMap<>(4);
2488+
expectedMap3.put("option1", "string");
2489+
expectedMap3.put("option2", 2.0);
2490+
expectedMap3.put("option3", List.of(1, 2, 3));
2491+
expectedMap3.put("option4", List.of(true, false));
24712492
assertEquals(
24722493
new Filter(
24732494
EMPTY,
@@ -2565,7 +2586,7 @@ by fn2(f3, {"option1":["string1","string2"],"option2":[1,2,3],"option3":2.0,"opt
25652586
)
25662587
);
25672588

2568-
plan = statement(
2589+
LogicalPlan plan = statement(
25692590
"""
25702591
from test
25712592
| dissect ?fn1(?n1, ?n2, {"option1":?n3,"option2":?n4,"option3":[2.0,3.0,4.0],"option4":[true,false]}) "%{bar}"
@@ -2585,16 +2606,16 @@ by fn2(f3, {"option1":["string1","string2"],"option2":[1,2,3],"option3":2.0,"opt
25852606
)
25862607
)
25872608
);
2588-
grok = as(plan, Grok.class);
2609+
Grok grok = as(plan, Grok.class);
25892610
assertEquals(function("fn2", List.of(attribute("f3"), mapExpression(expectedMap2))), grok.input());
25902611
assertEquals("%{WORD:foo}", grok.parser().pattern());
25912612
assertEquals(List.of(referenceAttribute("foo", KEYWORD)), grok.extractedFields());
2592-
dissect = as(grok.child(), Dissect.class);
2613+
Dissect dissect = as(grok.child(), Dissect.class);
25932614
assertEquals(function("fn1", List.of(attribute("f1"), attribute("f2"), mapExpression(expectedMap1))), dissect.input());
25942615
assertEquals("%{bar}", dissect.parser().pattern());
25952616
assertEquals("", dissect.parser().appendSeparator());
25962617
assertEquals(List.of(referenceAttribute("bar", KEYWORD)), dissect.extractedFields());
2597-
ur = as(dissect.child(), UnresolvedRelation.class);
2618+
UnresolvedRelation ur = as(dissect.child(), UnresolvedRelation.class);
25982619
assertEquals(ur, relation("test"));
25992620
}
26002621

@@ -2860,6 +2881,10 @@ public void testNamedFunctionArgumentInInvalidPositions() {
28602881
}
28612882

28622883
public void testNamedFunctionArgumentWithUnsupportedNamedParameterTypes() {
2884+
assumeTrue(
2885+
"named parameters for identifiers and patterns require snapshot build",
2886+
EsqlCapabilities.Cap.NAMED_PARAMETER_FOR_FIELD_AND_FUNCTION_NAMES_SIMPLIFIED_SYNTAX.isEnabled()
2887+
);
28632888
Map<String, String> commands = Map.ofEntries(
28642889
Map.entry("eval x = {}", "29"),
28652890
Map.entry("where {}", "26"),

0 commit comments

Comments
 (0)