Add started_at/completed_at timestamps to Elasticsearch migrations
What does this MR do?
Elasticsearch migrations were introduced in !46672 (merged) . This is a framework similar to Rails DB migrations that is used to apply schema changes to our Elasticsearch data. This MR just extends this slightly to persist timestamps in the saved migration record.
When saving Elasticsearch migrations we set a started_at
and
completed_at
value. This will help us with debugging as this
information will make it much easier to find relevant logs for what
happened.
As this index was not declared with strict dynamic
mapping
it is totally safe to just add new fields to the payload without them
existing already in the configuration and I have tested locally that
this works as well.
For the sake of clarity, however, we have added them to the mappings as there is no reason not to.
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #282557 (closed)