Skip to content

Commit 8f6294c

Browse files
committed
Updated endpoints to 8.12 + fixed platinum test
1 parent f879100 commit 8f6294c

File tree

7 files changed

+111
-22
lines changed

7 files changed

+111
-22
lines changed

.buildkite/pipeline.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ steps:
77
TEST_SUITE: "{{ matrix.suite }}"
88
STACK_VERSION: 8.12-SNAPSHOT
99
CLIENT_VER: "8_0"
10+
PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT: 1
1011
matrix:
1112
setup:
1213
suite:

lib/Search/Elasticsearch/Client/8_0/Direct.pm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ has 'cat' => ( is => 'lazy', init_arg => undef );
1919
has 'ccr' => ( is => 'lazy', init_arg => undef );
2020
has 'cluster' => ( is => 'lazy', init_arg => undef );
2121
has 'connector' => ( is => 'lazy', init_arg => undef );
22+
has 'connector_sync_job' => ( is => 'lazy', init_arg => undef );
2223
has 'dangling_indices' => ( is => 'lazy', init_arg => undef );
2324
has 'enrich' => ( is => 'lazy', init_arg => undef );
2425
has 'eql' => ( is => 'lazy', init_arg => undef );
@@ -100,6 +101,7 @@ sub _build_cat { shift->_build_namespace('Cat') }
100101
sub _build_ccr { shift->_build_namespace('CCR') }
101102
sub _build_cluster { shift->_build_namespace('Cluster') }
102103
sub _build_connector { shift->_build_namespace('Connector') }
104+
sub _build_connector_sync_job { shift->_build_namespace('ConnectorSyncJob') }
103105
sub _build_dangling_indices { shift->_build_namespace('DanglingIndices') }
104106
sub _build_enrich { shift->_build_namespace('Enrich') }
105107
sub _build_eql { shift->_build_namespace('Eql') }
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
package Search::Elasticsearch::Client::8_0::Direct::ConnectorSyncJob;
19+
20+
use Moo;
21+
with 'Search::Elasticsearch::Client::8_0::Role::API';
22+
with 'Search::Elasticsearch::Role::Client::Direct';
23+
__PACKAGE__->_install_api('connector_sync_job');
24+
25+
1;
26+
27+
__END__
28+
29+
# ABSTRACT: A client for create and manage Elastic sync jobs
30+
31+
=head1 DESCRIPTION
32+
33+
The sync jobs API provides a convenient way to create
34+
and manage Elastic sync jobs in an internal index.
35+
36+
This API provides an alternative to relying solely on Kibana UI
37+
for sync job management.
38+
39+
The full documentation for Sync job feature is available here:
40+
L<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/connector-apis.html#sync-job-apis>
41+
42+
It does L<Search::Elasticsearch::Role::Client::Direct>.
43+
44+
=head1 METHODS
45+
46+
=head2 C<put()>
47+
48+
$response = $e->connector_sync_job->post(
49+
body => {
50+
id => "connector-id",
51+
job_type => "full",
52+
trigger_method => 'on_demand'
53+
}
54+
);
55+
56+
The C<post()> method create a connector sync job.

t/lib/es_async.pl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
use strict;
2727
use warnings;
2828

29+
$ENV{ES} = $ENV{ELASTICSEARCH_URL} || 'https://elastic:changeme@localhost:9200';
30+
2931
my $trace
3032
= !$ENV{TRACE} ? undef
3133
: $ENV{TRACE} eq '1' ? 'Stderr'
@@ -67,11 +69,13 @@
6769
}
6870
}
6971

