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

[Index Management] Adopt data stream API changes #71682

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 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