Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 3484 by john.sirois: `rbt patch -c` fails for patches to public
github repos with an RBCommons team when the patch if from a non-team member
http://code.google.com/p/reviewboard/issues/detail?id=3484
What version are you running?
=============================
client: 0.6.2
server: https://rbcommons.com as of today's date
What's the URL of the page containing the problem?
==================================================
https://rbcommons.com/s/twitter/r/698
https://rbcommons.com/s/twitter/api/users/gmalmquist/
What steps will reproduce the problem?
======================================
1. Create a review for a public github repo but as a user outside the
RBCommons owning team (for this case gmalmquist is an RBCommons user _not_
in the twitter team).
2. rbt patch -c [the review]
What is the expected output? What do you see instead?
=====================================================
The patch should apply and be committed but it only applies and the commit
fails, looks like so when failing:
$ rbt patch --debug -c 698
RBTools 0.6.2
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2]
Running on Linux-3.13.0-30-generic-x86_64-with-Ubuntu-14.04-trusty
Home = /home/jsirois
Current directory = /home/jsirois/dev/3rdparty/pantsbuild-pants
Checking for a Subversion repository...
Running: svn info --non-interactive
Command exited with rc 1: ['svn', 'info', '--non-interactive']
svn: E155007: '/home/jsirois/dev/3rdparty/pantsbuild-pants' is not a
working copy
---
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.master.merge
Running: git config --get branch.master.remote
Running: git config --get remote.origin.url
repository info: Path: [email protected]:pantsbuild/pants.git, Base
path: , Supports changesets: False
Making HTTP GET request to https://rbcommons.com/s/twitter/api/
Making HTTP GET request to https://rbcommons.com/s/twitter/api/info/
Making HTTP GET request to
https://rbcommons.com/s/twitter/api/review-requests/698/diffs/
Making HTTP GET request to
https://rbcommons.com/s/twitter/api/review-requests/698/diffs/1/
Making HTTP GET request to
https://rbcommons.com/s/twitter/api/review-requests/698/diffs/1/
Running: git status --porcelain --untracked-files=no
Patch is being applied from request 698 with diff revision 1.
Running: git apply --index /tmp/tmpdUG2_a
Making HTTP GET request to
https://rbcommons.com/s/twitter/api/review-requests/698/?force-text-type=plain
Making HTTP GET request to
https://rbcommons.com/s/twitter/api/users/gmalmquist/
Got API Error 100 (HTTP code 404): Object does not exist
Error data: {u'stat': u'fail', u'err': {u'msg': u'Object does not
exist', u'code': 100}}
Traceback (most recent call last):
File "/home/jsirois/.pythons/venvs/rbt/bin/rbt", line 9, in <module>
load_entry_point('RBTools==0.6.2', 'console_scripts', 'rbt')()
File "/home/jsirois/.pythons/venvs/rbt/local/lib/python2.7/site-packages/rbtools/commands/main.py",
line 134, in main
command.run_from_argv([RB_MAIN, command_name] + args)
File "/home/jsirois/.pythons/venvs/rbt/local/lib/python2.7/site-packages/rbtools/commands/__init__.py",
line 416, in run_from_argv
exit_code = self.main(*args) or 0
File "/home/jsirois/.pythons/venvs/rbt/local/lib/python2.7/site-packages/rbtools/commands/patch.py",
line 154, in main
author = review_request.get_submitter()
File "/home/jsirois/.pythons/venvs/rbt/local/lib/python2.7/site-packages/rbtools/api/resource.py",
line 139, in <lambda>
self._get_url(url, **kwargs)))
File "/home/jsirois/.pythons/venvs/rbt/local/lib/python2.7/site-packages/rbtools/api/decorators.py",
line 24, in request_method
*args, **kwargs)
File "/home/jsirois/.pythons/venvs/rbt/local/lib/python2.7/site-packages/rbtools/api/transport/sync.py",
line 61, in execute_request_method
return self._execute_request(request)
File "/home/jsirois/.pythons/venvs/rbt/local/lib/python2.7/site-packages/rbtools/api/transport/sync.py",
line 70, in _execute_request
rsp = self.server.make_request(request)
File "/home/jsirois/.pythons/venvs/rbt/local/lib/python2.7/site-packages/rbtools/api/request.py",
line 484, in make_request
self.process_error(e.code, e.read())
File "/home/jsirois/.pythons/venvs/rbt/local/lib/python2.7/site-packages/rbtools/api/request.py",
line 457, in process_error
rsp['err']['msg'])
rbtools.api.errors.APIError: Object does not exist (HTTP 404, API Error 100)
What operating system are you using? What browser?
==================================================
Browser does not apply, but this is for:
$ uname -a
Linux gill 3.13.0-30-generic #55-Ubuntu SMP Fri Jul 4 21:40:53 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS"
Anecdotally this also fails on OSXes
Please provide any additional information below.
================================================
I peeked at the code here and the team is baked into the client early on
when its constructed so it may be tricky to disentagle that bit from the
api requests here. In the end - assuming RBCommons is willing to support
non-team members contributing patches via RBCommons for public repos, the
patch command would need to perhaps fall back from looking for the user in
the team to trying the user account in general to find the data needed to
form the commit.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.