Skip to content

Migration from CodeCommit including PRs causes runtime error #34320

Open
@tfmm

Description

@tfmm

Description

When trying to migrate a repository and PRs from codecommit, I consistently get this error:

2025/04/29 15:23:23 ...ices/task/migrate.go:48:func1() [E] PANIC during runMigrateTask[4] by DoerID[6] to RepoID[93] for OwnerID[6]: runtime error: invalid memory address or nil pointer dereference
Stacktrace: /usr/local/go/src/runtime/panic.go:262 (0x47bad8)
/usr/local/go/src/runtime/signal_unix.go:917 (0x47baa8)
/go/src/code.gitea.io/gitea/services/migrations/codecommit.go:194 (0x2733478)
/go/src/code.gitea.io/gitea/modules/migration/retry_downloader.go:174 (0x2170285)
/go/src/code.gitea.io/gitea/modules/migration/retry_downloader.go:37 (0x216f643)
/go/src/code.gitea.io/gitea/modules/migration/retry_downloader.go:173 (0x21701ce)
/go/src/code.gitea.io/gitea/services/migrations/migrate.go:386 (0x275e102)
/go/src/code.gitea.io/gitea/services/migrations/migrate.go:130 (0x275cb44)
/go/src/code.gitea.io/gitea/services/task/migrate.go:123 (0x2a45948)
/go/src/code.gitea.io/gitea/services/task/task.go:34 (0x2a46864)
/go/src/code.gitea.io/gitea/services/task/task.go:52 (0x2a46afa)
/go/src/code.gitea.io/gitea/modules/queue/workerqueue.go:250 (0x1f0d5c1)
/go/src/code.gitea.io/gitea/modules/queue/workergroup.go:103 (0x1f0c32d)
/go/src/code.gitea.io/gitea/modules/queue/workergroup.go:183 (0x1f0bcb8)
/usr/local/go/src/runtime/asm_amd64.s:1700 (0x482060)
2025/04/29 15:23:23 ...ices/task/migrate.go:60:func1() [E] runMigrateTask[4] by DoerID[6] to RepoID[93] for OwnerID[6] failed: PANIC whilst trying to do migrate task: runtime error: invalid memory address or nil pointer dereference

If I deselect the pull request option, the repository migrates, however I need the PRs.

Gitea Version

1.23.7

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Docker

How are you running Gitea?

Docker

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/repo-migrationMigrate repos from other platforms to Gitea, or from Gitea to themtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions