Skip to content

Conversation

svilen-mihaylov-elastic
Copy link
Contributor

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against main? Unless there is a good reason otherwise, we prefer pull requests against main and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS and architecture that we support?
  • If you are submitting this code for a class then read our policy for that.

drempapis and others added 30 commits January 22, 2025 22:18
…lastic#120594)

Create a test for archive indices with index mapping with  legacy similarity settings
* Test ML model server (elastic#120270)

* Fix model downloading for very small models.

* Test MlModelServer

* Tiny ELSER

* unmute TextEmbeddingCrudIT and DefaultEndPointsIT

* update ELSER

* Improve MlModelServer

* tiny E5

* more logging

* improved E5 model

* tiny reranker

* scan for ports

* [CI] Auto commit changes from spotless

* Serve default models when optimized model is requested

* @ClassRule

* polish code

* Respect dynamic setting ML model repo

* fix metadata for optimized models

* improve logging

---------

Co-authored-by: elasticsearchmachine <[email protected]>

* backport HttpHeaderParser

---------

Co-authored-by: elasticsearchmachine <[email protected]>
…astic#120610)

Dried up (and moved to the much faster inline logic) for the summation here for both implementations.
Obviously this could have been done even drier but it didn't seem like that was possible without a performance
hit (we really don't want to sub-class the leaf-collector I think).
Benchmarks suggest this variant is ~10% faster than the previous iteration of `SumAggregator` (probably from
making the grow method smaller) and a bigger than that improvement for the `AvgAggregator`.
* Forward port release notes for v8.16.3

* Delete includes

* del coming tag

---------

Co-authored-by: Liam Thompson <[email protected]>
…time other than disconnected exceptions (elastic#120236) (elastic#120628)

For ES|QL, we are moving to limit the scope of the skip_unavailable setting for remote clusters.
Going forward, skip_unavailable will be considered for two scenarios:

1) inability to connect to a remote cluster ("unavailable")
2) whether to fail on execution time errors or not (inline with the upcoming 
allow_partial_search_results work for ES|QL).

This PR reverses the special plan-time handling for skip_unavailable=true clusters
that was added in elastic#116348. Remote clusters, regardless of their skip_unavailable setting, 
will now use the same logic as the local cluster for index expression analysis at plan time, namely:

1) If any concrete index specified is missing from the cluster, a VerificationException will be thrown
2) If no matching index/alias/datastream was found on any cluster (even if all were specified with a wildcard), 
a VerificationException will be thrown

Thus, we no longer require at least one matching index expression for skip_unavailable=false 
clusters either, as was done in the previous PR referenced above.
…stic#120612)

The default field limit of 1000 seems undersized, especially for the default data stream.
Each distinct attribute/dimension name and metric name count towards that limit
Muting a yaml bwc test called "alias" apparently is not possible:

```
task.skipTest("esql/190_lookup_join/alias", "LOOKUP JOIN does not support index aliases for now")
```

```
* What went wrong:
Execution failed for task ':x-pack:plugin:yamlRestCompatTestTransform'.
> class com.fasterxml.jackson.databind.node.TextNode cannot be cast to class com.fasterxml.jackson.databind.node.ArrayNode (com.fasterxml.jackson.databind.node.TextNode and com.fasterxml.jackson.databind.node.ArrayNode are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader @725f7fdd)
```

I need to mute this test in
elastic#120617
Resolves elastic#120159
Resolves elastic#120157
Resolves elastic#120151
Resolves elastic#120158
Resolves elastic#120155
Resolves elastic#120156
Resolves elastic#120348
Resolves elastic#120349

