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

Remove deprecated argument include_type_name from ES calls #50285

Merged
merged 11 commits into from
Nov 12, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ describe('esArchiver: createCreateIndexStream()', () => {
sinon.assert.calledWith(client.indices.create, {
method: 'PUT',
index: 'index',
include_type_name: false,
body: {
settings: undefined,
mappings: undefined,
Expand Down
4 changes: 0 additions & 4 deletions src/es_archiver/lib/indices/create_index_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ export function createCreateIndexStream({ client, stats, skipExisting, log }) {

async function handleIndex(record) {
const { index, settings, mappings, aliases } = record.value;

// Determine if the mapping belongs to a pre-7.0 instance, for BWC tests, mainly
const isPre7Mapping = !!mappings && Object.keys(mappings).length > 0 && !mappings.properties;
lizozom marked this conversation as resolved.
Show resolved Hide resolved
const isKibana = index.startsWith('.kibana');

async function attemptToCreate(attemptNumber = 1) {
Expand All @@ -55,7 +52,6 @@ export function createCreateIndexStream({ client, stats, skipExisting, log }) {
await client.indices.create({
method: 'PUT',
index,
include_type_name: isPre7Mapping,
body: {
settings,
mappings,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"indices.create": {
"url_params": {
"include_type_name": "__flag__",
"wait_for_active_shards": "",
"timeout": "",
"master_timeout": ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"indices.get": {
"url_params": {
"include_type_name": "__flag__",
"local": "__flag__",
"ignore_unavailable": "__flag__",
"allow_no_indices": "__flag__",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"indices.get_field_mapping": {
"url_params": {
"include_type_name": "__flag__",
"include_defaults": "__flag__",
"ignore_unavailable": "__flag__",
"allow_no_indices": "__flag__",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"indices.get_template": {
"url_params": {
"include_type_name": "__flag__",
"flat_settings": "__flag__",
"master_timeout": "",
"local": "__flag__"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"indices.put_template": {
"url_params": {
"include_type_name": "__flag__",
"order": "",
"create": "__flag__",
"timeout": "",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"indices.rollover": {
"url_params": {
"include_type_name": "__flag__",
"timeout": "",
"dry_run": "__flag__",
"master_timeout": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export const reindexActionsFactory = (

async getFlatSettings(indexName: string) {
const flatSettings = (await callCluster('transport.request', {
path: `/${encodeURIComponent(indexName)}?flat_settings=true&include_type_name=false`,
path: `/${encodeURIComponent(indexName)}?flat_settings=true`,
})) as { [indexName: string]: FlatSettings };

if (!flatSettings[indexName]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export default function ({ getService }) {
'max_terms_count',
'lifecycle',
'routing_partition_size',
'force_memory_term_dictionary',
'max_docvalue_fields_search',
'merge',
'max_refresh_listeners',
Expand Down
Loading