Create merge request does not work in Gitlab

I just clicked the new "TEST" branch, and Gitlab has a button to create a new merge request. When I click on it, it leads me to a page that asks me to choose a source and that it should be combined.

The problem is that the only branch in the source is the master. There is no TEST branch.

However, I can see the TEST branch on the branches tab on the repository page.

Any ideas?

+4
source share
2 answers

Today I ran into the same problem and found a workaround that works fine for me: https://github.com/gitlabhq/gitlabhq/issues/4100#issuecomment-18669303

This problem is related to caching branch lists in redis, disabling the cache in the code fixes it.

diff --git a/app/models/repository.rb b/app/models/repository.rb index daf1765..ff683e6 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -34,9 +34,9 @@ class Repository end def branch_names - Rails.cache.fetch(cache_key(:branch_names)) do +# Rails.cache.fetch(cache_key(:branch_names)) do raw_repository.branch_names - end +# end end def tag_names 
+5
source

Another option that works is to go to the repository β†’ Branches, and if the branch is there (since it should not rely on the cache on this page), you can click the merge request, which should work.

It also helped me create a random branch that updates the cache, and you can create MR through the usual way. Remember to delete the branch later.

0
source

Source: https://habr.com/ru/post/1491482/


All Articles