Import Instability: NoMethodError - undefined method 'new_pos'

Summary

When Importing project to gitlab self-hosted (18.5.1-ee) some data fails to import. Additionally during the import we get a 429 error on the status page. Not sure if these are related, but we saw them on the same import. This results in some missing data on the repo

Steps to reproduce

  • Use Gitlab's import project workflow on a large repo (ours was ~4GB with lots of additional repo data) into gitlab and wait until errors arise. Our import in total took over

Example Project

N/A - Self hosted instance

What is the current bug behavior?

  • The failed imports cause some data to be missing after migration completes.
  • Import page at import/github/status will also throw 429 error when visiting the page sometimes.

What is the expected correct behavior?

  • All data gets imported properly with no errors.
  • Able to visit the import status page at any point during the migration without error.

Relevant logs and/or screenshots

Got 9x of this error.

```

{ "exception_class": "NoMethodError", "exception_message": "undefined method `new_pos' for nil:NilClass", "correlation_id_value": "01K9JX9K9K9NVV2XZCF7J7V55J", "source": "Gitlab::GithubImport::Importer::DiffNoteImporter", "created_at": "2025-11-09T02:22:07.945Z", "github_identifiers": { "object_type": "diff_note", "note_id": 2421399761, "noteable_type": "MergeRequest", "noteable_iid": 21963 } }

```

Output of checks

Results of GitLab environment info

Click to expand
System information
System:		Ubuntu 22.04
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	3.2.8
Gem Version:	3.7.1
Bundler Version:2.7.1
Rake Version:	13.0.6
Redis Version:	7.2.10
Sidekiq Version:7.3.9
Go Version:	unknown

GitLab information
Version:	18.5.1-ee
Revision:	a01b2eeb76d
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	16.10
URL:		REDACTED
HTTP Clone URL:	REDACTED
SSH Clone URL:	REDACTED
Elasticsearch:	no
Geo:		no
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers: openid_connect

GitLab Shell
Version:	14.45.3
Repository storages:
- default: 	tcp://10.170.72.7:8075
- storage1: 	tcp://10.170.72.7:8075
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell

Gitaly
- default Address: 	tcp://10.170.72.7:8075
- default Version: 	18.5.1
- default Git Version: 	2.50.1
- storage1 Address: 	tcp://10.170.72.7:8075
- storage1 Version: 	18.5.1
- storage1 Git Version: 	2.50.1

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:check SANITIZE=true`)

(For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`)

(we will only investigate if the tests are passing)

Possible fixes

Unclear.

Edited by 🤖 GitLab Bot 🤖