Repository `exists?` value not invalidated properly with new project
From ZenDesk: https://gitlab.zendesk.com/agent/tickets/21236
Steps to reproduce:
- Create a project with the API.
- Load the project in the Web page.
- Push a repo to that project with
git push --mirror
.
Empty projects or 404 errors occur unless you run sudo gitlab-rake cache:clear
.
Sidekiq tasks all look fine:
$ grep PostRe "sidekiq.log"
2016-04-27_21:53:50.62748 2016-04-27T21:53:50.627Z 28755 TID-yya48 PostReceive JID- INFO: start
2016-04-27_21:53:50.85219 2016-04-27T21:53:50.852Z 28755 TID-yya48 PostReceive JID- INFO: done: 0.225 sec
2016-04-28_15:09:56.45576 2016-04-28T15:09:56.455Z 28755 TID-yya48 PostReceive JID- INFO: start
2016-04-28_15:10:06.01362 2016-04-28T15:10:06.013Z 28755 TID-yya48 PostReceive JID- INFO: done: 9.558 sec
2016-04-28_15:10:53.88957 2016-04-28T15:10:53.889Z 28755 TID-14civo PostReceive JID- INFO: start
2016-04-28_15:11:03.34511 2016-04-28T15:11:03.345Z 28755 TID-14civo PostReceive JID- INFO: done: 9.456 sec
2016-04-28_15:14:24.62010 2016-04-28T15:14:24.620Z 28755 TID-14clh0 PostReceive JID- INFO: start
2016-04-28_15:14:25.61898 2016-04-28T15:14:25.618Z 28755 TID-14clh0 PostReceive JID- INFO: done: 0.999 sec
2016-04-28_15:39:04.22146 2016-04-28T15:39:04.221Z 28755 TID-14cx14 PostReceive JID- INFO: start
2016-04-28_16:08:07.15602 2016-04-28T16:08:07.155Z 28755 TID-14ciic PostReceive JID- INFO: start
2016-04-28_16:10:22.60541 2016-04-28T16:10:22.605Z 28755 TID-14ckqc PostReceive JID- INFO: start
2016-04-28_16:12:07.64145 2016-04-28T16:12:07.641Z 28755 TID-yya48 PostReceive JID- INFO: start
2016-04-28_16:13:00.90323 2016-04-28T16:13:00.903Z 28755 TID-14cu2g PostReceive JID- INFO: start
2016-04-28_16:13:11.20508 2016-04-28T16:13:11.205Z 28755 TID-yya48 PostReceive JID- INFO: done: 63.564 sec
2016-04-28_16:14:02.75767 2016-04-28T16:14:02.757Z 28755 TID-14cufs PostReceive JID- INFO: start
2016-04-28_16:14:04.09588 2016-04-28T16:14:04.095Z 28755 TID-14cufs PostReceive JID- INFO: done: 1.338 sec
2016-04-28_16:14:28.84430 2016-04-28T16:14:28.844Z 28755 TID-14cu2g PostReceive JID- INFO: done: 87.941 sec
2016-04-28_16:15:09.93130 2016-04-28T16:15:09.931Z 28755 TID-14cvjs PostReceive JID- INFO: start
2016-04-28_16:15:21.08559 2016-04-28T16:15:21.085Z 28755 TID-14cvjs PostReceive JID- INFO: done: 11.154 sec
2016-04-28_16:15:28.04432 2016-04-28T16:15:28.044Z 28755 TID-14ckqc PostReceive JID- INFO: done: 305.439 sec
2016-04-28_16:17:31.94567 2016-04-28T16:17:31.945Z 3075 TID-4ya98 PostReceive JID- INFO: start
2016-04-28_16:17:32.92345 2016-04-28T16:17:32.923Z 3075 TID-4ya98 PostReceive JID- INFO: done: 0.978 sec
Even though PostReceive
task runs, the exists?
or has_visible_content?
cache status isn't updated properly.
Does it make sense to just expire this in GitPushService
any time the default branch is pushed? I'll send a MR for that.
/cc: @yorickpeterse