Change Jira Connect update sequence id to use Unix Time
What does this MR do?
It changes the way we generate the update sequence id from monotonic time to unix time.
We include the update sequence ID when we send data to Jira. It is used to order the updates so Jira can figure out what is the latest update.
Here is the definition from the Jira API docs:
Looking into #229174 (closed) I found that sometimes we send a lower update sequence id than before even though it should always be incremented. See JiraConnect::SyncMergeRequestWorker logs (internal only). The second job argument is the update sequence id.
If Jira receives a new update with a lower update sequence id, the update will be ignored. I think the lower numbers get generated because monotonic time counts the number of seconds since system boot. This means it resets with every deploy and can be different in each process. If we use unix time, we can be sure that the number is always incremented.
Related issues
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