elasticsearch-evolution
elasticsearch-evolution copied to clipboard
adding migration script options file and support
Enable the ability for adding a new configuration file, with options per migration script.
Not all migration scripts must have a reference in this file, but only selected ones.
The only supported option for now is ignoredHttpStatusCodes
, but the format allows adding more options in the future..
Example for options file format:
{
"migrationScriptsOptions": [
{
"fileName": "V001.00__createTemplateWithIndexMapping.http",
"ignoredHttpStatusCodes": [
404,
409
]
}
]
}
Enable the ability for adding a new configuration file, with options per migration script. Not all migration scripts must have a reference in this file, but only selected ones. The only supported option for now is
ignoredHttpStatusCodes
, but the format allows adding more options in the future.. Example for options file format:{ "migrationScriptsOptions": [ { "fileName": "V001.00__createTemplateWithIndexMapping.http", "ignoredHttpStatusCodes": [ 404, 409 ] } ] }
I don't like this approach:
- Json does not support comments, so it's hard to document why such a exception is done.
- you have another indirection and you have to validate that the configured fileName exists and fail if not
- I would prefer a simple annotation like mentioned here https://github.com/senacor/elasticsearch-evolution/issues/140#issuecomment-1164663331 because in my opinion this feature is not really required. You just want to compensate that you don't have your environments under full control. You could bring your environment in sync with the executed scripts and manually update elasticsearch-evolutions's history index.