Skip to content

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:

Screenshot_2021-01-14_at_20.05.45

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.

Screenshot_2021-01-14_at_20.15.04

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

Availability and Testing

Edited by Andy Schoenen

Merge request reports

Loading