This adds appropriate ignore annotations for the date tests I added in elastic#119772 to not run the tests against very old versions.
…ssion required) (elastic#119898) (elastic#120650)

Resolve/cluster allows querying for cluster-info-only (no index expression required)

This enhancement provides users with the ability to query the _resolve/cluster API endpoint without specifying
an index expression to match against. This allows users to quickly test what remote clusters are configured on
a cluster and whether they are available for querying.

The new endpoint takes no index expression:

```
GET _resolve/cluster
```

and returns the same information as before except for the "matching_indices" field. Example response:

```
{
  "remote1": {
    "connected": false,
    "skip_unavailable": true
  },
  "remote2": {
    "connected": true,
    "skip_unavailable": false,
    "version": {
      "number": "8.17.0",
      "build_flavor": "default",
      "minimum_wire_compatibility_version": "7.17.0",
      "minimum_index_compatibility_version": "7.0.0"
    }
  }
}
```

For backwards compatibility, this new endpoint works with clusters from older versions by querying with the index expression `dummy*` on those older clusters and ignoring the matching_indices value in the response they return.
…lastic#120652)

* Remove index blocks by default in create_from (elastic#120643)

Change the default value for the `remove_index_blocks` parameter of the `_create_from` api to true. This means that when a source index has blocks, by default these blocks will be filtered out when creating the destination index.

* Fix broken yaml test
…elastic#120666)

This commit combines the different entitlement test plugins used for
integration tests into a single plugin. When installing the plugin in
the integ test cluster, the entitlement policy and plugin properties are
adjusted to test the desired combination of settings. This allows the
plugin policy to be dynamically generated by each test, rather than rely
on a static policy.
…positoryAnalysisRestIT org.elasticsearch.repositories.blobstore.testkit.analyze.MinioRepositoryAnalysisRestIT elastic#120672
Currently, ES|QL ExecutionInfo is updated in multiple places: on remote 
clusters, during the execution of data-node requests, in compute
listeners, and on the coordinator node. This change consolidates updates
to happen only on the coordinator, when receiving compute responses.
This change should also make the compute listener easier to understand
… (elastic#120683)

* Clarify query methods; other sprucing

* Apply suggestions from review
…0639) (elastic#120679)

Refetch TransformConfig with SeqNo before migrating
max_page_search_size, then include the SeqNo in the index request to
ensure we are not overwriting a user's intentional config change.  If we
are, just drop the migration and try again next time.
…0665) (elastic#120688)

When an entitlement is available to policy files, it should have one
constructor that the parser uses. This commit adjusts the policy parser
to scan the constructor to find that one annotated constructor, and
errors if more than one is found.
nik9000 and others added 22 commits January 30, 2025 08:26
Speeds up field name resolution when there are many many field names,
like in `HeapAttackIT`.

Relates to elastic#121112
…est {p0=data_stream/140_data_stream_aliases/Create data stream alias with filter} elastic#121014
…stic#121239)

* Put back legacy EIS URL setting

* Update docs/changelog/121207.yaml

* Fallback logic to legacy URL

* Add unit tests
elastic#121245)

Adds non-grouping support for min, max, sum, and count, using
CompositeBlock as the underlying block type and an internal
FromAggregateMetricDouble function to handle converting from
CompositeBlock to the correct metric subfields.

Closes elastic#110649
…stic#121247)

Instead of always copying the map of enrich policies, we should return
the (already read-only) map straight from the `EnrichMetadata` and make
a modifiable copy only when necessary.
This commit adds FileEntitlement to entitlements. It does not add checks
for all file access methods yet, instead opting for example read and
write methods.

Each module contains a sorted array of paths with read and write
permissions. Binary search is used to quickly identify the closest path
to determine whether a target path can be read or written.

Some important things about FileEntitlement are the path can either be a
file or a directory. All directories grant recursive permission. The
mode is either read or read_write. All operations like create or delete
are considered write.

relates ES-10354

Co-authored-by: Jack Conradson <[email protected]>
…1176) (elastic#121237)

This commit introduces the `MappedFieldType#getDefaultHighlighter`, allowing a specific highlighter to be enforced for a field.
The semantic field mapper utilizes this new functionality to set the `semantic` highlighter as the default.
All other fields will continue to use the `unified` highlighter by default.
…121244) (elastic#121262)

This is effectively the same as the other class. The logging is
irrelevant and the dead `addError` is too => lets remove this.
…API (elastic#120400) (elastic#121251)

* [Inference API] Add node-local rate limiting for the inference API (elastic#120400)

* Add node-local rate limiting for the inference API

* Fix integration tests by using new LocalStateInferencePlugin instead of InferencePlugin and adjust formatting.

* Correct feature flag name

* Add more docs, reorganize methods and make some methods package private

* Clarify comment in BaseInferenceActionRequest

* Fix wrong merge

* Fix checkstyle

* Fix checkstyle in tests

* Check that the service we want to the read the rate limit config for actually exists

* [CI] Auto commit changes from spotless

* checkStyle apply

* Update docs/changelog/120400.yaml

* Move rate limit division logic to RequestExecutorService

* Spotless apply

* Remove debug sout

* Adding a few suggestions

* Adam feedback

* Fix compilation error

* [CI] Auto commit changes from spotless

* Add BWC test case to InferenceActionRequestTests

* Add BWC test case to UnifiedCompletionActionRequestTests

* Update x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/common/InferenceServiceNodeLocalRateLimitCalculator.java

Co-authored-by: Adam Demjen <[email protected]>

* Update x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/common/InferenceServiceNodeLocalRateLimitCalculator.java

Co-authored-by: Adam Demjen <[email protected]>

* Remove addressed TODO

* Spotless apply

* Only use new rate limit specific feature flag

* Use ThreadLocalRandom

* [CI] Auto commit changes from spotless

* Use Randomness.get()

* [CI] Auto commit changes from spotless

* Fix import

* Use ConcurrentHashMap in InferenceServiceNodeLocalRateLimitCalculator

* Check for null value in getRateLimitAssignment and remove AtomicReference

* Remove newAssignments

* Up the default rate limit for completions

* Put deprecated feature flag back in

* Check feature flag in BaseTransportInferenceAction

* spotlessApply

* Export inference.common

* Do not export inference.common

* Provide noop rate limit calculator, if feature flag is disabled

* Add proper dependency injection

---------

Co-authored-by: elasticsearchmachine <[email protected]>
Co-authored-by: Jonathan Buttner <[email protected]>
Co-authored-by: Adam Demjen <[email protected]>

* Use .get(0) as getFirst() doesn't exist in 8.18 (probably JDK difference?)

---------

Co-authored-by: elasticsearchmachine <[email protected]>
Co-authored-by: Jonathan Buttner <[email protected]>
Co-authored-by: Adam Demjen <[email protected]>
* [DOCS] Fix missing id syntax

* Update docs/reference/troubleshooting/common-issues/disk-usage-exceeded.asciidoc

* fix id
…21276) (elastic#121289)

The semantic text format was updated in elastic#119183. This commit removes the last remaining reference to the old format from the documentation to ensure consistency.
Make test setup more reliable
Resolves elastic#119197

(cherry picked from commit 748801e)
Copy link
Contributor

Documentation preview:

Copy link
Contributor

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.