Users cannot enable Pull Mirroring on projects created from templates
Summary
User cannot enable Pull Repository Mirroring on a project that was created from a Custom project template. The mirror process never completes and the user is unable to force update. They only get the following error message.
"import_error": "Import timed out. Import took longer than 86400 seconds",
Steps to reproduce
- Create a custom project template in one of your groups by following the documentation.
- On your group, create a project using one of the templates.
- Once the project is created, you can verify the status using the Project Import API and confirm it is finished.
"import_status": "finished",
- Enable Pull Repository mirroring
- Observe that the import will never complete and you will eventually get the following status.
"import_status": "scheduled",
"import_type": "gitlab_custom_project_template",
"import_error": "Import timed out. Import took longer than 86400 seconds",
Example Project
https://gitlab.com/gitlab-gold/kballon/bug-mirror-project-from-project-template
What is the current bug behavior?
The pull mirror never completes the update.
What is the expected correct behavior?
The pull mirror should complete the update.
Relevant logs and/or screenshots
- Import from a newly created repository from a project template.
{
"id": 94,
"description": null,
"name": "tp-02-non-empty-template",
"name_with_namespace": "test-root-group / tp-02-non-empty-template",
"path": "tp-02-non-empty-template",
"path_with_namespace": "test-root-group/tp-02-non-empty-template",
"created_at": "2023-02-09T01:04:49.842Z",
"import_status": "finished",
"import_type": "gitlab_custom_project_template",
"correlation_id": null,
"failed_relations": [],
"import_error": null,
"stats": null
}
- Import after enabling Pull mirroring.
{
"id": 94,
"description": null,
"name": "tp-02-non-empty-template",
"name_with_namespace": "test-root-group / tp-02-non-empty-template",
"path": "tp-02-non-empty-template",
"path_with_namespace": "test-root-group/tp-02-non-empty-template",
"created_at": "2023-02-09T01:04:49.842Z",
"import_status": "scheduled",
"import_type": "gitlab_custom_project_template",
"correlation_id": null,
"failed_relations": [],
"import_error": null,
"stats": null
}
- After some time, the
import_erroris updated to this:
{
"id": 94,
"description": null,
"name": "tp-02-non-empty-template",
"name_with_namespace": "test-root-group / tp-02-non-empty-template",
"path": "tp-02-non-empty-template",
"path_with_namespace": "test-root-group/tp-02-non-empty-template",
"created_at": "2023-02-09T01:04:49.842Z",
"import_status": "scheduled",
"import_type": "gitlab_custom_project_template",
"correlation_id": null,
"failed_relations": [],
"import_error": "Import timed out. Import took longer than 86400 seconds",
"stats": null
}
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
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
Edited by Vasilii Iakliushin