Commit graph

2349 commits

Author SHA1 Message Date
Joe Gallo
eac54624fb
Fix log message format bugs (#118354) (#118386) 2024-12-11 09:09:35 +11:00
Nhat Nguyen
952df62bc2
Deprecate source mode in mappings (#117177) (#117527)
Backport of #116689 to 8.17

This change deprecates _source.mode in mappings, replacing it with
the index.mapping.source.mode index setting.
2024-11-25 20:26:52 -08:00
Rene Groeschke
20a78a18e9
[8.17] [Gradle] Remove static use of BuildParams (#115122) (#117433)
* [Gradle] Remove static use of BuildParams (#115122)

Static fields dont do well in Gradle with configuration cache enabled.

- Use buildParams extension in build scripts
- Keep BuildParams.ci for now for easy serverless migration
-  Tweak testing doc

(cherry picked from commit 13c8aaeffa)

# Conflicts:
#	TESTING.asciidoc
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/RestTestBasePlugin.java
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/compat/compat/AbstractYamlRestCompatTestPlugin.java
#	build.gradle
#	modules/ingest-geoip/qa/full-cluster-restart/build.gradle
#	qa/mixed-cluster/build.gradle
#	x-pack/plugin/ent-search/qa/full-cluster-restart/build.gradle
#	x-pack/plugin/eql/qa/rest/build.gradle
#	x-pack/plugin/fleet/qa/rest/build.gradle
#	x-pack/plugin/kql/build.gradle
#	x-pack/plugin/mapper-unsigned-long/build.gradle
#	x-pack/plugin/ml/qa/multi-cluster-tests-with-security/build.gradle
#	x-pack/plugin/security/qa/multi-cluster/build.gradle
#	x-pack/plugin/sql/qa/jdbc/build.gradle
#	x-pack/plugin/transform/qa/multi-cluster-tests-with-security/build.gradle

* Some cleanup

* Update build.gradle

fix buildparams access
2024-11-25 18:29:26 +01:00
Martijn van Groningen
1bc60acdef
Revert "Deprecate _source.mode in mappings (#117106)" (#117151)
This reverts #117106. Bwc tests fail, because older nodes are killed with the following error:

```
[2024-11-20T10:54:58,600][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [v8.17.0-0] fatal error in thread [elasticsearch[v8.17.0-0
][clusterApplierService#updateTask][T#1]], exiting java.lang.AssertionError: provided source [{"_doc":{"_data_stream_timestamp":{"enabled":true},"_source":{},"properties":{"@timestamp":{"type":"date"},"k8s":{"properties":{"pod":{"properties":{"ip":{"type":"ip"},"name":{"type":"keyword"},"network":{"properties":{"rx":{"type":"long"},"tx":{"type":"long"}}},"uid":{"type":"keyword","time_series_dimension":true}}}}},"metricset":{"type":"keyword","time_series_dimension":true}}}}] differs from mapping [{"_doc":{"_data_stream_timestamp":{"enabled":true},"_source":{"mode":"synthetic"},"properties":{"@timestamp":{"type":"date"},"k8s":{"properties":{"pod":{"properties":{"ip":{"type":"ip"},"name":{"type":"keyword"},"network":{"properties":{"rx":{"type":"long"},"tx":{"type":"long"}}},"uid":{"type":"keyword","time_series_dimension":true}}}}},"metricset":{"type":"keyword","time_series_dimension":true}}}}]
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.index.mapper.DocumentMapper.<init>(DocumentMapper.java:66)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.index.mapper.MapperService.newDocumentMapper(MapperService.java:588)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.index.mapper.MapperService.updateMapping(MapperService.java:346)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.index.IndexService.updateMapping(IndexService.java:840)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.indices.cluster.IndicesClusterStateService.createIndicesAndUpdateShards(IndicesClusterStateService.java:583)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.indices.cluster.IndicesClusterStateService.doApplyClusterState(IndicesClusterStateService.java:306)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.indices.cluster.IndicesClusterStateService.applyClusterState(IndicesClusterStateService.java:260)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:544)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:530)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:503)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:432)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:157)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:956)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:218)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:184)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.lang.Thread.run(Thread.java:1575)
```

The `mode` parameter no longer gets serialized for new indices. However on the older nodes still serialize the `mode` parameter, which caused the menioned assertion to fail. Reverting for now and see how best to address this bwc serialization issue.

We can only stop serializing mode, when all nodes are on the same version.  Unfortunately we can't invoke `c.clusterTransportVersion().get()` from parser or builder, because that calling thread isn't allowed to call `clusterService.state()`.
2024-11-20 13:39:07 +01:00
Nhat Nguyen
e63367eaec
Deprecate _source.mode in mappings (#116689) (#117106)
This change deprecates _source.mode in mappings, replacing it with the
index.mapping.source.mode index setting.
2024-11-20 17:51:22 +11:00
Mark Vieira
08705d79d4
Simplify entitlement agent REST tests (#116779) (#116822) 2024-11-15 03:09:57 +11:00
Simon Cooper
2811a76718
[8.x] Make snapshot restore release version check more lenient (#116727) (#116802)
* Make snapshot restore release version check more lenient (#116727)

* Fix stray change
2024-11-14 23:01:09 +11:00
Lorenzo Dematté
cb4485e168
[Entitlements] External IT test for checkSystemExit (#116435) (#116705) 2024-11-13 20:41:48 +11:00
Lorenzo Dematté
d698e72af3
[8.x] Add a cluster listener to fix missing system index mappings after upgrade (#115771)
This PR modifies `TransportVersionsFixupListener` to include all of
compatibility versions (not only TransportVersion) in the fixup.

`TransportVersionsFixupListener` spots the instances when the master has
been upgraded to the most recent code version, along with non-master
nodes, but some nodes are missing a "proper" (non-inferred) Transport
version. This PR adds another check to also ensure that we have real
(non-empty) system index mapping versions.

To do so, it modifies NodeInfo so it carries all of
CompatibilityVersions (TransportVersion +
SystemIndexDescriptor.MappingVersions).

This was initially done via a separate fixup listener + ad-hoc transport
action, but the 2 listeners "raced" to update ClusterState on the same
CompatibilityVersions structure; it just made sense to do it at the same
time.

The fixup is very similar to
https://github.com/elastic/elasticsearch/pull/110710, which does the
same for cluster features; plus, it adds a CI test to cover the bug
raised in https://github.com/elastic/elasticsearch/issues/112694

Closes https://github.com/elastic/elasticsearch/issues/112694
2024-11-12 05:45:10 +11:00
Mariusz Józala
11fa0520b1
[8.x] [TEST] Migrated REST tests extending JsonLogsIntegTestCase (#115188) (#116025)
* [TEST] Migrated REST tests extending JsonLogsIntegTestCase (#115188)

REST tests extending JsonLogsIntegTestCase migrated to the new REST
testing framework, using 'elasticsearch.internal-java-rest-test' Gradle
plugin
Explicit handling of test single-cluster config by checking if cluster
is explicitly configured as single-node to avoid an incorrect configuration
which may cause split brain.

Replaced `ElasticsearchJavaPlugin` with `ElasticsearchJavaBasePlugin` in
 `RestTestBasePlugin` for better granularity.
Additionally, updated the `DistributionDownloadPlugin` to set configurations as
non-consumable and the `InternalDistributionArchiveSetupPlugin` to mark
certain configurations as consumable. This ensures that configurations
are correctly utilized during build setup and execution phases.

(cherry picked from commit 130cc74d8a)

* Fixed DefaultSettingsProvider to use Java 17 (#116029)

It is needed to be able to backport the change to the 8.x.
Having same code for both versions can help us to avoid some merge
conflicts in the future.
2024-11-04 20:59:59 +11:00
Martijn van Groningen
43aa301688
[8.x] Add more tsdb and logsdb rolling upgrade indexing tests. (#115760)
Backport #115639 to 8.x branch.

The main difference between other rolling upgrade tests is that these tests index more data while performing the rolling upgrade and no rollover is performed during rolling upgrade. For example this makes it more likely for merging to happen, which could uncover bwc bugs.

Note that currently both test suites start trial license so that synthetic source gets used.
2024-10-31 09:08:36 +01:00
Ryan Ernst
dedf9fd6d7
Use directory name as project name for libs (#115720) (#115984)
* Use directory name as project name for libs (#115720)

The libs projects are configured to all begin with `elasticsearch-`.
While this is desireable for the artifacts to contain this consistent
prefix, it means the project names don't match up with their
directories. Additionally, it creates complexities for subproject naming
that must be manually adjusted.

This commit adjusts the project names for those under libs to be their
directory names. The resulting artifacts for these libs are kept the
same, all beginning with `elasticsearch-`.

* fixes
2024-10-31 07:52:10 +11:00
Nikolaj Volgushev
d359e9ae59
[8.x] Add ECK Role Mapping Cleanup (115823) (#115873)
* Backport

* Version fix

* Another

* Fix

* Fix again

* Skip

* One more

* Formatting fix

---------

Co-authored-by: Johannes Fredén <109296772+jfreden@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-30 22:06:37 +11:00
Ryan Ernst
e58fb83006
Use jna cleaner thread filter in spawner tests (#115598)
This commit filters out jna cleaner threads specifically in the spawner
tests (which have a different set of filters from ESTestCase because
they extend LuceneTestCase).

closes #114555
2024-10-25 00:19:52 +02:00
Keith Massey
d3705e68d9
Fixing ingest simulate yaml rest test when there is a global legacy template (#115559) (#115599)
The ingest simulate yaml rest test `Test mapping addition works with
indices without templates` tests what happens when an index has a
mapping but matches no template at all. However, randomly and rarely a
global match-all legacy template is applied to the cluster. When this
happens, the assumptions for the test fail since the index matches a
template. This PR removes that global legacy template so that the test
works as intended. Closes #115412 Closes #115472
2024-10-25 09:15:42 +11:00
Keith Massey
d66b54f2b8
Fixing ingest simulate yaml rest test when global legacy template is present (#115586) (#115595)
Sometimes the test framework adds a global legacy template. When this
happens, a test that is using another legacy template to create an index
emits a warning since the index matches two legacy templates. This PR
allows that warning.
2024-10-25 08:33:58 +11:00
Rene Groeschke
2f3f6daea5
Remove unused elasticsearch cloud docker image (#115357) (#115572) 2024-10-25 04:01:25 +11:00
Nikolaj Volgushev
2e58124dcf
Fix FileSettingsRoleMappingUpgradeIT assertions (#115422) (#115469)
Fixes some faulty assertions in an upgrade test. Test failures only
manifest on the 8.16 branch since 9.x does not qualify for these upgrade
tests, and the change is not backported to 8.17 yet (unrelated CI
failures).

I validated this works by running it locally from the 8.16 branch.

Resolves: https://github.com/elastic/elasticsearch/issues/115410
Resolves: https://github.com/elastic/elasticsearch/issues/115411

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-24 19:43:19 +11:00
Ryan Ernst
564fcca8aa
Consolidate @Before of rolling upgrade tests (#114677) (#115444)
Multiple @Before methods in junit are run in random order. This commit
cosolidates the @Before methods of ParameterizedRollingUpgradeTestCase
since the code has interdependencies.

closes #114330
2024-10-24 05:52:14 +11:00
Nikolaj Volgushev
39dc460d88
Expose cluster-state role mappings in APIs (#114951) (#115392)
This PR exposes operator-defined, cluster-state role mappings in the
[Get role mappings
API](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html).


Cluster-state role mappings are returned with a reserved suffix
`-read-only-operator-mapping`, to disambiguate with native role mappings
stored in the security index. CS role mappings are also marked with a
`_read_only` metadata flag. It's possible to query a CS role mapping
using its name both with and without the suffix.  

CS role mappings can be viewed via the API, but cannot be modified. To
clarify this, the PUT and DELETE role mapping endpoints return header
warnings if native role mappings that name-clash with CS role mappings
are created, modified, or deleted. 

The PR also prevents the creation or role mappings with names ending in
`-read-only-operator-mapping` to ensure that CS role mappings and native
role mappings can always be fully disambiguated.

Finally, the PR changes how CS role mappings are persisted in
cluster-state. CS role mappings are written (and read from disk) in the
`XContent` format. This format omits the role mapping's name. This means
that if CS role mappings are ever recovered from disk (e.g., during a
master-node restart), their names are erased. To address this, this PR
changes CS role mapping serialization to persist the name of a mapping
in a reserved metadata field, and recover it from metadata during
serialization. This allows us to persist the name without BWC-breaks in
role mapping `XContent` format. It also allows us to ensure that role
mappings are re-written to cluster state in the new, name-preserving
format the first time operator file settings are processed.

Depends on: https://github.com/elastic/elasticsearch/pull/114295
Relates: ES-9628

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-24 02:29:27 +11:00
Keith Massey
9cf174f629
Adding support for simulate ingest mapping adddition for indices with mappings that do not come from templates (#115359) (#115369) 2024-10-23 09:00:31 +11:00
Keith Massey
35f7efefd1
Adding support for additional mapping to simulate ingest API (#114742) (#115284) 2024-10-22 08:13:33 -05:00
Kostas Krikellas
d4cb781192
[8.x] Change backwards test configuration to use trial license (#115226) (#115244)
* Change backwards test configuration to use trial license (#115226)

* Change backwards test configuration to use trial license

* unmute

(cherry picked from commit 5e761fe4d0)

# Conflicts:
#	muted-tests.yml

* Update muted-tests.yml
2024-10-21 18:55:34 +03:00
Nikolaj Volgushev
dd50942dc8
[8.x] Reprocess operator file settings on service start (#114295) (#115198)
* Reprocess operator file settings on service start (#114295)

Changes `FileSettingsService` to reprocess file settings on every
restart or master node change, even if versions match between file and
cluster-state metadata. If the file version is lower than the metadata
version, processing is still skipped to avoid applying stale settings. 

This makes it easier for consumers of file settings to change their
behavior w.r.t. file settings contents. For instance, an update of how
role mappings are stored will automatically apply on the next restart,
without the need to manually increment the file settings version to
force reprocessing. 

Relates: ES-9628

* Backport 114295

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-22 00:26:00 +11:00
Keith Massey
6e3ae9b047
Fixing a type in the expected warning in two ingest simulate yaml tests (#115141) 2024-10-18 15:59:25 -05:00
Tim Brooks
9922d544a1
Standardize error code when bulk body is invalid (#114869) (#114944)
Currently the incremental and non-incremental bulk variations will
return different error codes when the json body provided is invalid.
This commit ensures both version return status code 400. Additionally,
this renames the incremental rest tests to bulk tests and ensures that
all tests work with both bulk api versions. We set these tests to
randomize which version of the api we test each run.
2024-10-17 06:30:33 +11:00
David Turner
bdac01785a
Inline MockTransportService#getLocalDiscoNode() (#114883) (#114887)
This method just delegates to `getLocalNode()`, we may as well call the
more widely-used method with the shorter name directly.
2024-10-16 21:47:07 +11:00
Mariusz Józala
58781e2114
[8.x] [TEST] Migrated ccs-unavailable-clusters QA tests (#114764) (#114826)
* [TEST] Migrated ccs-unavailable-clusters QA tests (#114764)

Ccs-unavailable-clusters QA tests migrated to the new REST testing
framework, using 'elasticsearch.internal-java-rest-test' Gradle plugin

(cherry picked from commit 551a7d6d94)

* [TEST] Fix ccs-unavailable-clusters QA tests build (#114833)

Properly use `configureEach` on the task configuration to postpone the
tasks creation and configuration in the build process
2024-10-16 03:04:00 +11:00
Rene Groeschke
6192818528
Replace cloud-ess docker image with wolfi-ess (#114413) (#114684)
* Replace cloud-ess docker image with wolfi-ess
   We just replaced the existing implementation of cloud-ess with what was wolfi-ess which is a wolfi based ess image.
   The cloud image itself will be removed in a future commit it was not used anywhere

* Switch to test cloud docker image instead of default docker in packaging pr tests.
  This adds way more coverage than the default docker image which is also barely touched

(cherry picked from commit f1f5ee06a3)

# Conflicts:
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/DockerBase.java
2024-10-14 16:07:11 +02:00
Martijn van Groningen
9348d9fcb8
Add feature flag for subobjects auto (#114616) (#114678) 2024-10-13 05:08:41 +11:00
Martijn van Groningen
1aed889d3a
No longer require logs@settings component template to enable logsdb by default. (#114501) (#114525)
This change also opts out apm logs from logsdb.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-12 06:25:12 +11:00
Keith Massey
37125f265d
Adding index_template_substitutions to the simulate ingest API (#114128) (#114374)
This adds support for a new `index_template_substitutions` field to the
body of an ingest simulate API request. These substitutions can be used
to change the pipeline(s) used for ingest, or to change the mappings
used for validation. It is similar to the
`component_template_substitutions` added in #113276. Here is an example
that shows both of those usages working together:

```
## First, add a couple of pipelines that set a field to a boolean:
PUT /_ingest/pipeline/foo-pipeline?pretty
{
  "processors": [
    {
      "set": {
        "field": "foo",
        "value": true
      }
    }
  ]
}

PUT /_ingest/pipeline/bar-pipeline?pretty
{
  "processors": [
    {
      "set": {
        "field": "bar",
        "value": true
      }
    }
  ]
}

## Now, create three component templates. One provides a mapping enforces that the only field is "foo"
## and that field is a keyword. The next is similar, but adds a `bar` field. The final one provides a setting
## that makes "foo-pipeline" the default pipeline.
## Remember that the "foo-pipeline" sets the "foo" field to a boolean, so using both of these templates
## together would cause a validation exception. These could be in the same template, but are provided
## separately just so that later we can show how multiple templates can be overridden.
PUT _component_template/mappings_template
{
  "template": {
    "mappings": {
      "dynamic": "strict",
      "properties": {
        "foo": {
          "type": "keyword"
        }
      }
    }
  }
}

PUT _component_template/mappings_template_with_bar
{
    "template": {
      "mappings": {
        "dynamic": "strict",
        "properties": {
          "foo": {
            "type": "keyword"
          },
          "bar": {
            "type": "boolean"
          }
        }
      }
    }
}

PUT _component_template/settings_template
{
  "template": {
    "settings": {
      "index": {
        "default_pipeline": "foo-pipeline"
      }
    }
  }
}

## Here we create an index template  pulling in both of the component templates above
PUT _index_template/template_1
{
  "index_patterns": ["foo*"],
  "composed_of": ["mappings_template", "settings_template"]
}

## We can index a document here to create the index, or not. Either way the simulate call ought to work the same
POST foo-1/_doc
{
  "foo": "FOO"
}

## This will not blow up with validation exceptions because the substitute "index_template_substitutions"
## uses `mappings_template_with_bar`, which adds the bar field.
## And the bar-pipeline is executed rather than the foo-pipeline because the substitute
## "index_template_substitutions" uses a substitute `settings_template`, so the value of "foo"
## does not get set to an invalid type.
POST _ingest/_simulate?pretty&index=foo-1
{
  "docs": [
    {
      "_id": "asdf",
      "_source": {
        "foo": "foo",
        "bar": "bar"
      }
    }
  ],
  "component_template_substitutions": {
    "settings_template": {
      "template": {
        "settings": {
          "index": {
            "default_pipeline": "bar-pipeline"
          }
        }
      }
    }
  },
  "index_template_substitutions": {
    "template_1": {
      "index_patterns": ["foo*"],
      "composed_of": ["mappings_template_with_bar", "settings_template"]
    }
  }
}
```
2024-10-09 13:04:23 +11:00
Simon Cooper
c1115d24d7
Add a size limit to outputs from mustache (#114002) (#114297)
Backport #114002 to 8.16
2024-10-08 12:47:08 +01:00
Luca Cavanna
74f523d4cc
Span term query to convert to match no docs when unmapped field is targeted (#113251)
SpanTermQueryBuilder currently creates a valid SpanTermQuery against unmapped fields.
In practice, if the field is unmapped, there won't be a match. This commit changes
the toQuery impl to return a MatchNoDocsQuery instead like we do in similar scenarios.
2024-10-08 08:48:53 +02:00
Tim Brooks
c4698c625b Introduce watermarks for indexing pressure backoff (#113912)
Currently we have a relatively basic decider about when to throttling
indexing. This commit adds two levels of watermarks with configurable
bulk size deciders. Additionally, adds additional settings to control
primary, coordinating, and replica rejection limits.
2024-10-04 15:46:17 -05:00
Keith Massey
7d1239857c
Simplifying the way the simulate ingest API uses component template substitutions for pipeline lookup and mapping validation (#113908) (#114126) 2024-10-05 00:15:59 +10:00
Rene Groeschke
54ecb2c666
Add wolfi ess docker image (#113810) (#114111)
(cherry picked from commit 54c83d7fa7)
2024-10-04 13:44:42 +02:00
David Turner
c32f81594f
More verbose logging in IndicesSegmentsRestCancellationIT (#113844) (#114003)
Relates #88201
2024-10-04 04:34:16 +10:00
Chris Hegarty
45a08b94b3
Upgrade to Lucene 9.12.0 (#113333) (#113835)
This commit upgrades to Lucene 9.12.0.

Co-authored-by: Adrien Grand <jpountz@gmail.com>
Co-authored-by: Armin Braun <me@obrown.io>
Co-authored-by: Benjamin Trent <ben.w.trent@gmail.com>
Co-authored-by: John Wagster <john.wagster@elastic.co>
Co-authored-by: Luca Cavanna <javanna@apache.org>
Co-authored-by: Mayya Sharipova <mayya.sharipova@elastic.co>
2024-10-01 13:55:02 +01:00
David Turner
abb48bd131
Fix testClusterHealthRestCancellation (#113680) (#113756)
This test was failing due to a race between an early cancellation check
and the cancel operation. With this commit we wait until the action is
definitely blocked before cancelling the task.

Closes #100062
2024-09-30 17:57:04 +10:00
Brian Seeders
c0be2e2c1b
Fix packaging tests after addition of new wolfi-based image (#112831) (#113715) 2024-09-27 16:01:14 -04:00
David Turner
d4ae1b5df0
Wait for logs in tests without busy-waiting (#113589) (#113622)
Introduces `MockLog#awaitAllExpectationsMatched` to allow tests to wait
until all the expected log messages have been seen without having to use
`assertBusy()`.
2024-09-27 18:31:55 +10:00
Keith Massey
7870e2dbe2
Adding component template substitutions to the simulate ingest API (#113276) (#113567) 2024-09-26 07:32:13 +10:00
Simon Cooper
40f1e5057e
Add blog links to locale deprecation warnings (#113474) 2024-09-25 14:24:05 +01:00
Tim Brooks
54ddc29fc7
Default incremental bulk functionality to false (#113416) (#113417)
This commit flips the incremental bulk setting to false. Additionally,
it removes some test code which intermittently causes issues with
security test cases.
2024-09-24 08:18:04 +10:00
Tim Brooks
b2eb101443
[8.x] Move raw path into HttpPreRequest (#113231) (#113309)
* Move raw path into HttpPreRequest (#113231)

Currently, the raw path is only available from the RestRequest. This
makes the logic to determine if a handler supports streaming more
challenging to evaluate. This commit moves the raw path into pre request
to allow easier streaming support logic.

* Fix
2024-09-21 07:42:31 +10:00
David Turner
422c26b659 Drop useless AckedRequest interface (#113255)
Almost every implementation of `AckedRequest` is an
`AcknowledgedRequest` too, and the distinction is rather confusing.
Moreover the other implementations of `AckedRequest` are a potential
source of `null` timeouts that we'd like to get rid of. This commit
simplifies the situation by dropping the unnecessary `AckedRequest`
interface entirely.
2024-09-20 13:04:49 +01:00
Tim Brooks
69c4a4f7e9
Backport incremental bulk execution (#113215)
This commit back ports all of the work introduced in:
https://github.com/elastic/elasticsearch/pull/113044

* #111438 - 5e1f655
* #111865 - 478baf1
* #112179 - 1b77421
* #112227 - cbcbc34
* #112267 - c00768a
* #112154 - a03fb12
* #112479 - 95b42a7
* #112608 - ce2d648
* #112629 - 0d55dc6
* #112767 - 2dbbd7d
* #112724 - 58e3a39
* dce8a0b
* #112974 - 92daeeb
* 529d349
* #113161 - e3424bd
2024-09-19 21:35:18 -06:00
Simon Cooper
ceb9deff89
Use deprecation logger for CLDR date format specifiers (#112917)
The addition of the logger requires several updates to tests to deal with the possible warning, or muting if there is not way to specify an allowed (but not mandatory) warning
2024-09-19 15:50:37 +01:00
Lee Hinman
9f0ae87c53
[8.x] Deprecate dot-prefixed indices and composable template index patterns (#112571) (#113146)
* Deprecate dot-prefixed indices and composable template index patterns (#112571)

This commit adds a module emitting a deprecation warning when a
dot-prefixed index is manually or automatically created, or when a
composable index template with an index pattern that uses a dot-prefix
is created. This pattern warns that in the future these indices will not
be allowed. In a future breaking change (10.0.0 maybe?) the deprecation
can then be changed to an exception.

These deprecations are only displayed when a non-operator user is using
the API (one that does not set the `X-elastic-product-origin` header).

* Attempt to fix build for V7 gradle stuff

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-19 07:31:55 +10:00