Skip to content

Bitbucket server object importer return early on failure

Madelein van Niekerk requested to merge 425735-fix-undefined-method-nil into master

What does this MR do and why?

Fixes NoMethodError Sidekiq/Gitlab::BitbucketServerImport::ImportPullRequestNotesWorker undefined method '[]' for nil:NilClass (example).

The issue occurs when the import failed (and thus project.import_data deleted) but the worker was already enqueued and therefore fails when trying to build the client using project.import_data. See full explanation here.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #425735 (closed)

Edited by Madelein van Niekerk

Merge request reports