Skip to content
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 @@ -768,6 +768,13 @@ export interface IndexTemplate {
composed_of: string[];
ignore_missing_component_templates?: string[];
_meta: object;

// These properties are returned on ES read operations and
// not allowed to be set on ES write operations
created_date?: number;
created_date_millis?: number;
modified_date?: number;
modified_date_millis?: number;
}

export interface ESAssetMetadata {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,17 @@ export async function handleExperimentalDatastreamFeatureOptIn({
});
}

const indexTemplate = indexTemplateRes.index_templates[0].index_template;
let updatedIndexTemplate = indexTemplate as IndexTemplate;
const rawIndexTemplate = indexTemplateRes.index_templates[0].index_template;

// Remove system-managed properties (dates) that cannot be set during create/update of index templates
const {
created_date: createdDate,
created_date_millis: createdDateMillis,
modified_date: modifiedDate,
modified_date_millis: modifiedDateMillis,
...indexTemplate
} = rawIndexTemplate as IndexTemplate;
let updatedIndexTemplate = indexTemplate;

if (isTSDBOptInChanged) {
const indexTemplateBody = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ export default function (providerContext: FtrProviderContext) {
await installPackage(pkgName, pkgUpdateVersion);
});

// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/230902
describe.skip('When enabling experimental data stream features', () => {
describe('When enabling experimental data stream features', () => {
let agentPolicyId: string;
let packagePolicyId: string;

Expand Down
Loading