Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab FOSS
GitLab FOSS
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • Container Registry
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #36965

Closed
Open
Opened Aug 24, 2017 by Lukáš Raška@lukasraska
  • Report abuse
  • New issue
Report abuse New issue

Unable to import GitLab export due to PG::NotNullViolation in 9.5

Summary

In 9.5 when certain project is imported (as export from different 9.5), following exception is thrown

Import/Export error raised on /opt/gasdasdaasdqitlab/embedded/service/gitlab-rails/lib/gitlasdab/import_export/project_tree_restorer.rb:29:in `rescue in restore': PG::NotNullViolation: ERROR:  null value in column "action" violates not-null constraint
DETAIL:  Failing row contains (2183, 43, 5, 4, 2017-08-24 12:31:20.214+00, 2017-08-24 12:31:20.214+00, null, Issue).
: INSERT INTO "events_for_migration" ("id", "target_type", "target_id", "project_id", "created_at", "updated_at", "author_id") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"

Steps to reproduce

Export project in 9.5 and import in another 9.5

Example Project

n/a (two different projects tried)

What is the current bug behavior?

Project is not imported

What is the expected correct behavior?

Project is imported

Relevant logs and/or screenshots

In description

Results of GitLab environment info

Export Gitlab (CentOS)

System information
System:		
Current User:	git
Using RVM:	no
Ruby Version:	2.3.3p222
Gem Version:	2.6.6
Bundler Version:1.13.7
Rake Version:	12.0.0
Redis Version:	3.2.5
Git Version:	2.13.5
Sidekiq Version:5.0.4
Go Version:	unknown

GitLab information
Version:	9.5.0
Revision:	77bfdac
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	postgresql
URL:		https://<url>
HTTP Clone URL:	https://<url>/some-group/some-project.git
SSH Clone URL:	git@<url>:some-group/some-project.git
Using LDAP:	yes
Using Omniauth:	no

GitLab Shell
Version:	5.8.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
Hooks:		/opt/gitlab/embedded/service/gitlab-shell/hooks
Git:		/opt/gitlab/embedded/bin/git

Import GitLab

System information
System:		RedHatEnterpriseServer 7.3
Current User:	git
Using RVM:	no
Ruby Version:	2.3.3p222
Gem Version:	2.6.6
Bundler Version:1.13.7
Rake Version:	12.0.0
Redis Version:	3.2.5
Git Version:	2.13.5
Sidekiq Version:5.0.4
Go Version:	unknown

GitLab information
Version:	9.5.0
Revision:	77bfdac
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	postgresql
URL:		https://<url>
HTTP Clone URL:	https://<url>/some-group/some-project.git
SSH Clone URL:	git@<url>:some-group/some-project.git
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers: saml

GitLab Shell
Version:	5.8.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
Hooks:		/opt/gitlab/embedded/service/gitlab-shell/hooks
Git:		/opt/gitlab/embedded/bin/git

Results of GitLab application Check

Export GitLab

Checking GitLab Shell ...

GitLab Shell version >= 5.8.0 ? ... OK (5.8.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:root, or git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ... 
3/1 ... ok
3/2 ... ok
2/3 ... ok
16/6 ... ok
18/8 ... repository is empty
17/9 ... ok
17/11 ... ok
17/12 ... ok
22/13 ... ok
20/16 ... ok
21/17 ... ok
24/18 ... ok
17/20 ... ok
20/21 ... ok
17/22 ... ok
20/23 ... repository is empty
21/24 ... ok
20/25 ... ok
32/26 ... repository is empty
20/27 ... ok
20/29 ... ok
34/30 ... ok
21/31 ... ok
36/32 ... ok
34/35 ... ok
37/38 ... ok
38/39 ... ok
17/40 ... ok
17/41 ... ok
17/42 ... ok
39/43 ... ok
39/44 ... ok
20/45 ... ok
20/46 ... ok
20/47 ... ok
23/48 ... ok
36/50 ... repository is empty
36/51 ... repository is empty
15/52 ... ok
20/53 ... ok
15/54 ... ok
17/55 ... ok
20/56 ... ok
20/57 ... ok
21/58 ... ok
20/59 ... ok
21/60 ... ok
17/61 ... ok
21/63 ... ok
20/64 ... ok
32/65 ... ok
32/66 ... repository is empty
32/67 ... ok
20/68 ... ok
20/69 ... ok
53/70 ... ok
53/71 ... ok
58/72 ... ok
58/73 ... ok
21/75 ... ok
58/76 ... ok
23/77 ... ok
63/79 ... ok
64/80 ... ok
63/81 ... ok
38/82 ... ok
63/83 ... ok
70/85 ... ok
45/86 ... ok
70/88 ... ok
70/89 ... ok
70/90 ... ok
70/91 ... ok
70/92 ... ok
70/93 ... ok
70/95 ... ok
70/97 ... ok
70/99 ... ok
70/100 ... ok
70/101 ... ok
38/102 ... ok
70/103 ... ok
70/104 ... ok
38/105 ... ok
21/106 ... ok
70/107 ... ok
70/108 ... ok
32/109 ... repository is empty
72/110 ... ok
72/111 ... ok
70/112 ... ok
70/113 ... ok
70/114 ... ok
72/115 ... ok
70/116 ... ok
72/117 ... ok
38/118 ... ok
72/119 ... ok
78/120 ... repository is empty
20/121 ... ok
72/124 ... ok
70/125 ... ok
70/126 ... ok
70/127 ... ok
70/128 ... ok
72/129 ... ok
70/130 ... ok
2/132 ... ok
3/133 ... ok
73/134 ... ok
70/135 ... ok
2/136 ... ok
87/137 ... repository is empty
90/138 ... repository is empty
70/140 ... ok
70/141 ... ok
70/142 ... ok
20/143 ... ok
45/144 ... ok
70/145 ... ok
2/146 ... ok
2/147 ... ok
103/154 ... ok
73/155 ... ok
70/156 ... ok
70/157 ... ok
96/158 ... ok
2/159 ... ok
72/160 ... ok
70/161 ... ok
32/162 ... repository is empty
70/163 ... repository is empty
72/165 ... ok
2/166 ... ok
70/167 ... ok
70/168 ... ok
70/169 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Reply by email ...

Reply by email is disabled in config/gitlab.yml

Checking Reply by email ... Finished

Checking LDAP ...

Server: ldapmain
LDAP authentication... Success
LDAP users with access to your GitLab server (only showing the first 100 results)
	<DNS>
Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Projects have namespace: ... 
3/1 ... yes
3/2 ... yes
2/3 ... yes
16/6 ... yes
18/8 ... yes
17/9 ... yes
17/11 ... yes
17/12 ... yes
22/13 ... yes
20/16 ... yes
21/17 ... yes
24/18 ... yes
17/20 ... yes
20/21 ... yes
17/22 ... yes
20/23 ... yes
21/24 ... yes
20/25 ... yes
32/26 ... yes
20/27 ... yes
20/29 ... yes
34/30 ... yes
21/31 ... yes
36/32 ... yes
34/35 ... yes
37/38 ... yes
38/39 ... yes
17/40 ... yes
17/41 ... yes
17/42 ... yes
39/43 ... yes
39/44 ... yes
20/45 ... yes
20/46 ... yes
20/47 ... yes
23/48 ... yes
36/50 ... yes
36/51 ... yes
15/52 ... yes
20/53 ... yes
15/54 ... yes
17/55 ... yes
20/56 ... yes
20/57 ... yes
21/58 ... yes
20/59 ... yes
21/60 ... yes
17/61 ... yes
21/63 ... yes
20/64 ... yes
32/65 ... yes
32/66 ... yes
32/67 ... yes
20/68 ... yes
20/69 ... yes
53/70 ... yes
53/71 ... yes
58/72 ... yes
58/73 ... yes
21/75 ... yes
58/76 ... yes
23/77 ... yes
63/79 ... yes
64/80 ... yes
63/81 ... yes
38/82 ... yes
63/83 ... yes
70/85 ... yes
45/86 ... yes
70/88 ... yes
70/89 ... yes
70/90 ... yes
70/91 ... yes
70/92 ... yes
70/93 ... yes
70/95 ... yes
70/97 ... yes
70/99 ... yes
70/100 ... yes
70/101 ... yes
38/102 ... yes
70/103 ... yes
70/104 ... yes
38/105 ... yes
21/106 ... yes
70/107 ... yes
70/108 ... yes
32/109 ... yes
72/110 ... yes
72/111 ... yes
70/112 ... yes
70/113 ... yes
70/114 ... yes
72/115 ... yes
70/116 ... yes
72/117 ... yes
38/118 ... yes
72/119 ... yes
78/120 ... yes
20/121 ... yes
72/124 ... yes
70/125 ... yes
70/126 ... yes
70/127 ... yes
70/128 ... yes
72/129 ... yes
70/130 ... yes
2/132 ... yes
3/133 ... yes
73/134 ... yes
70/135 ... yes
2/136 ... yes
87/137 ... yes
90/138 ... yes
70/140 ... yes
70/141 ... yes
70/142 ... yes
20/143 ... yes
45/144 ... yes
70/145 ... yes
2/146 ... yes
2/147 ... yes
103/154 ... yes
73/155 ... yes
70/156 ... yes
70/157 ... yes
96/158 ... yes
2/159 ... yes
72/160 ... yes
70/161 ... yes
32/162 ... yes
70/163 ... yes
72/165 ... yes
2/166 ... yes
70/167 ... yes
70/168 ... yes
70/169 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.3 ? ... yes (2.3.3)
Git version >= 2.7.3 ? ... yes (2.13.5)
Active users: ... 92

Checking GitLab ... Finished

Import GitLab

Checking GitLab Shell ...

GitLab Shell version >= 5.8.0 ? ... OK (5.8.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:root, or git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ... 
5/1 ... ok
17/3 ... ok
17/4 ... ok
5/8 ... ok
5/9 ... ok
5/11 ... ok
17/12 ... ok
5/13 ... ok
5/14 ... ok
19/16 ... ok
25/19 ... ok
25/20 ... ok
17/21 ... ok
17/22 ... ok
17/24 ... repository is empty
17/31 ... ok
17/33 ... repository is empty
34/36 ... ok
5/37 ... ok
5/38 ... ok
7/39 ... ok
17/40 ... ok
53/41 ... ok
17/42 ... ok
5/45 ... repository is empty
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Reply by email ...

Reply by email is disabled in config/gitlab.yml

Checking Reply by email ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Projects have namespace: ... 
5/1 ... yes
17/3 ... yes
17/4 ... yes
5/8 ... yes
5/9 ... yes
5/11 ... yes
17/12 ... yes
5/13 ... yes
5/14 ... yes
19/16 ... yes
25/19 ... yes
25/20 ... yes
17/21 ... yes
17/22 ... yes
17/24 ... yes
17/31 ... yes
17/33 ... yes
34/36 ... yes
5/37 ... yes
5/38 ... yes
7/39 ... yes
17/40 ... yes
53/41 ... yes
17/42 ... yes
5/45 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.3 ? ... yes (2.3.3)
Git version >= 2.7.3 ? ... yes (2.13.5)
Active users: ... 42

Checking GitLab ... Finished

Possible fixes

Related issues

  • Discussion
  • Designs
Assignee
Assign to
9.5
Milestone
9.5
Assign milestone
Time tracking
None
Due date
None
3
Labels
Next Patch Release import regression
Assign labels
  • View project labels
Reference: gitlab-org/gitlab-foss#36965