Skip to content

Atom feed 500 error after pushing new project with tags

Summary

Creating a project with a bunch of commits and some tags appears to break the Activity Atom feed.

Steps to reproduce

See #247459 (comment 423276176).

Example Project

https://gitlab.com/ancow/atom-500-test

What is the current bug behavior?

Accessing the Atom feed at /dashboard/projects.atom?rss_token=XXX produces an HTTP 500 error.

What is the expected correct behavior?

Atom feed is generated successfully.

Relevant logs and/or screenshots

Started GET "/dashboard/projects.atom" for 10.91.100.1 at 2020-09-10 05:21:49 +0200
Processing by Dashboard::ProjectsController#index as ATOM
Completed 500 Internal Server Error in 599ms (ActiveRecord: 97.6ms | Elasticsearch: 0.0ms | Allocations: 85821)
  
ActionView::Template::Error (No route matches {:action=>"show", :controller=>"projects/commits", :format=>"atom", :id=>nil, :namespace_id=>#<Group id:19 @bu.lsc>, :project_id=>#<Project id:229 bu.lsc/setup>>}, possible unmatched constraints: [:id]):
    4: 
    5: xml.entry do
    6:   xml.id      "tag:#{request.host},#{event.created_at.strftime("%Y-%m-%d")}:#{event.id}"
    7:   xml.link    href: event_feed_url(event)
    8:   xml.title   truncate(event_feed_title(event), length: 80)
    9:   xml.updated event.updated_at.xmlschema
   10: 
  
config/application.rb:321:in `block (4 levels) in <class:Application>'
app/helpers/events_helper.rb:173:in `push_event_feed_url'
app/helpers/events_helper.rb:156:in `event_feed_url'
app/views/events/_event.atom.builder:7
app/views/events/_event.atom.builder:5
app/views/dashboard/projects/index.atom.builder:7
app/controllers/application_controller.rb:134:in `render'
app/controllers/dashboard/projects_controller.rb:24:in `block (2 levels) in index'
app/controllers/dashboard/projects_controller.rb:18:in `index'
app/controllers/application_controller.rb:491:in `set_current_admin'
lib/gitlab/session.rb:11:in `with_session'
app/controllers/application_controller.rb:482:in `set_session_storage'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:476:in `set_locale'
lib/gitlab/error_tracking.rb:50:in `with_context'
app/controllers/application_controller.rb:541:in `sentry_context'
app/controllers/application_controller.rb:469:in `block in set_current_context'
lib/gitlab/application_context.rb:52:in `block in use'
lib/gitlab/application_context.rb:52:in `use'
lib/gitlab/application_context.rb:20:in `with_context'
app/controllers/application_controller.rb:462:in `set_current_context'
lib/gitlab/request_profiler/middleware.rb:17:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/multipart.rb:140:in `call'
lib/gitlab/middleware/read_only/controller.rb:51:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/same_site_cookies.rb:27:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'
lib/gitlab/middleware/request_context.rb:23:in `call'
config/initializers/fix_local_cache_middleware.rb:9:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:60:in `call'
lib/gitlab/middleware/release_env.rb:12:in `call'

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info Note: in the output below I changed the hostname.
System information
System:         Debian 10
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.9
Revision:       d43bc5ce99e
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     11.7
URL:            http://gitlab.example.com
HTTP Clone URL: http://gitlab.example.com/some-group/some-project.git
SSH Clone URL:  git@gitlab.example.com:some-group/some-project.git
Using LDAP:     yes
Using Omniauth: yes
Omniauth Providers: 

GitLab Shell
Version:        13.3.0
Repository storage paths:
- default:      /var/opt/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 LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 93 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: ... 2/1 ... yes 2/2 ... yes 3/4 ... yes 6/5 ... yes 2/6 ... yes 2/7 ... yes 6/8 ... yes 6/9 ... yes 6/10 ... yes 6/11 ... yes 6/12 ... yes 6/13 ... yes 6/14 ... yes 6/15 ... yes 8/16 ... yes 11/17 ... yes 12/18 ... yes 18/19 ... yes 12/20 ... yes 6/21 ... yes 2/22 ... yes 27/25 ... yes 27/26 ... yes 27/27 ... yes 27/28 ... yes 30/29 ... yes 30/30 ... yes 31/31 ... yes 31/32 ... yes 31/33 ... yes 31/34 ... yes 31/35 ... yes 31/36 ... yes 31/37 ... yes 31/38 ... yes 31/39 ... yes 31/40 ... yes 31/41 ... yes 29/42 ... yes 28/43 ... yes 27/44 ... yes 32/45 ... yes 6/46 ... yes 33/48 ... yes 33/49 ... yes 34/50 ... yes 34/51 ... yes 18/52 ... yes 27/53 ... yes 30/54 ... yes 30/55 ... yes 49/56 ... yes 8/57 ... yes 9/58 ... yes 9/59 ... yes 33/60 ... yes 7/62 ... yes 9/63 ... yes 14/64 ... yes 3/65 ... yes 42/66 ... yes 29/67 ... yes 15/68 ... yes 6/69 ... yes 12/70 ... yes 30/71 ... yes 3/72 ... yes 54/74 ... yes 52/75 ... yes 53/76 ... yes 47/77 ... yes 55/78 ... yes 2/79 ... yes 57/80 ... yes 30/81 ... yes 56/82 ... yes 15/84 ... yes 15/85 ... yes 51/87 ... yes 23/88 ... yes 15/89 ... yes 15/91 ... yes 56/92 ... yes 3/93 ... yes 40/94 ... yes 7/95 ... yes 7/96 ... yes 59/97 ... yes 40/98 ... yes 33/99 ... yes 3/100 ... yes 30/101 ... yes 40/102 ... yes 63/103 ... yes 63/104 ... yes 56/105 ... yes 6/106 ... yes 57/107 ... yes 18/108 ... yes 18/110 ... yes 56/111 ... yes 53/112 ... yes 44/113 ... yes 40/117 ... yes 9/118 ... yes 65/119 ... yes 2/120 ... yes 2/121 ... yes 56/122 ... yes 67/123 ... yes 67/124 ... yes 24/125 ... yes 68/126 ... yes 12/127 ... yes 16/128 ... yes 3/129 ... yes 40/131 ... yes 63/132 ... yes 14/133 ... yes 63/134 ... yes 6/135 ... yes 56/136 ... yes 33/137 ... yes 9/138 ... yes 44/139 ... yes 9/140 ... yes 3/145 ... yes 56/150 ... yes 40/151 ... yes 9/152 ... yes 6/155 ... yes 40/156 ... yes 38/157 ... yes 38/158 ... yes 18/159 ... yes 3/160 ... yes 22/163 ... yes 23/165 ... yes 23/166 ... yes 23/167 ... yes 7/168 ... yes 23/169 ... yes 23/170 ... yes 23/171 ... yes 23/172 ... yes 23/173 ... yes 18/174 ... yes 18/175 ... yes 18/176 ... yes 18/177 ... yes 22/179 ... yes 56/182 ... yes 77/183 ... yes 18/184 ... yes 2/185 ... yes 2/186 ... yes 77/188 ... yes 79/189 ... yes 2/190 ... yes 77/192 ... yes 79/193 ... yes 75/194 ... yes 3/195 ... yes 75/196 ... yes 12/197 ... yes 16/198 ... yes 56/199 ... yes 6/200 ... yes 6/201 ... yes 6/202 ... yes 6/203 ... yes 44/204 ... yes 22/205 ... yes 6/206 ... yes 6/207 ... yes 6/208 ... yes 9/209 ... yes 14/210 ... yes 3/211 ... yes 11/212 ... yes 2/213 ... yes 56/214 ... yes 56/215 ... yes 6/216 ... yes 56/217 ... yes 79/218 ... yes 87/219 ... yes 75/220 ... yes 79/221 ... yes 8/222 ... yes 8/223 ... yes 8/224 ... yes 8/225 ... yes 79/226 ... yes 19/229 ... 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: ... 44 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Possible fixes

Not so much a fix as a workaround, but exporting and re-importing the project seems to have resolved the issue.

Edited by Reinhold Rumberger