Skip to content

Master should use the latest version of ES #780

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

Merged
merged 25 commits into from
Mar 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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 .ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
- elasticsearch-oss

elasticsearch-oss:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-7.0.0-beta1}
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-8.0.0-SNAPSHOT}
volumes:
- esvol:/tmp
networks:
Expand Down Expand Up @@ -58,7 +58,7 @@ services:
command: ["npm", "run", "test:integration"]

elasticsearch-platinum:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-7.0.0-beta1}
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-8.0.0-SNAPSHOT}
ports:
- "9200:9200"
networks:
Expand Down
2 changes: 1 addition & 1 deletion .ci/test-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
ELASTICSEARCH_VERSION:
- 7.0.0-beta1
- 8.0.0-SNAPSHOT

NODE_JS_VERSION:
- 11
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ node_js:

env:
global:
- ELASTICSEARCH_VERSION=7.0.0-beta1
- ELASTICSEARCH_VERSION=8.0.0-SNAPSHOT
- QUIET=true

before_install:
- wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ELASTICSEARCH_VERSION}-linux-x86_64.tar.gz
- wget https://snapshots.elastic.co/downloads/elasticsearch/elasticsearch-${ELASTICSEARCH_VERSION}-linux-x86_64.tar.gz
- tar -xzf elasticsearch-${ELASTICSEARCH_VERSION}-linux-x86_64.tar.gz
- ./elasticsearch-${ELASTICSEARCH_VERSION}/bin/elasticsearch -Enode.attr.testattr=test -Epath.repo=/tmp -Erepositories.url.allowed_urls='http://snapshot.*' &> /dev/null &

Expand Down
3 changes: 3 additions & 0 deletions api/api/cat.indices.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function buildCatIndices (opts) {
* @param {boolean} pri - Set to true to return stats only for primary shards
* @param {list} s - Comma-separated list of column names or column aliases to sort by
* @param {boolean} v - Verbose mode. Display column headers
* @param {boolean} include_unloaded_segments - If set to true segment stats will include stats for segments that are not currently loaded into memory
*/

const acceptedQuerystring = [
Expand All @@ -52,6 +53,7 @@ function buildCatIndices (opts) {
'pri',
's',
'v',
'include_unloaded_segments',
'pretty',
'human',
'error_trace',
Expand All @@ -61,6 +63,7 @@ function buildCatIndices (opts) {

const snakeCase = {
masterTimeout: 'master_timeout',
includeUnloadedSegments: 'include_unloaded_segments',
errorTrace: 'error_trace',
filterPath: 'filter_path'
}
Expand Down
6 changes: 6 additions & 0 deletions api/api/ccr.follow_stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ function buildCcrFollowStats (opts) {
options = {}
}

// check required parameters
if (params['index'] == null) {
const err = new ConfigurationError('Missing required parameter: index')
return handleError(err, callback)
}

// validate headers object
if (options.headers != null && typeof options.headers !== 'object') {
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@
/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */

function buildXpackMigrationUpgrade (opts) {
function buildCcrForgetFollower (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError, handleError } = opts
/**
* Perform a [xpack.migration.upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-upgrade.html) request
* Perform a [ccr.forget_follower](http://www.elastic.co/guide/en/elasticsearch/reference/current) request
*
* @param {string} index - The name of the index
* @param {boolean} wait_for_completion - Should the request block until the upgrade operation is completed
* @param {string} index - the name of the leader index for which specified follower retention leases should be removed
* @param {object} body - the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index
*/

const acceptedQuerystring = [
'wait_for_completion'

]

const snakeCase = {
waitForCompletion: 'wait_for_completion'

}

return function xpackMigrationUpgrade (params, options, callback) {
return function ccrForgetFollower (params, options, callback) {
options = options || {}
if (typeof options === 'function') {
callback = options
Expand All @@ -57,6 +57,10 @@ function buildXpackMigrationUpgrade (opts) {
const err = new ConfigurationError('Missing required parameter: index')
return handleError(err, callback)
}
if (params['body'] == null) {
const err = new ConfigurationError('Missing required parameter: body')
return handleError(err, callback)
}

// validate headers object
if (options.headers != null && typeof options.headers !== 'object') {
Expand All @@ -79,7 +83,7 @@ function buildXpackMigrationUpgrade (opts) {

var path = ''

path = '/' + '_migration' + '/' + 'upgrade' + '/' + encodeURIComponent(index)
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'forget_follower'

// build request object
const request = {
Expand Down Expand Up @@ -120,4 +124,4 @@ function buildXpackMigrationUpgrade (opts) {
}
}

module.exports = buildXpackMigrationUpgrade
module.exports = buildCcrForgetFollower
3 changes: 3 additions & 0 deletions api/api/cluster.health.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function buildClusterHealth (opts) {
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html) request
*
* @param {list} index - Limit the information returned to a specific index
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {enum} level - Specify the level of detail for returned information
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
* @param {time} master_timeout - Explicit operation timeout for connection to master node
Expand All @@ -42,6 +43,7 @@ function buildClusterHealth (opts) {
*/

const acceptedQuerystring = [
'expand_wildcards',
'level',
'local',
'master_timeout',
Expand All @@ -60,6 +62,7 @@ function buildClusterHealth (opts) {
]

const snakeCase = {
expandWildcards: 'expand_wildcards',
masterTimeout: 'master_timeout',
waitForActiveShards: 'wait_for_active_shards',
waitForNodes: 'wait_for_nodes',
Expand Down
126 changes: 126 additions & 0 deletions api/api/data_frame.delete_data_frame_transform.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/*
* 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.
*/

'use strict'

/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */

function buildDataFrameDeleteDataFrameTransform (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError, handleError } = opts
/**
* Perform a [data_frame.delete_data_frame_transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-data-frame-transform.html) request
*
* @param {string} transform_id - The id of the transform to delete
*/

const acceptedQuerystring = [

]

const snakeCase = {

}

return function dataFrameDeleteDataFrameTransform (params, options, callback) {
options = options || {}
if (typeof options === 'function') {
callback = options
options = {}
}
if (typeof params === 'function' || params == null) {
callback = params
params = {}
options = {}
}

// check required parameters
if (params['transform_id'] == null && params['transformId'] == null) {
const err = new ConfigurationError('Missing required parameter: transform_id or transformId')
return handleError(err, callback)
}
if (params.body != null) {
const err = new ConfigurationError('This API does not require a body')
return handleError(err, callback)
}

// validate headers object
if (options.headers != null && typeof options.headers !== 'object') {
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
return handleError(err, callback)
}

var warnings = null
var { method, body, transformId, transform_id } = params
var querystring = semicopy(params, ['method', 'body', 'transformId', 'transform_id'])

if (method == null) {
method = 'DELETE'
}

var ignore = options.ignore || null
if (typeof ignore === 'number') {
ignore = [ignore]
}

var path = ''

path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId)

// build request object
const request = {
method,
path,
body: '',
querystring
}

const requestOptions = {
ignore,
requestTimeout: options.requestTimeout || null,
maxRetries: options.maxRetries || null,
asStream: options.asStream || false,
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
warnings
}

return makeRequest(request, requestOptions, callback)

function semicopy (obj, exclude) {
var target = {}
var keys = Object.keys(obj)
for (var i = 0, len = keys.length; i < len; i++) {
var key = keys[i]
if (exclude.indexOf(key) === -1) {
target[snakeCase[key] || key] = obj[key]
if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) {
warnings = warnings || []
warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter')
}
}
}
return target
}
}
}

module.exports = buildDataFrameDeleteDataFrameTransform
Loading