Problem with export/import repository

Summary

Importing project from one gitlab 12.7.6 to another instance in same version cause 500 Internal Server Error

Steps to reproduce

  1. Download project export from instance A
  2. Import project to instance B

Gitlab B works in HA configuration

What is the current bug behavior?

After importing project gitlab B fails with internal server error in admin view with error as below.

What is the expected correct behavior?

Details of project in admin panel.

Relevant logs

Relevant logs

Started GET "/admin/projects/bu130391/plc130009/clm/clmcore" for 10.40.6.18 at 2020-03-03 13:08:42 +0100 Processing by Admin::ProjectsController#show as HTML Parameters: {"namespace_id"=>"bu130391/plc130009/clm", "id"=>"clmcore"} Completed 500 Internal Server Error in 196ms (ActiveRecord: 67.2ms | Elasticsearch: 0.0ms)

ActionView::Template::Error (Object must be a Date, DateTime or Time object. nil given.): 15: .card 16: .card-header.alert.alert-danger 17: Last repository check 18: = "(#{time_ago_with_tooltip(@project.last_repository_check_at)})" 19: failed. See 20: = link_to 'repocheck.log', admin_logs_path 21: for error messages.

app/helpers/application_helper.rb:155:in time_ago_with_tooltip' app/views/admin/projects/show.html.haml:18:in _app_views_admin_projects_show_html_haml__4537680601837553392_70336523809940' app/controllers/application_controller.rb:121:in render' lib/gitlab/session.rb:11:in with_session' app/controllers/application_controller.rb:467:in set_session_storage' lib/gitlab/i18n.rb:55:in with_locale'

Details of package version

Provide the package version installation details
gitlab-ce-12.7.6-ce.0.el7.x86_64

Environment details

  • Operating System: CentOS Linux release 7.7.1908 (Core)
  • Installation Target, remove incorrect values:
    • VM: Openstack
  • Installation Type, remove incorrect values:
    • Upgrade from version 12.4.3
  • Is there any other software running on the machine: No
  • Is this a single or multiple node installation? Multiple
  • Resources
    • CPU: 3 Gitlab nodes 4 CPUs per gitlab instace
    • Memory total: 32GB per gitlab instance

Configuration details

Provide the relevant sections of `/etc/gitlab/gitlab.rb`
external_url 'https://gitlab.czk.***'
gitlab_rails['gitlab_email_from'] = 'czk-gitlab@***.com'
gitlab_rails['gitlab_email_display_name'] = "Gitlab CZK"
gitlab_rails['gitlab_default_can_create_group'] = false
gitlab_rails['gitlab_username_changing_enabled'] = false
gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_allow_single_sign_on'] = ['oauth2_generic']
gitlab_rails['omniauth_sync_email_from_provider'] = 'oauth2_generic'
gitlab_rails['omniauth_sync_profile_from_provider'] = ['oauth2_generic']
gitlab_rails['omniauth_sync_profile_attributes'] = ['email','first_name','last_name','name']
gitlab_rails['omniauth_auto_sign_in_with_provider'] = 'oauth2_generic'
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_providers'] = [
   {
     "name" => "oauth2_generic",
     "app_id" => "gitlab",
     "app_secret" => "6979bbd7-936b-4af5-bf9f-3197552af01f",
     "args" => {
        'scope' => 'openid',
        client_options: {
                'site' => 'https://iam.***', # including port if necessary
                'user_info_url' => '/auth/realms/***/protocol/openid-connect/userinfo',
                'authorize_url' => '/auth/realms/***/protocol/openid-connect/auth',
                'token_url' => '/auth/realms/***/protocol/openid-connect/token',
        },
        user_response_structure: {
        attributes: { email:'email', first_name:'given_name', last_name:'family_name', name:'name', nickname:'preferred_username' },
        id_path: 'preferred_username'
        },
   }
   }
]
gitlab_rails['manage_backup_path'] = false
gitlab_rails['backup_archive_permissions'] = 0644
git_data_dirs({
   "default" => {
     "path" => "/opt/gitvolume/gitlab-data/git-data"
    }
 })
gitlab_rails['shared_path'] = '/opt/gitvolume/gitlab-data/shared'
gitlab_rails['gitlab_shell_ssh_port'] = 2222
gitlab_rails['uploads_directory'] = "/opt/gitvolume/gitlab-data/uploads"
gitlab_rails['auto_migrate'] = false
gitlab_rails['db_password'] = '***'
gitlab_rails['db_host'] = '127.0.0.1'
gitlab_rails['db_port'] = 5432
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.***.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "czk-gitlab@servers"
gitlab_rails['smtp_password'] = "***"
gitlab_rails['smtp_domain'] = "***.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
unicorn['worker_timeout'] = 600
unicorn['worker_processes'] = 5
sidekiq['concurrency'] = 50
gitlab_shell['custom_hooks_dir'] = "/opt/ept/hooks"
gitlab_shell['auth_file'] = "/opt/gitvolume/gitlab-data/ssh/authorized_keys"
postgresql['enable'] = false
redis['enable'] = true
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/***"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/***"
gitlab_ci['builds_directory'] = '/opt/gitvolume/gitlab-data/builds'
mattermost_nginx['redirect_http_to_https'] = true
registry_nginx['redirect_http_to_https'] = true
pgbouncer['enable'] = false
consul['enable'] = false
Edited by 🤖 GitLab Bot 🤖