Commit Graph

279 Commits

Author SHA1 Message Date
James Baiera 7b89f4d4a6
Add ability to redirect ingestion failures on data streams to a failure store (#126973)
Removes the feature flags and guards that prevent the new failure store functionality 
from operating in production runtimes.
2025-04-18 16:33:03 -04:00
Mark Vieira 65751062f7
Re-enable VerifyVersionConstantsIT (#125605) 2025-03-25 12:16:53 -07:00
Slobodan Adamović cac356ae64
Disable queryable built-in feature in docs YAML tests (#124684)
The .security index is created asynchronously on a cluster startup. This
affects some of the docs YAML tests in a way that they need to account
for the existence of the .security index or wait for the index to be
created and green. This PR disables the feature for docs YAML tests.
Disabling the feature in docs YAML tests will solve the flakiness
without affecting the coverage.

Resolves https://github.com/elastic/elasticsearch/issues/122343 Resolves
https://github.com/elastic/elasticsearch/issues/121748 Resolves
https://github.com/elastic/elasticsearch/issues/121611 Resolves
https://github.com/elastic/elasticsearch/issues/121345 Resolves
https://github.com/elastic/elasticsearch/issues/121338 Resolves
https://github.com/elastic/elasticsearch/issues/121337 Resolves
https://github.com/elastic/elasticsearch/issues/121288 Resolves
https://github.com/elastic/elasticsearch/issues/121287 Resolves
https://github.com/elastic/elasticsearch/issues/121867 Resolves
https://github.com/elastic/elasticsearch/issues/122335 Resolves
https://github.com/elastic/elasticsearch/issues/122681 Resolves
https://github.com/elastic/elasticsearch/issues/121976 Resolves
https://github.com/elastic/elasticsearch/issues/123094 Resolves
https://github.com/elastic/elasticsearch/issues/123192 Resolves
https://github.com/elastic/elasticsearch/issues/122983 Resolves
https://github.com/elastic/elasticsearch/issues/124671 Resolves
https://github.com/elastic/elasticsearch/issues/124103
2025-03-13 23:13:45 +11:00
Rene Groeschke 496c38e5a5
Reapply "Update Gradle wrapper to 8.13 (#122421)" (#123889) (#123896)
This reverts commit 36660f2e5f.
2025-03-05 08:02:13 +01:00
Rene Groeschke 36660f2e5f
Revert "Update Gradle wrapper to 8.13 (#122421)" (#123889)
This reverts commit e19b2264af.
2025-03-03 15:51:07 +01:00
Rene Groeschke e19b2264af
Update Gradle wrapper to 8.13 (#122421)
* Fix Gradle Deprecation warning as declaring an is- property with a Boolean type has been deprecated.
* Make use of new layout.settingsFolder api to address some cross project references
* Fix buildParams snapshot check for multiprojet projects
2025-03-03 14:10:00 +01:00
Colleen McGinnis b7e3a1e14b
[docs] Migrate docs from AsciiDoc to Markdown (#123507)
* delete asciidoc files

* add migrated files

* fix errors

* Disable docs tests

* Clarify release notes page titles

* Revert "Clarify release notes page titles"

This reverts commit 8be688648d.

* Comment out edternal URI images

* Clean up query languages landing pages, link to conceptual docs

* Add .md to url

* Fixes inference processor nesting.

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Liam Thompson <leemthompo@gmail.com>
Co-authored-by: Martijn Laarman <Mpdreamz@gmail.com>
Co-authored-by: István Zoltán Szabó <szabosteve@gmail.com>
2025-02-27 17:56:14 +01:00
Martijn van Groningen 8185cafaf2
Emit deprecation warning when executing one of the rollup APIs (#113131)
Relates to #112690
2025-01-29 08:48:53 +01:00
Slobodan Adamović 953f1749a4
[Docs] Update Query Roles API documentation (#120740)
The query role API now returns built-in roles as well.
This PR notes this and adds an example on how the 
built-in roles can be filtered out.
2025-01-28 16:29:50 +01:00
Slobodan Adamović 52e0f21bdd
Enable queryable built-in roles feature by default (#120323)
Making the `es.queryable_built_in_roles_enabled` feature flag enabled by default.
This feature makes the built-in roles automatically indexed in `.security` index and available
for querying via Query Role API. The consequence of this is that `.security` index is now 
created eagerly (if it's not existing) on cluster formation.

In order to keep the scope of this PR small, the feature is disabled for some of the tests, 
because they are either non-trivial to adjust or the gain is not worthy the effort to do it now. 
The tests will be adjusted in a follow-up PR and later the flag will be removed completely.

Relates to #117581
2025-01-27 10:25:54 +01:00
Rene Groeschke fe3a3cb70e
[Gradle] Fix :docs:yamlRest test cc compatibility (#119680)
- reference a Gradle script object from a Groovy closure during execution phase is not allowed
2025-01-08 04:06:10 +11:00
Niels Bauman 76b2968360
Disable SLM history in docs tests (#118979)
The SLM history data stream was causing issues in the docs tests because
its presence was flaky and could result in the inability to remove
its index template, which in turn resulted in failing tests.
2024-12-18 18:30:58 +01:00
Rene Groeschke 13c8aaeffa
[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
2024-11-15 17:58:57 +01:00
Stanislav Malyshev 510a56bb96
Remove ccs_telemetry feature flag (#113825)
This removes `ccs_telemetry` feature flag, and instead introduces an
undocumented, true by default setting: - `search.ccs.collect_telemetry`
- enables CCS search telemetry collection and
`_cluster/stats?include_remote=true`. Can be disabled if this is causing
any problems.
2024-10-10 07:07:30 +11:00
Stanislav Malyshev 2d1b67b7b3
Fix doc test - enable ccs_telemetry feature on tests (#113066) 2024-09-18 12:18:24 -06:00
Martijn van Groningen 639a1e0891
Revert "Emit deprecation warning when executing one of the rollup APIs (#112807)" (#113047)
This reverts commit 3d6e9a2850, because
the original change is causing xpack rest test failures in other
repositories.
2024-09-18 05:30:35 +10:00
Martijn van Groningen 3d6e9a2850
Emit deprecation warning when executing one of the rollup APIs (#112807)
Currently none of the rollup APIs deprecation warning. Only the reference docs indicate that rollup has been deprecated.

Relates to #112690
2024-09-17 19:23:22 +02:00
Mark Vieira a59c182f9f
Add AGPLv3 as a supported license 2024-09-13 15:29:46 -07:00
Johannes Fredén 89cd966b24
Add bulk delete roles API (#110383)
* Add bulk delete roles API
2024-07-03 11:04:53 +02:00
Nik Everett c888e5f4cd
ESQL: Run LOOKUP docs test only in SNAPSHOT (#109493)
LOOKUP is only registered on SNAPSHOT builds.

closes #109478
2024-06-11 23:27:22 +10:00
Martijn van Groningen 95855043a3
Disallow new rollup jobs in clusters with no rollup usage. (#108624)
This change will add logic to the put rollup api that fails if no rollup job is active and no rollup index exists in the cluster.

The logic first check whether there is an active rollup persistent task if there are no active rollup persistent tasks, then it checks whether any rollup index exists. The latter check is an expensive check, but assuming that it only runs as part of the put rollup job api and only when there are no rollup jobs, this should be ok.

All tests that invoke the put rollup job api will need to be adjusted to create a dummy index that has rollup mapping metadata. Otherwise, tests can't create a rollup job.

Closes #108381
2024-05-21 09:38:10 +02:00
Slobodan Adamović 77ce60530c
[docs] Document new role description field (#108422)
This commit updates Role API docs to include new description field 
(introduced in #107088) and adds descriptions for all built-in roles.
2024-05-14 10:16:55 +02:00
Rene Groeschke a0caf336e6
Support mdx file format for docs (#107428)
Adding support for MDX files in our :docs project. We parse those *.mdx files
like we do for asciidoc files for code snippets and generate yaml specs from them that
we test as part of our integration tests.

By default:
When searching for doc sources in the docs folder we fail the build if we detect multiple files of
the same name but different extension. E.g. having painless-field-context.mdx
and painless-field-context.asciidoc in the same source folder will fail the build.

Migration Mode:
To allow easier migration from asciidoc to mdx the build supports a kind of migration mode.
When running the build with -Dgradle.docs.migration=true (e.g. ./gradlew buildRestTests -Dgradle.docs.migration=true)

Duplicate doc source files (asciidoc and mdx) are allowed
The Generated yaml rest specs for duplicates will have the extension *.mdx.yml or *asciidoc.yml.
The generated yaml rest specs for duplicates are compared to each other to ensure they produce the same yml output.
2024-04-25 09:38:46 +02:00
Johannes Fredén 666774a865
Add documentation for Query User API (#104255)
* Add documentation for Query User API

Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
2024-01-30 11:27:24 +01:00
Rene Groeschke 6e36ea841d
Port idp-fixture to testcontainers (#103320)
This ports idp-fixture to test container and updates downstream tests
accordingly.
2023-12-13 05:38:24 -05:00
Mary Gouseti a83b78e47c
Add feature flag for data stream failure store in tests (#103255) 2023-12-12 09:26:03 +02:00
James Baiera 1024ebd025
Enable the failure store feature flag for non-snapshot docs tests (#102323)
* Enable the failure store feature flag for docs tests when building a non-snapshot version

* remove comment
2023-11-16 18:33:27 -05:00
James Rodewig 255c9a7f95
[DOCS] Move x-pack docs to `docs/reference` dir (#99209)
**Problem:**
For historical reasons, source files for the Elasticsearch Guide's security, watcher, and Logstash API docs are housed in the `x-pack/docs` directory. This can confuse new contributors who expect Elasticsearch Guide docs to be located in `docs/reference`. 

**Solution:**
- Move the security, watcher, and Logstash API doc source files to the `docs/reference` directory
- Update doc snippet tests to use security

Rel: https://github.com/elastic/platform-docs-team/issues/208
2023-09-12 14:53:41 -04:00
Andrei Dan 01ed7de99f
GA the data stream lifecycle (#98644)
This makes the data stream lifecycle generally available. This will allow
data streams to take advantage of a native simplified and resilient
lifecycle implementation.
2023-08-21 17:28:54 +01:00
Yang Wang d0f64941f0
Remove RCS 2.0 feature flag for beta release (#98307)
This PR removes the RCS 2.0 feature flag so that it is ready for beta
release.
2023-08-14 08:33:37 +10:00
Ievgen Degtiarenko f5921678bb
Debug ccr connection failure in docs build (#96699)
Set DEBUG log level to be able to troubleshoot failures to connect to local CCR cluster.
2023-06-09 09:00:27 +02:00
Mary Gouseti 99145bbe9c
Add new endpoints to configure data lifecycle on a data stream level. (#94590)
With PR we introduce CRUD endpoints which update/delete the data lifecycle on the data stream level. When this is updated it will apply at the next DLM run to all the backing indices that are managed by DLM.
2023-04-04 18:37:38 +02:00
Yang Wang b546d703ae
Add remote clusters xpack usage report (#94862)
This PR adds a new remote_clusters section to the xpack usage response
to report stats of remote cluster connections including total number,
mode and security model.

It also adds a new remote_cluster_server sub-section under the existing
security section.

Relates: #94817
2023-03-30 20:45:46 -04:00
Mary Gouseti 4901cf837a
Enable the health node and the disk health indicator #84811 (#90085) 2022-09-20 23:32:50 +01:00
Lisa Cawley 7e214fc51b
[DOCS] Add authorization info to create, get, and update DFA jobs APIs (#88098) 2022-06-30 08:41:04 -07:00
Ryan Ernst eed8da3919
Move the ingest attachment processor to the default distribution (#87989)
The ingest attachment processor is currently available as a plugin. This
commit moves the processor to the default distribution so it is always
available.
2022-06-28 02:10:36 -04:00
David Kilfoyle 40e9f3097c
[DOCS] Add TSDS docs, take two (#87703)
* Revert "Revert "[DOCS] Add TSDS docs (#86905)" (#87702)"

This reverts commit 0c86d7b9b2.

* First fix to tests

* Add data_stream object to index template

* small rewording

* Add enable data stream object in gradle example setup

* Add bullet about data stream must be enabled in template
2022-06-16 12:44:10 -04:00
Mary Gouseti b60ccc4c9a
Persistent health task (#86131)
This PR introduces a persistent task which will be used to select the health node.
2022-06-16 11:40:16 +02:00
David Kilfoyle 0c86d7b9b2
Revert "[DOCS] Add TSDS docs (#86905)" (#87702)
Reverts elastic/elasticsearch#86905
2022-06-15 13:32:12 -04:00
David Kilfoyle d57f4ac2c6
[DOCS] Add TSDS docs (#86905)
* [DOCS] Add TSDB docs

* Update docs/build.gradle

Co-authored-by: Adam Locke <adam.locke@elastic.co>

* Address Nik's comments, part 1

* Address Nik's comments, part deux

* Reword write index

* Add feature flags

* Wrap one more section in feature flag

* Small fixes

* set index.routing_path to optional

* Update storage reduction value

* Update create index template code example

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Adam Locke <adam.locke@elastic.co>
2022-06-15 12:22:07 -04:00
Nik Everett 4bae370293
Fix synthetic source docs test in release build (#87601)
Synthetic source is the first thing we've documented behind the tsdb
feature flag. This adds the feature flag to the docs sub-project for the
release build so the tests will pass.

Closes #87592
2022-06-13 09:06:19 -04:00
Rene Groeschke 62d5aa986c
Port gradle docs test plugin to use internal yaml rest test plugin (#86598)
Remove usage of deprecated elasticsearch.rest-test in DocsTestPlugin

we keep some files in src/test in docs projects as moving them would require more changes
in build-docs project outside this repository
2022-05-11 12:01:23 +02:00
edh-oss e2930ea0e3
Stop checking non-asciidoc files for doc snippets (#84390)
When SnippetsTask looks for doc snippets, the list of files it
checks includes roughly 350 files that aren't asciidoc files. Image
files (both png and jpg), yaml files, and so on. Set an explicit
include pattern so that Gradle skips these files instead of trying
to read them.
2022-03-14 08:33:27 +00:00
Martijn van Groningen 04e5823a69
Remove default maxmind geoip databases from distribution (#78362)
* Adjusted integration tests to use geoip test fixture or to use test databases provided via config dirs (for qa module / docs).
* Kept the geolite2-databases dependency for most of the unit tests only.
* Made fallback_to_default_databases parameter on geoip processor a noop and emit deprecation warning upon using it.
* If no geoip databases are available yet to a node then the geoip processor factory returns a processor implementation that flags documents that databases are unavailable. This allows these documents to be reindex later with a pipeline. These documents will have a tag string array field, which contains a string _geoip_database_unavailable_{database_name} for each missing database in a pipeline.
* Added reload pipeline capabilities is IngestService, so that when databases are available again on a node then pipelines with geoip processor definition can be reloaded.

Relates to #68920
2021-10-13 14:52:18 +02:00
Benjamin Trent 7a7fffcb5a
[ML] Text/Log categorization multi-bucket aggregation (#71752)
This commit adds a new multi-bucket aggregation: `categorize_text`

The aggregation follows a similar design to significant text in that it reads from `_source`
and re-analyzes the the text as it is read. 

Key difference is that it does not use the indexed field's analyzer, but instead relies on 
the `ml_standard` tokenizer with specialized ML token filters. The tokenizer + filters are the
same that machine learning categorization anomaly jobs utilize.

The high level logical flow is as follows:
 - at each shard, read in the text field with a custom analyzer using `ml_standard` tokenizer
 - Read in the particular tokens from the analyzer
 - Feed these tokens to a token tree algorithm (an adaptation of the drain categorization algorithm)
 - Gather the individual log categories (the leaf nodes), sort them by doc_count, ship those buckets to be merged
 - Merge all buckets that have the EXACT same key
 - Once all buckets are merged, pass those keys + counts to a new token tree for additional merging
 - That tree builds the final buckets and that is returned to the user

Algorithm explanation:

 - Each log is parsed with the ml-standard tokenizer
 - each token is passed into a token tree
 - For `max_match_token` each token is stored in the tree and at `max_match_token+1` (or `len(tokens)`) a log group is created
 - If another log group exists at that leaf, merge it if they have `similarity_threshold` percentage of tokens in common
     - merging simply replaces tokens that are different in the group with `*`
 - If a layer in the tree has `max_unique_tokens` we add a `*` child and any new tokens are passed through there. Catch here is that on the final merge, we first attempt to merge together subtrees with the smallest number of documents. Especially if the new sub tree has more documents counted.

## Aggregation configuration.

Here is an example on some openstack logs
```js
POST openstack/_search?size=0
{
  "aggs": {
    "categories": {
      "categorize_text": {
        "field": "message", // The field to categorize
        "similarity_threshold": 20, // merge log groups if they are this similar
        "max_unique_tokens": 20, // Max Number of children per token position
        "max_match_token": 4, // Maximum tokens to build prefix trees
        "size": 1
      }
    }
  }
}
```

This will return buckets like
```json
"aggregations" : {
    "categories" : {
      "buckets" : [
        {
          "doc_count" : 806,
          "key" : "nova-api.log.1.2017-05-16_13 INFO nova.osapi_compute.wsgi.server * HTTP/1.1 status len time"
        }
      ]
    }
  }
```
2021-10-04 11:49:16 -04:00
James Rodewig 2fc3d40a13
[DOCS] Convert 'Restore a snapshot' to tutorial (#76929)
Updates the 'Restore a snapshot' guide to be more tutorial-focused.
Adds a tutorial for restoring an entire cluster.

Closes #72497.
2021-09-20 13:17:24 -04:00
Lee Hinman a76ee40d5b
Flip node shutdown feature flag to default to true on snapshot builds (#75962)
* Flip node shutdown feature flag to default to true on snapshot builds

It previously defaulted to false. The setting can still only be set to 'true' on a
non-release (snapshot) build of Elasticsearch.

Relates to #70338

* Handle case where operator privileges are enabled
2021-08-02 13:15:36 -04:00
Lee Hinman b566abc8f4
Convert node shutdown system property feature flag to setting (#74267)
This converts the system property feature flag 'es.shutdown_feature_flag_enabled' to a regular
non-dynamic node setting. This setting can only be set to 'true' on a snapshot build of
Elasticsearch (not a release build).

Relates to #70338
2021-06-22 12:08:33 -06:00
Ioannis Kakavas b826703e21
Enroll node API (#72129)
Enroll node API can be used by new nodes in order to join an
existing cluster that has security features enabled. The response
of a call to this API contains all the necessary information that
the new node requires in order to configure itself and bootstrap
trust with the existing cluster.
2021-05-12 08:45:02 +03:00
Benjamin Trent 8069e9b233
[ML] add new bucket_correlation aggregation with initial count_correlation function (#72133)
This commit adds a new pipeline aggregation that allows correlation within the aggregation frame work in bucketed values. 

The initial function is a `count_correlation` function. The purpose of which is to correlate the count in a consistent number of buckets with a pre calculated indicator. The indicator and the aggregated buckets should related to the same metrics with in documents. 

Example for correlating terms within a `service.version.keyword` with latency percentiles. The percentiles and provided correlation indicator both refer to the same source data where the indicator was previously calculated.:
```
GET apm-7.12.0-transaction-generated/_search
{
  "size": 0,
  "aggs": {
    "field_terms": {
      "terms": {
        "field": "service.version.keyword",
        "size": 20
      },
      "aggs": {
        "latency_range": {
          "range": {
            "field": "transaction.duration.us",
            "ranges": [<snip>],
            "keyed": true
          }
        },
        "correlation": {
          "bucket_correlation": {
            "buckets_path": "latency_range>_count",
            "count_correlation": {
              "indicator": {
                 "expectations": [<snip>],
                 "doc_count": 20000
               }
            }
          }
        }
      }
    }
  }
}
```
2021-05-10 12:46:11 -04:00