From f121e09fbbfe5adee3198620dfd3840e2c792297 Mon Sep 17 00:00:00 2001
From: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Date: Tue, 12 Nov 2024 10:59:20 +0100
Subject: [PATCH 1/7] [DOCS] Connectors 8.16.0 release notes (#115856)
---
.../docs/connectors-release-notes.asciidoc | 10 +++-
.../connectors-release-notes-8.16.0.asciidoc | 53 +++++++++++++++++++
2 files changed, 61 insertions(+), 2 deletions(-)
create mode 100644 docs/reference/connector/docs/release-notes/connectors-release-notes-8.16.0.asciidoc
diff --git a/docs/reference/connector/docs/connectors-release-notes.asciidoc b/docs/reference/connector/docs/connectors-release-notes.asciidoc
index 723671b049bf2..e1ed082365c00 100644
--- a/docs/reference/connector/docs/connectors-release-notes.asciidoc
+++ b/docs/reference/connector/docs/connectors-release-notes.asciidoc
@@ -4,7 +4,13 @@
Release notes
++++
-[INFO]
+[NOTE]
====
-Prior to version 8.16.0, the connector release notes were published as part of the https://www.elastic.co/guide/en/enterprise-search/current/changelog.html[Enterprise Search documentation].
+Prior to version *8.16.0*, the connector release notes were published as part of the {enterprise-search-ref}/changelog.html[Enterprise Search documentation].
====
+
+*Release notes*:
+
+* <>
+
+include::release-notes/connectors-release-notes-8.16.0.asciidoc[]
diff --git a/docs/reference/connector/docs/release-notes/connectors-release-notes-8.16.0.asciidoc b/docs/reference/connector/docs/release-notes/connectors-release-notes-8.16.0.asciidoc
new file mode 100644
index 0000000000000..7608336073176
--- /dev/null
+++ b/docs/reference/connector/docs/release-notes/connectors-release-notes-8.16.0.asciidoc
@@ -0,0 +1,53 @@
+[[es-connectors-release-notes-8-16-0]]
+=== 8.16.0 connectors release notes
+
+[discrete]
+[[es-connectors-release-notes-deprecation-notice]]
+==== Deprecation notices
+
+* *Direct index access for connectors and sync jobs*
++
+IMPORTANT: Directly accessing connector and sync job state through `.elastic-connectors*` indices is deprecated, and will be disallowed entirely in a future release.
+
+* Instead, the Elasticsearch Connector APIs should be used. Connectors framework code now uses the <> by default.
+See https://github.com/elastic/connectors/pull/2884[*PR 2902*].
+
+* *Docker `enterprise-search` namespace deprecation*
++
+IMPORTANT: The `enterprise-search` Docker namespace is deprecated and will be discontinued in a future release.
++
+Starting in `8.16.0`, Docker images are being transitioned to the new `integrations` namespace, which will become the sole location for future releases. This affects the https://github.com/elastic/connectors[Elastic Connectors] and https://github.com/elastic/data-extraction-service[Elastic Data Extraction Service].
++
+During this transition period, images are published to both namespaces:
++
+** *Example*:
++
+Deprecated namespace::
+`docker.elastic.co/enterprise-search/elastic-connectors:v8.16.0`
++
+New namespace::
+`docker.elastic.co/integrations/elastic-connectors:v8.16.0`
++
+Users should migrate to the new `integrations` namespace as soon as possible to ensure continued access to future releases.
+
+[discrete]
+[[es-connectors-release-notes-8-16-0-enhancements]]
+==== Enhancements
+
+* Docker images now use Chainguard's Wolfi base image (`docker.elastic.co/wolfi/jdk:openjdk-11-dev`), replacing the previous `ubuntu:focal` base.
+
+* The Sharepoint Online connector now works with the `Sites.Selected` permission instead of the broader permission `Sites.Read.All`.
+See https://github.com/elastic/connectors/pull/2762[*PR 2762*].
+
+* Starting in 8.16.0, connectors will start using proper SEMVER, with `MAJOR.MINOR.PATCH`, which aligns with Elasticsearch/Kibana versions. This drops the previous `.BUILD` suffix, which we used to release connectors between Elastic stack releases. Going forward, these inter-stack-release releases will be suffixed instead with `+`, aligning with Elastic Agent and conforming to SEMVER.
+See https://github.com/elastic/connectors/pull/2749[*PR 2749*].
+
+* Connector logs now use UTC timestamps, instead of machine-local timestamps. This only impacts logging output.
+See https://github.com/elastic/connectors/pull/2695[*PR 2695*].
+
+[discrete]
+[[es-connectors-release-notes-8-16-0-bug-fixes]]
+==== Bug fixes
+
+* The Dropbox connector now fetches the files from team shared folders.
+See https://github.com/elastic/connectors/pull/2718[*PR 2718*].
\ No newline at end of file
From d34c5630cae240dafb2134441cf132d4280e1ce7 Mon Sep 17 00:00:00 2001
From: David Kyle
Date: Tue, 12 Nov 2024 10:43:19 +0000
Subject: [PATCH 2/7] [ML] Avoid the .ml-stats index in post test cleanup
(#116476)
Fixes ml yaml rest tests failing in the post clean up with a search_phase_execution_exception
against the .ml-stats index. The fix is to use another method to find reference ingest pipelines
avoid the call to _ml/trained_models/_stats
---
muted-tests.yml | 51 -------------------
.../integration/MlRestTestStateCleaner.java | 44 ++++++++--------
2 files changed, 21 insertions(+), 74 deletions(-)
diff --git a/muted-tests.yml b/muted-tests.yml
index 3273b203b0982..ddd806d49ae5f 100644
--- a/muted-tests.yml
+++ b/muted-tests.yml
@@ -17,9 +17,6 @@ tests:
- class: org.elasticsearch.smoketest.WatcherYamlRestIT
method: test {p0=watcher/usage/10_basic/Test watcher usage stats output}
issue: https://github.com/elastic/elasticsearch/issues/112189
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/inference_processor/Test create processor with missing mandatory fields}
- issue: https://github.com/elastic/elasticsearch/issues/112191
- class: org.elasticsearch.xpack.esql.action.ManyShardsIT
method: testRejection
issue: https://github.com/elastic/elasticsearch/issues/112406
@@ -142,9 +139,6 @@ tests:
- class: org.elasticsearch.search.SearchServiceTests
method: testParseSourceValidation
issue: https://github.com/elastic/elasticsearch/issues/115936
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/inference_crud/Test delete given model referenced by pipeline}
- issue: https://github.com/elastic/elasticsearch/issues/115970
- class: org.elasticsearch.index.reindex.ReindexNodeShutdownIT
method: testReindexWithShutdown
issue: https://github.com/elastic/elasticsearch/issues/115996
@@ -168,48 +162,27 @@ tests:
- class: org.elasticsearch.xpack.ml.integration.DatafeedJobsRestIT
method: testLookbackWithIndicesOptions
issue: https://github.com/elastic/elasticsearch/issues/116127
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/inference_crud/Test delete given model with alias referenced by pipeline}
- issue: https://github.com/elastic/elasticsearch/issues/116133
- class: org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT
method: test {categorize.Categorize SYNC}
issue: https://github.com/elastic/elasticsearch/issues/113054
- class: org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT
method: test {categorize.Categorize ASYNC}
issue: https://github.com/elastic/elasticsearch/issues/113055
-- class: org.elasticsearch.xpack.inference.InferenceRestIT
- method: test {p0=inference/40_semantic_text_query/Query a field that uses the default ELSER 2 endpoint}
- issue: https://github.com/elastic/elasticsearch/issues/114376
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/inference_crud/Test force delete given model with alias referenced by pipeline}
- issue: https://github.com/elastic/elasticsearch/issues/116136
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
method: test {p0=transform/transforms_start_stop/Test start already started transform}
issue: https://github.com/elastic/elasticsearch/issues/98802
- class: org.elasticsearch.action.search.SearchPhaseControllerTests
method: testProgressListener
issue: https://github.com/elastic/elasticsearch/issues/116149
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/forecast/Test forecast unknown job}
- issue: https://github.com/elastic/elasticsearch/issues/116150
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
method: test {p0=terms_enum/10_basic/Test security}
issue: https://github.com/elastic/elasticsearch/issues/116178
- class: org.elasticsearch.search.basic.SearchWithRandomDisconnectsIT
method: testSearchWithRandomDisconnects
issue: https://github.com/elastic/elasticsearch/issues/116175
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/start_stop_datafeed/Test start datafeed given index pattern with no matching indices}
- issue: https://github.com/elastic/elasticsearch/issues/116220
- class: org.elasticsearch.search.basic.SearchWhileRelocatingIT
method: testSearchAndRelocateConcurrentlyRandomReplicas
issue: https://github.com/elastic/elasticsearch/issues/116145
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/filter_crud/Test update filter}
- issue: https://github.com/elastic/elasticsearch/issues/116271
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/get_datafeeds/Test explicit get all datafeeds}
- issue: https://github.com/elastic/elasticsearch/issues/116284
- class: org.elasticsearch.xpack.deprecation.DeprecationHttpIT
method: testDeprecatedSettingsReturnWarnings
issue: https://github.com/elastic/elasticsearch/issues/108628
@@ -231,24 +204,9 @@ tests:
- class: org.elasticsearch.threadpool.SimpleThreadPoolIT
method: testThreadPoolMetrics
issue: https://github.com/elastic/elasticsearch/issues/108320
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/jobs_crud/Test put job deprecated bucket span}
- issue: https://github.com/elastic/elasticsearch/issues/116419
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/explain_data_frame_analytics/Test both job id and body}
- issue: https://github.com/elastic/elasticsearch/issues/116433
-- class: org.elasticsearch.smoketest.MlWithSecurityIT
- method: test {yaml=ml/inference_crud/Test force delete given model with alias referenced by pipeline}
- issue: https://github.com/elastic/elasticsearch/issues/116443
- class: org.elasticsearch.xpack.downsample.ILMDownsampleDisruptionIT
method: testILMDownsampleRollingRestart
issue: https://github.com/elastic/elasticsearch/issues/114233
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/data_frame_analytics_crud/Test put config with unknown field in outlier detection analysis}
- issue: https://github.com/elastic/elasticsearch/issues/116458
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/evaluate_data_frame/Test outlier_detection with query}
- issue: https://github.com/elastic/elasticsearch/issues/116484
- class: org.elasticsearch.xpack.kql.query.KqlQueryBuilderTests
issue: https://github.com/elastic/elasticsearch/issues/116487
- class: org.elasticsearch.reservedstate.service.FileSettingsServiceTests
@@ -263,12 +221,6 @@ tests:
- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusLogsIndexModeRandomDataDynamicMappingChallengeRestIT
method: testMatchAllQuery
issue: https://github.com/elastic/elasticsearch/issues/116536
-- class: org.elasticsearch.xpack.test.rest.XPackRestIT
- method: test {p0=ml/inference_crud/Test force delete given model referenced by pipeline}
- issue: https://github.com/elastic/elasticsearch/issues/116555
-- class: org.elasticsearch.smoketest.MlWithSecurityIT
- method: test {yaml=ml/data_frame_analytics_crud/Test delete given stopped config}
- issue: https://github.com/elastic/elasticsearch/issues/116608
- class: org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT
method: test {categorize.Categorize}
issue: https://github.com/elastic/elasticsearch/issues/116434
@@ -284,9 +236,6 @@ tests:
- class: org.elasticsearch.packaging.test.BootstrapCheckTests
method: test20RunWithBootstrapChecks
issue: https://github.com/elastic/elasticsearch/issues/116620
-- class: org.elasticsearch.smoketest.MlWithSecurityIT
- method: test {yaml=ml/inference_crud/Test force delete given model referenced by pipeline}
- issue: https://github.com/elastic/elasticsearch/issues/116624
- class: org.elasticsearch.packaging.test.DockerTests
method: test011SecurityEnabledStatus
issue: https://github.com/elastic/elasticsearch/issues/116628
diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/integration/MlRestTestStateCleaner.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/integration/MlRestTestStateCleaner.java
index 6f6224d505327..25d9509ecdc7a 100644
--- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/integration/MlRestTestStateCleaner.java
+++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/integration/MlRestTestStateCleaner.java
@@ -10,14 +10,15 @@
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
-import org.elasticsearch.common.xcontent.support.XContentMapValues;
import org.elasticsearch.test.rest.ESRestTestCase;
import java.io.IOException;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Set;
-import java.util.stream.Collectors;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.hasSize;
public class MlRestTestStateCleaner {
@@ -30,24 +31,29 @@ public MlRestTestStateCleaner(Logger logger, RestClient adminClient) {
}
public void resetFeatures() throws IOException {
- waitForMlStatsIndexToInitialize();
- deleteAllTrainedModelIngestPipelines();
+ deletePipelinesWithInferenceProcessors();
// This resets all features, not just ML, but they should have been getting reset between tests anyway so it shouldn't matter
adminClient.performRequest(new Request("POST", "/_features/_reset"));
}
@SuppressWarnings("unchecked")
- private void deleteAllTrainedModelIngestPipelines() throws IOException {
- final Request getAllTrainedModelStats = new Request("GET", "/_ml/trained_models/_stats");
- getAllTrainedModelStats.addParameter("size", "10000");
- final Response trainedModelsStatsResponse = adminClient.performRequest(getAllTrainedModelStats);
+ private void deletePipelinesWithInferenceProcessors() throws IOException {
+ final Response pipelinesResponse = adminClient.performRequest(new Request("GET", "/_ingest/pipeline"));
+ final Map pipelines = ESRestTestCase.entityAsMap(pipelinesResponse);
+
+ var pipelinesWithInferenceProcessors = new HashSet();
+ for (var entry : pipelines.entrySet()) {
+ var pipelineDef = (Map) entry.getValue(); // each top level object is a separate pipeline
+ var processors = (List