Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steps:
env:
RUBY_VERSION: "{{ matrix.ruby }}"
TEST_SUITE: "{{ matrix.suite }}"
STACK_VERSION: 8.18.4-SNAPSHOT
STACK_VERSION: 8.18.6-SNAPSHOT
TRANSPORT_VERSION: "{{ matrix.transport }}"
RUBY_SOURCE: "{{ matrix.ruby_source }}"
QUIET: false
Expand Down Expand Up @@ -62,7 +62,7 @@ steps:
provider: "gcp"
env:
RUBY_VERSION: "3.4"
STACK_VERSION: 8.18.4-SNAPSHOT
STACK_VERSION: 8.18.6-SNAPSHOT
ES_YAML_TESTS_BRANCH: "8.18"
TRANSPORT_VERSION: "8.3"
RUBY_SOURCE: "ruby"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/8.18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
sudo sysctl -w vm.max_map_count=262144
- uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 8.18.4-SNAPSHOT
stack-version: 8.18.6-SNAPSHOT
security-enabled: false
- uses: ruby/setup-ruby@v1
with:
Expand All @@ -40,4 +40,4 @@ jobs:
- name: elasticsearch
run: cd elasticsearch && bundle exec rake test:all
- name: elasticsearch-api
run: rake es:download_artifacts[8.18.4-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit
run: rake es:download_artifacts[8.18.6-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit
4 changes: 2 additions & 2 deletions .github/workflows/otel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
sudo sysctl -w vm.max_map_count=262144
- uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 8.18.4-SNAPSHOT
stack-version: 8.18.6-SNAPSHOT
security-enabled: false
- uses: ruby/setup-ruby@v1
with:
Expand All @@ -42,4 +42,4 @@ jobs:
- name: elasticsearch
run: cd elasticsearch && bundle exec rake test:all
- name: elasticsearch-api
run: rake es:download_artifacts[8.18.4-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit
run: rake es:download_artifacts[8.18.6-SNAPSHOT] && cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
#
module Elasticsearch
module API
module Inference
module Actions
# Configure a custom inference endpoint
#
# @option arguments [String] :task_type The task type
# @option arguments [String] :custom_inference_id The inference Id
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The inference endpoint's task and service settings
#
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-custom
#
def put_custom(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_custom' }

defined_params = %i[task_type custom_inference_id].each_with_object({}) do |variable, set_variables|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
end
request_opts[:defined_params] = defined_params unless defined_params.empty?

raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
raise ArgumentError, "Required argument 'custom_inference_id' missing" unless arguments[:custom_inference_id]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = arguments.delete(:body)

_task_type = arguments.delete(:task_type)

_custom_inference_id = arguments.delete(:custom_inference_id)

method = Elasticsearch::API::HTTP_PUT
path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_custom_inference_id)}"
params = {}

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
#
module Elasticsearch
module API
module Transform
module Actions
# Sets a cluster wide upgrade_mode setting that prepares transform indices for an upgrade.
#
# @option arguments [Boolean] :enabled Whether to enable upgrade_mode Transform setting or not. Defaults to false.
# @option arguments [Time] :timeout Controls the time to wait before action times out. Defaults to 30 seconds
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.18/transform-set-upgrade-mode.html
#
def set_upgrade_mode(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'transform.set_upgrade_mode' }

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

method = Elasticsearch::API::HTTP_POST
path = '_transform/set_upgrade_mode'
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

require 'spec_helper'

describe 'client#inference.put_custom' do
let(:expected_args) do
[
'PUT',
'_inference/foo/baz',
{},
nil,
{},
{ defined_params: { custom_inference_id: 'baz', task_type: 'foo' },
endpoint: 'inference.put_custom' }
]
end

it 'performs the request' do
expect(client_double.inference.put_custom(task_type: 'foo', custom_inference_id: 'baz')).to be_a Elasticsearch::API::Response
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

require 'spec_helper'

describe 'client.transform#set_upgrade_mode' do
let(:expected_args) do
[
'POST',
'_transform/set_upgrade_mode',
{},
nil,
{},
{ endpoint: 'transform.set_upgrade_mode' }
]
end

it 'performs the request' do
expect(client_double.transform.set_upgrade_mode).to be_a Elasticsearch::API::Response
end
end