We are using gitlab ce as SCM frontend plus as simple CI solution. Recently we’ve been hit by following problem: after renaming old project that was occupying namespace we’ve created a new one with exactly the same name. Creation of new project first failed, but after hitting refresh button in a browser it got created successfully. Unfortunately every attempt to view the project from the dashboard failed with 404 error.
This is a race condition issue, that can be also triggered a bit differently:
- Created project
- Delete it
- Create a new project with exactly the same name
Both rename and delete actions are reflected in the same way in gitlab internal cache. When project is being renamed or deleted by user, internal cache is not invalidated quickly enough. If between step 2 and 3 is considerable amount of time, this issues will not happen. Obviously when it happens there must be a way to fix it and there is a very simple solution (not found in gitlab docs) as long as your are running gitlab ce or ee. Simply issue following commands from your shell:
sudo gitlab-rake cache:clear
Look at issue #3586 to see complete discussion and hopefully a resolution soon as well.