Skip to content

Prepare Jira import for caching users mapping

Jarka Košanová requested to merge 214808-store-users-mapping-prep1 into master

What does this MR do?

It adds a method for writing and reading Users mapping in Gitlab::JiraImport.

For writing users mapping we expect to have hash in format of jira_account_id => user_id. A method write_multiple has been changed in Gitlab::Cache::Import::Caching - pipelined is used instead of multi (for better performance as we don't need transactions - the method is used on two other places: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/github_import/label_finder.rb#L30, https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/github_import/milestone_finder.rb#L33) and a param key_prefix was added.

Another small change in JiraImport is renaming of jira_issue_cache_key to jira_item_cache_key (and related variables/constants) as the format for users will be very similar.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Preparation for #214808 (closed)

Edited by Jarka Košanová

Merge request reports