Skip to content

Commit

Permalink
Merge branch 'main' into kderusso/sparse-vector-semantic-text-field
Browse files Browse the repository at this point in the history
  • Loading branch information
kderusso authored Dec 16, 2024
2 parents 05c45e2 + 8e98868 commit 3e5e09c
Show file tree
Hide file tree
Showing 41 changed files with 2,493 additions and 295 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ resources:

# List of project maintainers
maintainers:
- name: "Rory Hunter"
email: "[email protected]"
username: "rory"
- name: "Mark Vieira"
email: "[email protected]"
username: "mark-vieira"
- name: "Rene Gröschke"
email: "[email protected]"
username: "breskeby"
- email: "[email protected]"
name: "Alexander Klepal"
username: "alexander.klepal"
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/117581.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 117581
summary: Make reserved built-in roles queryable
area: Authorization
type: enhancement
issues: []
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ tests:
- class: org.elasticsearch.packaging.test.WindowsServiceTests
method: test33JavaChanged
issue: https://github.com/elastic/elasticsearch/issues/113177
- class: org.elasticsearch.smoketest.MlWithSecurityIT
method: test {yaml=ml/sparse_vector_search/Test sparse_vector search with query vector and pruning config}
issue: https://github.com/elastic/elasticsearch/issues/108997
- class: org.elasticsearch.packaging.test.WindowsServiceTests
method: test80JavaOptsInEnvVar
issue: https://github.com/elastic/elasticsearch/issues/113219
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ protected static void wipeAllIndices(boolean preserveSecurityIndices) throws IOE
}
}

private static boolean ignoreSystemIndexAccessWarnings(List<String> warnings) {
protected static boolean ignoreSystemIndexAccessWarnings(List<String> warnings) {
for (String warning : warnings) {
if (warning.startsWith("this request accesses system indices:")) {
SUITE_LOGGER.warn("Ignoring system index access warning during test cleanup: {}", warning);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.List;

import static org.elasticsearch.xpack.esql.CsvTestUtils.isEnabled;
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.JOIN_LOOKUP_V5;
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.JOIN_LOOKUP_V6;
import static org.elasticsearch.xpack.esql.qa.rest.EsqlSpecTestCase.Mode.ASYNC;

public class MixedClusterEsqlSpecIT extends EsqlSpecTestCase {
Expand Down Expand Up @@ -96,7 +96,7 @@ protected boolean supportsInferenceTestService() {

@Override
protected boolean supportsIndexModeLookup() throws IOException {
return hasCapabilities(List.of(JOIN_LOOKUP_V5.capabilityName()));
return hasCapabilities(List.of(JOIN_LOOKUP_V6.capabilityName()));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import static org.elasticsearch.xpack.esql.EsqlTestUtils.classpathResources;
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.INLINESTATS;
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.INLINESTATS_V2;
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.JOIN_LOOKUP_V5;
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.JOIN_LOOKUP_V6;
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.JOIN_PLANNING_V1;
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.METADATA_FIELDS_REMOTE_TEST;
import static org.elasticsearch.xpack.esql.qa.rest.EsqlSpecTestCase.Mode.SYNC;
Expand Down Expand Up @@ -124,7 +124,7 @@ protected void shouldSkipTest(String testName) throws IOException {
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains(INLINESTATS.capabilityName()));
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains(INLINESTATS_V2.capabilityName()));
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains(JOIN_PLANNING_V1.capabilityName()));
assumeFalse("LOOKUP JOIN not yet supported in CCS", testCase.requiredCapabilities.contains(JOIN_LOOKUP_V5.capabilityName()));
assumeFalse("LOOKUP JOIN not yet supported in CCS", testCase.requiredCapabilities.contains(JOIN_LOOKUP_V6.capabilityName()));
}

private TestFeatureService remoteFeaturesService() throws IOException {
Expand Down Expand Up @@ -283,8 +283,8 @@ protected boolean supportsInferenceTestService() {

@Override
protected boolean supportsIndexModeLookup() throws IOException {
// CCS does not yet support JOIN_LOOKUP_V5 and clusters falsely report they have this capability
// return hasCapabilities(List.of(JOIN_LOOKUP_V5.capabilityName()));
// CCS does not yet support JOIN_LOOKUP_V6 and clusters falsely report they have this capability
// return hasCapabilities(List.of(JOIN_LOOKUP_V6.capabilityName()));
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.xcontent.XContentType;
import org.elasticsearch.xpack.esql.AssertWarnings;
import org.elasticsearch.xpack.esql.action.EsqlCapabilities;
import org.junit.After;
import org.junit.Assert;

Expand Down Expand Up @@ -219,6 +220,16 @@ public void testIndicesDontExist() throws IOException {
assertEquals(404, e.getResponse().getStatusLine().getStatusCode());
assertThat(e.getMessage(), containsString("index_not_found_exception"));
assertThat(e.getMessage(), containsString("no such index [foo]"));

if (EsqlCapabilities.Cap.JOIN_LOOKUP_V6.isEnabled()) {
e = expectThrows(
ResponseException.class,
() -> runEsql(timestampFilter("gte", "2020-01-01").query("FROM test1 | LOOKUP JOIN foo ON id1"))
);
assertEquals(400, e.getResponse().getStatusLine().getStatusCode());
assertThat(e.getMessage(), containsString("verification_exception"));
assertThat(e.getMessage(), containsString("Unknown index [foo]"));
}
}

private static RestEsqlTestCase.RequestObjectBuilder timestampFilter(String op, String date) throws IOException {
Expand Down
Loading

0 comments on commit 3e5e09c

Please sign in to comment.