Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MigrateRepositoryJob: Pushing a batch of 1 Git refs failed on attempt 4/4. #1217

Open
sasasalamon opened this issue Feb 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@sasasalamon
Copy link

Description

Migrating the entire organization, few repositories failed the migration.
When I tried to migrate those repositories one by one, I'm getting the same error in the logs:

[2024-02-01T18:40:19Z] INFO -- Git source migration started
[2024-02-01T19:05:04Z] ERROR -- MigrateRepositoryJob: Pushing a batch of 1 Git refs failed on attempt 4/4.
[2024-02-01T19:05:04Z] ERROR -- MigrateRepositoryJob: If this happens repeatedly and causes your migration to fail, it means that your repository is too large or complex for GitHub Enterprise Importer.
[2024-02-01T19:05:04Z] ERROR -- Git source migration failed. Please check the Migration Log for more details. Error message: An error occurred while pushing to the remote
[2024-02-01T19:05:04Z] INFO -- Git source migration failed
[2024-02-01T19:05:04Z] INFO -- -----------------------------
[2024-02-01T19:05:04Z] INFO -- Migration failed
[2024-02-01T19:05:04Z] INFO -- -----------------------------

When I run git-sizer on this repo, here are the results:

Processing blobs: 27512
Processing trees: 14920
Processing commits: 4704
Matching commits to trees: 4704
Processing annotated tags: 211
Processing references: 302
| Name                         | Value     | Level of concern               |
| ---------------------------- | --------- | ------------------------------ |
| Overall repository size      |           |                                |
| * Commits                    |           |                                |
|   * Count                    |  4.70 k   |                                |
|   * Total size               |  1.92 MiB |                                |
| * Trees                      |           |                                |
|   * Count                    |  14.9 k   |                                |
|   * Total size               |  51.8 MiB |                                |
|   * Total tree entries       |  1.08 M   |                                |
| * Blobs                      |           |                                |
|   * Count                    |  27.5 k   |                                |
|   * Total size               |  5.09 GiB |                                |
| * Annotated tags             |           |                                |
|   * Count                    |   211     |                                |
| * References                 |           |                                |
|   * Count                    |   302     |                                |
|     * Branches               |     1     |                                |
|     * Tags                   |   218     |                                |
|     * Remote-tracking refs   |    83     |                                |
|                              |           |                                |
| Biggest objects              |           |                                |
| * Commits                    |           |                                |
|   * Maximum size         [1] |  3.68 KiB |                                |
|   * Maximum parents      [2] |     2     |                                |
| * Trees                      |           |                                |
|   * Maximum entries      [3] |   274     |                                |
| * Blobs                      |           |                                |
|   * Maximum size         [4] |  59.3 MiB | ******                         |
|                              |           |                                |
| History structure            |           |                                |
| * Maximum history depth      |  3.17 k   |                                |
| * Maximum tag depth      [5] |     1     |                                |
|                              |           |                                |
| Biggest checkouts            |           |                                |
| * Number of directories  [6] |   294     |                                |
| * Maximum path depth     [7] |     8     |                                |
| * Maximum path length    [7] |   189 B   | *                              |
| * Number of files        [8] |  4.41 k   |                                |
| * Total size of files    [8] |   677 MiB |                                |
| * Number of symlinks     [9] |     3     |                                |
| * Number of submodules       |     0     |                                |

There are no specific rulesets defined, but there are some branch protection rules which are no different than on other repositories where all went through.

Reproduction Steps

gh gei migrate-repo --github-source-org xxx --source-repo xxx --github-target-org xxx --target-repo xxx

@sasasalamon sasasalamon added the bug Something isn't working label Feb 1, 2024
@AndrewCsontos
Copy link

I am having the same issue. I also tried using --skip-releases to see if that would help, but it didn't.

@AndrewCsontos
Copy link

After working with Github Support, there is a setting they can change in the target organization called Octoshift GitOps Feature flag which helped us get past this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants