I have added some logging in hostingvcs/service.py, this revealed the 
following urls:

12:41:49DEBUG 

 - root - Url: https://gitlabserver/api/v4/projects/71/repository/branches, 
body: None, headers: {'PRIVATE-TOKEN': 'REDACTED', 'Accept': 
'application/json'}, method: GET

12:41:49INFO 

 - root - before open

12:41:49INFO 

 - root - after open

12:41:51DEBUG 

 - root - Url: https://gitlabserver/api/v4/projects/71?private_token=REDACTED, 
body: None, headers: {'PRIVATE-TOKEN': 'REDACTED', 'Accept': 
'application/json'}, method: GET

12:41:51INFO 

 - root - before open

12:41:51INFO 

 - root - after open

12:41:51DEBUG 

 - root - Url: 
https://gitlabserver/__repo_name__/commit/acfec291713f9c0a5d616f98551c1ca1183c98d6.diff?private_token=REDACTED,
 body: None, headers: {u'Accept': u'text/plain'}, method: GET

12:41:51INFO 

 - root - before open


Only the last one fails with the 404 exception. However, when I open the 
very same link in a browser, it shows a diff file just fine.


Op vrijdag 7 februari 2020 16:36:00 UTC+1 schreef Marius:
>
> Hello,
>
> We have integrated ReviewBoard with our gitlab. The GIT commits are shown 
> just fine in RB GUI.
> But when we try to create a ReviewRequest from an existing commit, we 
> receive an HTTP 500 (Internal server error) message box.
>
> ReviewBoard: v3.0.16
>
> I could not really understand what is wrong from the logs? Any hints on 
> how to move forward with this one?
>
> Thank you!
>
>
>
> Corresponding log file: 
>
> 2020-02-07 10:18:11,640 - INFO -  - root - Reloading logging settings
> 2020-02-07 10:18:11,861 - ERROR -  - root - Unable to update new review 
> request from commit ID 206fbc657cf9c3cfb526a3586557d34adf002c2f on 
> repository ID=6: HTTP Error 404: Not Found
> Traceback (most recent call last):
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/reviews/managers.py", 
> line 226, in create
>     draft.update_from_commit_id(commit_id)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/reviews/models/review_request_draft.py",
>  
> line 419, in update_from_commit_id
>     return self.update_from_committed_change(commit_id)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/reviews/models/review_request_draft.py",
>  
> line 492, in update_from_committed_change
>     commit = self.repository.get_change(commit_id)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/scmtools/models.py", 
> line 515, in get_change
>     return hosting_service.get_change(self, revision)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/hostingsvcs/gitlab.py", 
> line 641, in get_change
>     headers={'Accept': 'text/plain'})
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/hostingsvcs/service.py", 
> line 188, in http_get
>     return self.http_request(url, headers=headers, method='GET', **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/hostingsvcs/service.py", 
> line 319, in http_request
>     response = urlopen(request, context=context)
>   File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
>     return opener.open(url, data, timeout)
>   File "/usr/lib/python2.7/urllib2.py", line 435, in open
>     response = meth(req, response)
>   File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
>     'http', request, response, code, msg, hdrs)
>   File "/usr/lib/python2.7/urllib2.py", line 467, in error
>     result = self._call_chain(*args)
>   File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
>     result = func(*args)
>   File "/usr/lib/python2.7/urllib2.py", line 654, in http_error_302
>     return self.parent.open(new, timeout=req.timeout)
>   File "/usr/lib/python2.7/urllib2.py", line 435, in open
>     response = meth(req, response)
>   File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
>     'http', request, response, code, msg, hdrs)
>   File "/usr/lib/python2.7/urllib2.py", line 473, in error
>     return self._call_chain(*args)
>   File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
>     result = func(*args)
>   File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
>     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
> HTTPError: HTTP Error 404: Not Found
> 2020-02-07 10:18:11,863 - ERROR - None - mcs - /api/review-requests/ - 
> djblets.log.middleware - Exception thrown for user mcs at 
> http://10.8.77.40/api/review-requests/
>
> HTTP Error 404: Not Found
> Traceback (most recent call last):
>   File 
> "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/core/handlers/base.py",
>  
> line 112, in get_response
>     response = wrapped_callback(request, *callback_args, **callback_kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/views/decorators/cache.py",
>  
> line 52, in _wrapped_view_func
>     response = view_func(request, *args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/views/decorators/vary.py",
>  
> line 19, in inner_func
>     response = func(*args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/djblets/webapi/resources/base.py", 
> line 244, in __call__
>     request, method, view, api_format=api_format, *args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/webapi/base.py", line 
> 338, in call_method_view
>     request, method, view, *args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/djblets/webapi/resources/mixins/api_tokens.py",
>  
> line 66, in call_method_view
>     request, method, view, *args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/djblets/webapi/resources/mixins/oauth2_tokens.py",
>  
> line 102, in call_method_view
>     request, method, view, *args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/djblets/webapi/resources/base.py", 
> line 369, in call_method_view
>     return view(request, *args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/djblets/webapi/resources/base.py", 
> line 470, in post
>     return self.create(*args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 
> 125, in _call
>     return view_func(*args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/webapi/decorators.py", 
> line 169, in _check
>     return view_func(*args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 
> 125, in _call
>     return view_func(*args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 
> 146, in _checklogin
>     return view_func(*args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 
> 125, in _call
>     return view_func(*args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 
> 125, in _call
>     return view_func(*args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 
> 311, in _validate
>     return view_func(*args, **new_kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/webapi/resources/review_request.py",
>  
> line 740, in create
>     create_from_commit_id=create_from_commit_id)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/reviews/managers.py", 
> line 226, in create
>     draft.update_from_commit_id(commit_id)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/reviews/models/review_request_draft.py",
>  
> line 419, in update_from_commit_id
>     return self.update_from_committed_change(commit_id)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/reviews/models/review_request_draft.py",
>  
> line 492, in update_from_committed_change
>     commit = self.repository.get_change(commit_id)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/scmtools/models.py", 
> line 515, in get_change
>     return hosting_service.get_change(self, revision)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/hostingsvcs/gitlab.py", 
> line 641, in get_change
>     headers={'Accept': 'text/plain'})
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/hostingsvcs/service.py", 
> line 188, in http_get
>     return self.http_request(url, headers=headers, method='GET', **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/reviewboard/hostingsvcs/service.py", 
> line 319, in http_request
>     response = urlopen(request, context=context)
>   File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
>     return opener.open(url, data, timeout)
>   File "/usr/lib/python2.7/urllib2.py", line 435, in open
>     response = meth(req, response)
>   File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
>     'http', request, response, code, msg, hdrs)
>   File "/usr/lib/python2.7/urllib2.py", line 467, in error
>     result = self._call_chain(*args)
>   File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
>     result = func(*args)
>   File "/usr/lib/python2.7/urllib2.py", line 654, in http_error_302
>     return self.parent.open(new, timeout=req.timeout)
>   File "/usr/lib/python2.7/urllib2.py", line 435, in open
>     response = meth(req, response)
>   File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
>     'http', request, response, code, msg, hdrs)
>   File "/usr/lib/python2.7/urllib2.py", line 473, in error
>     return self._call_chain(*args)
>   File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
>     result = func(*args)
>   File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
>     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
> HTTPError: HTTP Error 404: Not Found
>
>
>
>
>
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/f8461d4f-d229-4941-a08f-9949f1ced415%40googlegroups.com.

Reply via email to