[Fleet] Remove timestamp field from component template (#99619)

* Remove timestamp field from component template

Elasticsearch bug fixed upstream allows us to remove this field from the
template: elastic/elasticsearch/#58956

Closes #71095

* Remove timestamp field from functional test
This commit is contained in:
Kyle Pollich 2021-05-10 14:11:23 -04:00 committed by GitHub
parent ec66797c7c
commit baf11e8749
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 16 deletions

View file

@ -198,15 +198,6 @@ function buildComponentTemplates(registryElasticsearch: RegistryElasticsearch |
template: {
mappings: {
...registryElasticsearch['index_template.mappings'],
// temporary change until https://github.com/elastic/elasticsearch/issues/58956 is resolved
// hopefully we'll be able to remove the entire properties section once that issue is resolved
properties: {
// if the timestamp_field changes here: https://github.com/elastic/kibana/blob/master/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts#L309
// we'll need to update this as well
'@timestamp': {
type: 'date',
},
},
},
},
};

View file

@ -62,12 +62,6 @@ export default function ({ getService }: FtrProviderContext) {
expect(body.component_templates[0].component_template.template.mappings.dynamic).to.be(
false
);
// Make sure that the `@timestamp` field exists and is set to date
// this can be removed once https://github.com/elastic/elasticsearch/issues/58956 is resolved
expect(
body.component_templates[0].component_template.template.mappings.properties['@timestamp']
.type
).to.be('date');
({ body } = await es.transport.request({
method: 'GET',

View file

@ -207,7 +207,6 @@ export default function (providerContext: FtrProviderContext) {
expect(res.statusCode).equal(200);
expect(res.body.component_templates[0].component_template.template.mappings).eql({
dynamic: true,
properties: { '@timestamp': { type: 'date' } },
});
const resSettings = await es.transport.request({
method: 'GET',