Prepare Jira import for caching users mapping
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
- [-] 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.
Preparation for #214808 (closed)