Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from elastic:main #509

Merged
merged 196 commits into from
Oct 12, 2024
Merged

[pull] main from elastic:main #509

merged 196 commits into from
Oct 12, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Oct 8, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

thecoop and others added 30 commits October 7, 2024 13:01
Locale may or may not be there depending on version
This changes the suffix for a role mapping to be `-read-only` instead of
` (read only)` since the name can be used (and will be by Kibana) to get
a specific operator defined role mapping. 

This also removes the suffix when checking cluster state for the
mapping. There is a slight risk that `<name>-read-only` exists both in
the native store and as `<name>` in the file based mapping. I think
that's very low risk, so didn't add any code to cover that case.
Remove unnecessary remove and later add of the key.
This commit adds a getAndSet implementation to the ObjectArray API and changes the set method to return void.
* Adds manage_inference cluster privilege to kibana_system role

* Fix

* this is what I get for not using a real IDE

* Remove whitespace

---------

Co-authored-by: Elastic Machine <[email protected]>
…114177)

randomInstantBetween can produce a result which is not within the [minInstant, maxInstant] range. This occurs when the epoch second picked matches the min bound and the nanos are below the min nanos, or the second picked matches the max bound seconds and nanos are above the max bound nanos. This change fixes the function by setting a bound on which nano values can be picked if the min or max epoch second value is picked.
…in (#112933)

Add support for vectorized ipByteBin.

The structure of the implementation and loading framework mirror that of Lucene, but is simplified by avoiding reflective loading since ES has support for a MRJar section for 21.

For now, we just disable warnings-as-errors in this small sourceset, since -Xlint:-incubating is only support since JDK 22. The number of source files is small here. Will investigate how to assert that just the single incubating warning is emitted by javac, at a later point.
remove some unnecessary manipulation of the keys in the method removeAndAdd.
With #113251 having a SpanMatchNoDocsQuery is a valid response to the rewrite.

closes #114218
This reenables a test and adds more debugging to another one. We'll use
this to collect more information the next time it fails.
Adding the building blocks to support IPinfo ASN and Country data
A recent commit incidentally changed a release resources call from
doBefore to doAfter. Several tests depending on resources being released
synchronously which requires doBefore.

Closes #114181
Closes #114182
Fast refresh indices should now behave like non fast refresh indices in
how they execute (m)gets and searches. I.e., they should use the search
shards.

For BWC, we define a new transport version. We expect search shards to
be upgraded first, before promotable shards. Until the cluster is fully
upgraded, the promotable shards (whether upgraded or not) will still
receive and execute gets/searches locally.

Relates ES-9573
Relates ES-9579
Implement and enable streaming for Cohere chat completions (v1).

Includes processor for ND JSON streaming responses.

Co-authored-by: Elastic Machine <[email protected]>
API for `/_inference/{task_type}/{inference_id}/_stream` and `/_inference/{inference_id}/_stream`

Request is `application/json`
Response is `text/event-stream`
…ticsearch.ingest.geoip.IpinfoIpDataLookupsTests #114266
Today the docs for the `?wait_for_active_shards` parameter say that it
must be a positive integer, proscribing `0`, yet `0` is a legitimate
value for this parameter. This commit fixes this point and rewords the
docs slightly for clarity.
elasticsearchmachine and others added 29 commits October 11, 2024 23:33
…xedIntoStandardModeChallengeRestIT testMatchAllQuery #114607
A silly bug has reared its ugly head. Apparently, our dimension
validations are predicated on JSON parsing order, that is not good. 

So, this commit adjusts the dim validations so that it is an actual
validation, instead of something that occurs during parsing.

Additionally, I found that our custom formats were not overriding
`getMaxDimensions` correctly. Typically, and in production, this isn't
that big of a deal, but I have found it useful to do this for other
testing purposes (so that we don't have to rely on the perfield codec
for more direct and advanced testing).
Optimize queries like
... | EVAL b = a, c = b | WHERE c > 2
to
... | WHERE a > 2 | EVAL b = a, c = b
…14597)

**Introduction**

