Hi,
We do post-commit reviews in feature branches. We are using AWS CodeCommit 
as a git server and have PowerPack licences for it.

I am trying to submit a review from a branch called DEVOPS-74b. I made a 
change, did a git add/commit/push to the branch. I know that the supposedly 
non-existent file is there because if I go to a different workspace and do 
a git clone and checkout the branch, the file exists and my modification is 
in the branch.

The point of branching was commit bd429081243c6fade75b675e74763dc6942578a1, 
so I tell RBT to use that as the initial point for the diff. If I run the 
"git -c" command that rbt prints then I see a perfectly normal git diff, 
nothing unusual, so it looks as if the call to the RB api is breaking.


$ rbt post --debug --branch DEVOPS-74b 
bd429081243c6fade75b675e74763dc6942578a1..DEVOPS-74b"
>>> RBTools 1.0.2
>>> Python 3.6.7 (default, Dec  5 2018, 15:01:38) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
>>> Running on 
Linux-3.10.0-957.27.2.el7.x86_64-x86_64-with-centos-7.6.1810-Core
>>> Home = /users/paulm
>>> Current directory = /users/paulm/codecommit/DevOps-puppet
>>> Command line: rbt post --debug --branch DEVOPS-74b 
bd429081243c6fade75b675e74763dc6942578a1..DEVOPS-74b
>>> Running: tf vc help
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config core.bare
>>> Running: git rev-parse --show-toplevel
>>> Running: git symbolic-ref -q HEAD
>>> Running: git config --get branch.DEVOPS-74b.merge
>>> Running: git config --get branch.DEVOPS-74b.remote
>>> Running: git config --get remote.origin.url
>>> Repository info: Path: 
ssh://git-codecommit.eu-west-1.amazonaws.com/v1/repos/DevOps-puppet, Base 
path: , Supports changesets: False
>>> Making HTTP GET request to https://rb/api/
>>> Running: git rev-parse 
bd429081243c6fade75b675e74763dc6942578a1..DEVOPS-74b
>>> Running: git config --get branch.DEVOPS-74b.merge
>>> Running: git config --get branch.DEVOPS-74b.remote
>>> Running: git branch --remotes
>>> Running: git rev-list bd429081243c6fade75b675e74763dc6942578a1 --not 
--remotes=origin
>>> Running: git version
>>> Running: git -c core.quotepath=false -c diff.noprefix=false diff 
--no-color --full-index --ignore-submodules -M --no-ext-diff 
bd429081243c6fade75b675e74763dc6942578a1..d8609c47e90ffed2eb7aba5b2968285d79bf1339
>>> Generated diff size: 2104 bytes
>>> Making HTTP GET request to https://rb/api/validation/diffs/
>>> Cached response for HTTP GET https://rb/api/validation/diffs/ expired 
and was modified
>>> Making HTTP POST request to https://rb/api/validation/diffs/
>>> Got API Error 207 (HTTP code 400): The file was not found in the 
repository.
>>> Error data: {'stat': 'fail', 'err': {'msg': 'The file was not found in 
the repository.', 'code': 207}, 'file': 
'environments/production/modules/aa_workstation/manifests/init.pp', 
'revision': '995404bf2e7bf24149269baa4ab9d3bea31b16d2'}
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/rbtools/api/request.py", line 685, 
in make_request
    request.url, body, headers, request.method))
  File "/usr/lib/python3.6/site-packages/rbtools/api/cache.py", line 209, 
in make_request
    return self.urlopen(request)
  File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib/python3.6/site-packages/rbtools/api/request.py", line 240, 
in http_response
    response.info())
  File "/usr/lib64/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 650, in 
http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: BAD REQUEST

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/rbtools/commands/post.py", line 
867, in main
    **validate_kwargs)
  File "/usr/lib/python3.6/site-packages/rbtools/api/decorators.py", line 
27, in request_method
    *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/rbtools/api/transport/sync.py", 
line 77, in execute_request_method
    return self._execute_request(request)
  File "/usr/lib/python3.6/site-packages/rbtools/api/transport/sync.py", 
line 86, in _execute_request
    rsp = self.server.make_request(request)
  File "/usr/lib/python3.6/site-packages/rbtools/api/request.py", line 687, 
in make_request
    self.process_error(e.code, e.read())
  File "/usr/lib/python3.6/site-packages/rbtools/api/request.py", line 661, 
in process_error
    rsp['err']['msg'])
rbtools.api.errors.BadRequestError: The file was not found in the 
repository. (HTTP 400, API Error 207)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/bin/rbt", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.6/site-packages/rbtools/commands/main.py", line 
120, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "/usr/lib/python3.6/site-packages/rbtools/commands/__init__.py", 
line 725, in run_from_argv
    exit_code = self.main(*args) or 0
  File "/usr/lib/python3.6/site-packages/rbtools/commands/post.py", line 
875, in main
    (msg_prefix, e))
rbtools.commands.CommandError: Error validating diff

environments/production/modules/aa_workstation/manifests/init.pp: The file 
was not found in the repository. (HTTP 400, API Error 207)


===

looking at the httpd logs on the server side, I don't see anything of 
significant interest

[Tue Sep 24 14:50:20.213900 2019] [:error] [pid 29025] No handlers could be 
found for logger "djblets.extensions.manager"
[Tue Sep 24 14:50:20.641655 2019] [:error] [pid 29025] 2019-09-24 
14:50:20,641 - WARNING -  - root - Could not open logfile 
/var/run/reviewboard/reviewboard.log. Logging to stderr
[Tue Sep 24 14:50:20.665555 2019] [:error] [pid 29025] 2019-09-24 
14:50:20,665 - INFO -  - root - Fetching file from README.md
[Tue Sep 24 14:50:20.666387 2019] [:error] [pid 29025] 2019-09-24 
14:50:20,666 - ERROR -  - root - Unexpected error fetching file from 
README.md: unknown url type: README.md


-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/26790d42-bd54-4f96-a4bb-1f4c143fd608%40googlegroups.com.

Reply via email to