Remove InvalidForeignKey rescue and add logs in GitHub Import
What does this MR do and why?
Raises an error when a noteable_id can't be found using GithubImport::IssuableFinder
And removes InvalidForeignKey rescues from importer classes. The rescues were added long ago, and they don't seem necessary. For example, the comment says: It's possible the project and the issue have been deleted since scheduling this job. In this case we'll just skip creating the note
. Projects should be present in most cases as it is fetched before starting the importer. And users are unlikely to delete issues during a project import.
Besides, it is better to let the error be raised since a import_failure record will be created allowing users to know the record wasn't migrated.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Enabled GitHub Import in http://gdk.test:3000/admin/application_settings/general -> Visibility and access controls -> Import Sources -> GitHub Import
- Go to New Project
- Select Import
- Then Select GitHub
- Provide an access token
- Select the project to be imported
- Wait for the import to finish
- Check if the project was imported
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.