Issues configuring ReviewBoard with local git repos

87 views
Skip to first unread message

geof...@gmail.com

unread,
Nov 2, 2023, 10:38:57 PM11/2/23
to Review Board Community
We are trying to do an evaluation of ReviewBoard.
I have setup ReviewBoard via the Docker container, wih SSL termination through a reverse proxy.  the website seems to work fine, and direct queries to the API via curl work fine.  I am able to use 'rbt setup-repo' to configure a repo.

However, when I run 'rbt post --username myuser --password mypassword', I get:

Validating commits... █████████████                                        [1/4]
ERROR: Error validating diff

You are not logged in (API Error 103: Not Logged In)

The logs show:

reviewboard-reviewboard-1 | 2023-11-03 01:34:02,149 - ERROR - None - AnonymousUser - /review/api/repositories/1/info/ - django.request - Not Implemented: /review/api/repositories/1/info/
reviewboard-nginx-1 | 172.28.0.1 - - [03/Nov/2023:01:34:02 +0000] "GET /review/api/repositories/1/info/ HTTP/1.1" 501 153 "-" "RBTools/4.1" "10.73.8.104"
reviewboard-reviewboard-1 | [2023-11-03 01:34:02 +0000] [16] [DEBUG] Closing connection.
reviewboard-reviewboard-1 | [2023-11-03 01:34:02 +0000] [16] [DEBUG] GET /review/api/validation/commits/
reviewboard-nginx-1 | 172.28.0.1 - - [03/Nov/2023:01:34:02 +0000] "GET /review/api/validation/commits/ HTTP/1.1" 304 0 "-" "RBTools/4.1" "10.73.8.104"
reviewboard-reviewboard-1 | [2023-11-03 01:34:02 +0000] [16] [DEBUG] Closing connection.
reviewboard-reviewboard-1 | [2023-11-03 01:34:02 +0000] [16] [DEBUG] POST /review/api/validation/commits/
reviewboard-reviewboard-1 | Unauthorized: /review/api/validation/commits/
reviewboard-reviewboard-1 | 2023-11-03 01:34:02,407 - WARNING - None - AnonymousUser - /review/api/validation/commits/ - django.request - Unauthorized: /review/api/validation/commits/
reviewboard-reviewboard-1 | [2023-11-03 01:34:02 +0000] [16] [DEBUG] Closing connection.
reviewboard-nginx-1 | 172.28.0.1 - - [03/Nov/2023:01:34:02 +0000] "POST /review/api/validation/commits/ HTTP/1.1" 401 100 "-" "RBTools/4.1" "10.73.8.104"
reviewboard-reviewboard-1 | [2023-11-03 01:34:02 +0000] [16] [DEBUG] POST /review/api/validation/commits/
reviewboard-reviewboard-1 | 2023-11-03 01:34:02,431 - DEBUG - None - AnonymousUser - /review/api/validation/commits/ - djblets.webapi.auth.backends.base - Attempting authentication on API: username=myuser, password=************
reviewboard-reviewboard-1 | 2023-11-03 01:34:02,538 - DEBUG - - reviewboard.diffviewer.parser - GitDiffParser.parse_diff: Beginning parse of diff, size = 3311
reviewboard-reviewboard-1 | 2023-11-03 01:34:02,539 - DEBUG - - reviewboard.diffviewer.parser - GitDiffParser.parse_diff: Finished parsing diff.
reviewboard-reviewboard-1 | [2023-11-03 01:34:02 +0000] [16] [DEBUG] Closing connection.
reviewboard-nginx-1 | 172.28.0.1 - myuser[03/Nov/2023:01:34:02 +0000] "POST /review/api/validation/commits/ HTTP/1.1" 200 564 "-" "RBTools/4.1" "10.73.8.104"
reviewboard-reviewboard-1 | [2023-11-03 01:34:02 +0000] [15] [DEBUG] POST /review/api/validation/commits/
reviewboard-reviewboard-1 | Unauthorized: /review/api/validation/commits/
reviewboard-reviewboard-1 | 2023-11-03 01:34:02,581 - WARNING - None - AnonymousUser - /review/api/validation/commits/ - django.request - Unauthorized: /review/api/validation/commits/
reviewboard-reviewboard-1 | [2023-11-03 01:34:02 +0000] [15] [DEBUG] Closing connection.
reviewboard-nginx-1 | 172.28.0.1 - - [03/Nov/2023:01:34:02 +0000] "POST /review/api/validation/commits/ HTTP/1.1" 401 100 "-" "RBTools/4.1" "10.73.8.104"

If I parse this properly, it accepts my credentials, uploads the diff to he validation endpoint, but then fails the authentication on the following request?  I am not sure how to proceed from here.

Christian Hammond

unread,
Nov 2, 2023, 10:41:10 PM11/2/23
to revie...@googlegroups.com
Hi,

There might be a bug in RBTools. We had a similar report recently and plan to look into it for the next patch release.

What happens if you don't pass --username and --password? It should prompt you for login at that point, and properly store the session information.

Christian

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/c48cff66-3203-4494-9407-a8a41368387an%40googlegroups.com.


--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

geof...@gmail.com

unread,
Nov 3, 2023, 9:23:42 AM11/3/23
to Review Board Community

The issue remains regardless of whether it prompts for a username/password or I supply it on the cmdline.  At the moment, I have not found any way to initiate a code-review.
I feel like there is something special going on in my case, as obviously not everyone is seeing this issue, but my use case would seem to be trivial (setup a local git repo, try to create a code-review on it)

I will try running with a debugger and see if I can identify anything.

Geoffrey Hausheer

unread,
Nov 3, 2023, 10:17:50 AM11/3/23
to revie...@googlegroups.com
There does indeed seem to be a caching problem in rbtools.  The issue seems to be triggered because I had multiple commits in a single review.
I found that in rbtools.api.request.PresetHTTPAuthHandler.http_request() that is self.used is not set, then everything works fine, but if it is, the request is reused and the auth info is lost (this happens the 2nd time through the loop in post._validate_diff_history).
I hacked in 'self.used = False' which forces re-authentication on each call, and allows the review to be generated.

Clearly this is only a hack, but it will allow us to proceed with the evaluation.


You received this message because you are subscribed to a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/nbAIXm1c2Qg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/8abd8df5-6622-4328-9353-6a37be43af5fn%40googlegroups.com.

Christian Hammond

unread,
Nov 4, 2023, 1:09:48 AM11/4/23
to revie...@googlegroups.com
Thanks for looking into that and confirming a workaround. We'll get a permanent solution in place and get that into a release.

Christian

Reply all
Reply to author
Forward
0 new messages