While this is desirable to index workflow parameters, there is an edge case when Elasticsearch does automated date and numeric detection. As such this can indexing to fail when parameter FOO is a date in one workflow but a text comment in another.
Steps To Reproduce
Use a param that has value 2021-07-15 and then another workflow with the same param but value 2021-07-15a
Elasticsearch will complain:
2021-07-15 13:20:19.647 ERROR 1 --- [container-0-C-1] o.i.workflow.relay.service.IndexService : Out of order, already have newer version for run wes-09827a9ca80f4e60ad44ce635ffbaba0, exception: Elasticsearch exception [type=mapper_parsing_exception, reason=failed to parse field [parameters._batch_id] of type [date] in document with id 'wes-09827a9ca80f4e60ad44ce635ffbaba0'. Preview of field's value: '2021-07-09a']
Expected behaviour
If we force everything into keyword so that it is all normalised, we should not run into any indexing issues.
Describe the bug
User and system provided workflow parameters, that are part of the
parameters
json object are dynamically mapped and indexed in Elasticsearch thanks todynamic
set to true: https://github.com/icgc-argo/workflow-relay/blob/develop/src/main/resources/run_log_mapping.json#L3While this is desirable to index workflow parameters, there is an edge case when Elasticsearch does automated date and numeric detection. As such this can indexing to fail when parameter
FOO
is adate
in one workflow but atext
comment in another.Steps To Reproduce
Use a param that has value
2021-07-15
and then another workflow with the same param but value2021-07-15a
Elasticsearch will complain:Expected behaviour
If we force everything into keyword so that it is all normalised, we should not run into any indexing issues.