Promote milestone: attachments error
Summary
After a mileston has been promoted from project to group, its attachments are no longer available.
Steps to reproduce
- Create a new milestone on a project
- Add one or more attachments to the milestone
- Save the data
- Promote the milestone
- Open the milestone
- Open the milestone attachments
- The documents are no longer available
What is the current bug behavior?
At the milestone creation time, the document is stored in the project directory (i.e.: uploads/GROUP/PROJECT/cbf617b18d9f13eee40d7771e294fc52).
After the milestone has been promoted, the document remains in the original directory but the download link points to the GROUP directory (i.e. uploads/-/system/namespace/31/cbf617b18d9f13eee40d7771e294fc52).
The 404 page will be displayed.
What is the expected correct behavior?
The attached documents must also be available after the promotion.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 18.04 Current User: git Using RVM: no Ruby Version: 2.6.6p146 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 5.0.9 Git Version: 2.27.0 Sidekiq Version:5.2.9 Go Version: unknown GitLab information Version: 13.2.2 Revision: 64fc0138d55 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 11.7 URL: https://gitlab.company.cloud HTTP Clone URL: https://gitlab.company.cloud/some-group/some-project.git SSH Clone URL: git@gitlab.company.cloud:some-group/some-project.git Using LDAP: yes Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.3.0 Repository storage paths: - default: /data/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 13.3.0 ? ... OK (13.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... Server: ldapmain not verifying SSL hostname of LDAPS server 'sdc1.company.local:636' LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 26 users of 100 limit.
Checking LDAP ... Finished
Checking GitLab App ...
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: ... 4/1 ... yes 4/2 ... yes 3/9 ... yes 3/10 ... yes 6/11 ... yes 6/12 ... yes 5/14 ... yes 6/15 ... yes 18/16 ... yes 19/17 ... yes 20/18 ... yes 27/19 ... yes 20/21 ... yes 19/22 ... yes 6/23 ... yes 20/24 ... yes 20/25 ... yes 20/26 ... yes 20/27 ... yes 29/28 ... yes 29/29 ... yes 20/30 ... yes 20/31 ... yes 20/32 ... yes 20/33 ... yes 19/34 ... yes 19/35 ... yes 20/37 ... yes 20/38 ... yes 20/39 ... yes 20/40 ... yes 29/41 ... yes 20/42 ... yes 30/43 ... yes 19/45 ... yes 31/46 ... yes 20/47 ... yes 32/49 ... yes 22/50 ... yes 31/51 ... yes 20/52 ... yes 20/53 ... yes 20/54 ... yes 20/55 ... yes 31/56 ... yes 25/58 ... yes 37/60 ... yes 34/61 ... yes 38/62 ... yes 6/63 ... yes 37/64 ... yes 44/65 ... yes 34/66 ... yes 34/67 ... yes 39/68 ... yes 3/69 ... yes 25/70 ... yes 43/71 ... yes 44/72 ... yes 44/73 ... yes 56/74 ... yes 56/75 ... yes 46/76 ... yes 47/77 ... yes 48/78 ... yes 52/79 ... yes 52/80 ... yes 53/81 ... yes 53/82 ... yes 52/83 ... yes 44/84 ... yes 15/85 ... yes 46/87 ... yes 5/88 ... yes 5/89 ... yes 5/90 ... yes 5/91 ... yes 5/92 ... yes 5/93 ... yes 25/94 ... yes 44/95 ... yes 25/96 ... yes 46/97 ... yes 25/98 ... yes 25/99 ... yes 31/100 ... yes 31/101 ... yes 34/102 ... yes 34/103 ... yes 31/104 ... yes 31/105 ... yes 43/106 ... yes 76/107 ... yes 34/108 ... yes 25/109 ... yes 23/111 ... yes 31/113 ... yes 31/114 ... yes 29/115 ... yes 56/116 ... yes 42/117 ... yes 57/118 ... yes 31/120 ... yes 25/121 ... yes 31/122 ... yes 31/123 ... yes 59/124 ... yes 60/125 ... yes 31/126 ... yes 31/127 ... yes 31/129 ... yes 23/131 ... yes 31/132 ... yes 31/133 ... yes 61/134 ... yes 62/135 ... yes 57/136 ... yes 43/137 ... yes 63/138 ... yes 64/139 ... yes 57/140 ... yes 25/141 ... yes 25/142 ... yes 31/144 ... yes 66/145 ... yes 68/146 ... yes 68/147 ... yes 31/148 ... yes 43/149 ... yes 31/150 ... yes 57/151 ... yes 70/152 ... yes 42/153 ... yes 72/154 ... yes 75/155 ... yes 79/157 ... yes 17/158 ... yes 61/159 ... yes 82/160 ... yes 86/164 ... yes 86/165 ... yes 5/166 ... yes 88/167 ... yes 31/168 ... yes 62/169 ... yes 43/170 ... yes 89/171 ... yes 90/172 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.6) Git version >= 2.22.0 ? ... yes (2.27.0) Git user has default SSH configuration? ... yes Active users: ... 24 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... no Try fixing it: Please migrate all projects to hashed storage as legacy storage is deprecated in 13.0 and support will be removed in 14.0. For more information see: doc/administration/repository_storage_types.md
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
Moving the files from project directory (i.e.: uploads/GROUP/PROJECT/cbf617b18d9f13eee40d7771e294fc52) to the system dir (i.e.: uploads/-/system/namespace/31/cbf617b18d9f13eee40d7771e294fc52) it will resolve the problem.