Skip to content

Commit

Permalink
[Index Management] Adopt data stream API changes (#71682)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth authored Jul 14, 2020
1 parent e4546b3 commit 919e0f6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/index_management/common/types/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface TemplateSerialized {
version?: number;
priority?: number;
_meta?: { [key: string]: any };
data_stream?: { timestamp_field: string };
data_stream?: {};
}

/**
Expand All @@ -46,7 +46,7 @@ export interface TemplateDeserialized {
name: string;
};
_meta?: { [key: string]: any }; // Composable template only
dataStream?: { timestamp_field: string }; // Composable template only
dataStream?: {}; // Composable template only
_kbnMeta: {
type: TemplateType;
hasDatastream: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ export const schemas: Record<string, FormSchema> = {
defaultValue: false,
serializer: (value) => {
if (value === true) {
return {
timestamp_field: '@timestamp',
};
// For now, ES expects an empty object when defining a data stream
// https://github.com/elastic/elasticsearch/pull/59317
return {};
}
},
deserializer: (value) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ export default function ({ getService }: FtrProviderContext) {
},
},
},
data_stream: {
timestamp_field: '@timestamp',
},
data_stream: {},
},
});

Expand All @@ -53,7 +51,8 @@ export default function ({ getService }: FtrProviderContext) {
await deleteComposableIndexTemplate(name);
};

describe('Data streams', function () {
// Temporarily skipping tests until ES snapshot is updated
describe.skip('Data streams', function () {
describe('Get', () => {
const testDataStreamName = 'test-data-stream';

Expand Down

0 comments on commit 919e0f6

Please sign in to comment.