> In order to make adoption of failure stores simpler for all users, we
are introducing a new syntactical feature to index expression
resolution: The selector. > > Selectors, denoted with a :: followed by a
recognized suffix will allow users to specify which component of an
index abstraction they would like to operate on within an API call. In
this case, an index abstraction is a concrete index, data stream, or
alias; Any abstraction that can be resolved to a set of indices/shards.
We define a component of an index abstraction to be some searchable unit
of the index abstraction. > > To start, we will support two components:
data and failures. Concrete indices are their own data components, while
the data component for index aliases are all of the indices contained
therein. For data streams, the data component corresponds to their
backing indices. Data stream aliases mirror this, treating all backing
indices of the data streams they correspond to as their data component.
>  > The failure component is only supported by data streams and data
stream aliases. The failure component of these abstractions refer to the
data streams' failure stores. Indices and index aliases do not have a
failure component.

For more details and examples see
#113144. All this work has
been cherry picked from there.

**Purpose of this PR**

This PR is replacing the the indices options boolean constructor with
the builders. The goal is to give me and the reviewer a very narrow
scope change when we can ensure we did not make any mistakes during the
conversion. Also it will reduce a bit the change list in
https://github.com/elastic/elasticsearch/pull/113144/files.
Improve an error message in the test for `profile`ing the ordinals-based
grouping operator. It's failed in the past with a rather cryptic error
message. This will either keep it passing fully or give us a better
error message when it does fail.

Closes #114380
…s testPushSpatialIntersectsEvalToSource {default} #114627
This reverts commit d37c1c6.

The automuter got there first.
This removes SQL's use of `org.elasticsearch.Version` class and usages replaced by `SqlVersion`.

All the currently considered released versions (`7.0.0` to `8.16.0`) have been declared as `SqlVersion` instances. These are still tested against.

The last "known release" (`8.16.0`) is considered the "server compatibility version" and all clients at or past this release are compatible with the server; notably, they can be also on a newer version than server's. 
Clients released before this "server compatibility version" respect existing compatibility requirements (must/can be older up to one major lower, but past `7.7.0`).
The "server compatibility version" will not be updated with newer stack releases (at least not until #112745 is addressed).

Fixes #102689
Fixes #114613

Those tests were added with `::<type>` casts, which don't work in older versions.

As they aren't testing anything around those casts, I'm replacing them with `TO_<TYPE>()` functions to let them work everywhere.
…leet search api. (#114526)

Without this change request fails with `ElasticsearchTimeoutException` if waiting for seqno times out. This results in a 500 status code.

With this change the `SearchTimeoutException` is used which results in a 504 status code. This is a more appropriate response code for time-outs.

Closes #114395
Retry the async test when you get a 403 - that could be because security
has not yet booted. We should have permission to fetch everything.
Since Kibana only needs CCS metadata in ESQL responses from certain well-defined locations,
we are making CCS metadata opt-in. This feature is patterned after ESQL profiling, where
you specify "profile": true in the ESQL body and if you asked for it will be present in the response
always (it will be written to the .async-search index and you can’t turn it off in later async-search
requests against this particular query ID) and if you didn’t ask for it at the beginning it will never
be present (it will NOT be written to the .async-search index when it is persisted).

The new option is "include_ccs_metadata": true/false.
This speeds up grouping by bytes valued fields (keyword, text, ip, and
wildcard) when the input is an ordinal block:
```
    bytes_refs 22.213 ± 0.322 -> 19.848 ± 0.205 ns/op (*maybe* real, maybe noise. still good)
       ordinal didn't exist   ->  2.988 ± 0.011 ns/op
```
I see this as 20ns -> 3ns, an 85% speed up. We never hard the ordinals
branch before so I'm expecting the same performance there - about 20ns
per op.

This also speeds up grouping by a pair of byte valued fields:
```
two_bytes_refs 83.112 ± 42.348  -> 46.521 ± 0.386 ns/op
  two_ordinals 83.531 ± 23.473  ->  8.617 ± 0.105 ns/op
```
The speed up is much better when the fields are ordinals because hashing
bytes is comparatively slow.

I believe the ordinals case is quite common. I've run into it in quite a
few profiles.
Tests for partially filtered aggs. It uses the existing aggs tests and
adds junk rows that are filtered away. That way we don't have to add new
testing assertions to each class - we just can reuse the existing
assertions.
Adds a hypotenuse function
* 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
* Initial InstrumenterTests

* Assert on instrumentation method arguments
@pull pull bot merged commit b23984d into Samboski1:main Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.