72+
$ENV{PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT} = 1;
73+
7074
my $es;
7175
if ( $ENV{ES} ) {
7276
eval {
7377
$es = Search::Elasticsearch::Async->new(
74-
nodes => $ENV{ES},
78+
nodes => [ $ENV{ES} ],
7579
trace_to => $trace,
7680
cxn => $cxn,
7781
cxn_pool => $cxn_pool,

t/lib/es_sync.pl

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,29 @@
4444
our %Auth;
4545

4646
my $es;
47-
if ( $ENV{ES} ) {
48-
eval {
49-
$es = Search::Elasticsearch->new(
50-
nodes => $ENV{ES},
51-
trace_to => $trace,
52-
cxn => $cxn,
53-
cxn_pool => $cxn_pool,
54-
client => $api,
55-
send_get_body_as => $body,
56-
request_timeout => $timeout,
57-
plugins => \@plugins,
58-
%Auth
59-
);
60-
$es->ping unless $ENV{ES_SKIP_PING};
61-
1;
62-
} || do {
63-
diag $@;
64-
undef $es;
65-
};
66-
}
47+
48+
$ENV{ES} = $ENV{ELASTICSEARCH_URL} || 'https://elastic:changeme@localhost:9200';
49+
$ENV{PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT} = 1;
50+
51+
eval {
52+
$es = Search::Elasticsearch->new(
53+
nodes => [ $ENV{ES} ],
54+
trace_to => $trace,
55+
cxn => $cxn,
56+
cxn_pool => $cxn_pool,
57+
client => $api,
58+
send_get_body_as => $body,
59+
request_timeout => $timeout,
60+
plugins => \@plugins,
61+
%Auth
62+
);
63+
$es->ping unless $ENV{ES_SKIP_PING};
64+
1;
65+
} || do {
66+
diag $@;
67+
undef $es;
68+
};
69+
6770

6871
unless ( $ENV{ES_SKIP_PING} ) {
6972
my $version = $es->info->{version}{number};

test/skip_list.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,33 @@
216216
- aggregations/min_bucket.yml
217217
- aggregations/percentiles_bucket.yml
218218
- aggregations/sum_bucket.yml
219+
- analytics/top_metrics.yml
220+
- analytics/cumulative_cardinality.yml
219221
- cat.segments/10_basic.yml
222+
- eql/10_basic.yml
220223
- field_caps/40_time_series.yml
224+
- ml/calendar_crud.yml
225+
- ml/data_frame_analytics_crud.yml
226+
- ml/evaluate_data_frame.yml
227+
- ml/explain_data_frame_analytics.yml
228+
- ml/forecast.yml
229+
- ml/jobs_crud.yml
230+
- ml/preview_datafeed.yml
231+
- ml/start_data_frame_analytics.yml
232+
- ml/stop_data_frame_analytics.yml
233+
- rules/10_pinned_query.yml
221234
- search/150_rewrite_on_coordinator.yml
222235
- search/220_total_hits_object.yml
223236
- search.highlight/10_unified.yml
224237
- search.vectors/90_sparse_vector.yml
238+
- spatial/100_geo_grid_ingest.yml
239+
- spatial/130_geo_shape_runtime.yml
240+
- sql/sql.yml
241+
- ssl/10_basic.yml
242+
- transform/transforms_crud.yml
243+
- transform/transforms_start_stop.yml
244+
- transform/transforms_stats.yml
245+
- transform/transforms_stats_continuous.yml
246+
- transform/transforms_update.yml
247+
- transform/transforms_upgrade.yml
225248
- tsdb/*

util/get_elasticsearch_info.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ sub get_elasticsearch_info {
2525
#===================================
2626
$ENV{ES} = $ENV{ELASTICSEARCH_URL} || 'https://elastic:changeme@localhost:9200';
2727

28-
my $response = HTTP::Tiny->new->get($ENV{ES}) or die "The server $ENV{ES} is not running!";
28+
my $response = HTTP::Tiny->new(verify_SSL => 0)->get($ENV{ES}) or die "The server $ENV{ES} is not running!";
2929
unless ($response->{success}) {
3030
die "ERROR: The server $ENV{ES} is not running!\n";
3131
}

0 commit comments

Comments
 (0)