Skip to content

Commit

Permalink
[Fleet] Remove timestamp field from component template (#99619)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
kpollich authored May 10, 2021
1 parent ec66797 commit baf11e8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
},
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit baf11e8

Please sign in to comment.