Re: Installing the Web Hooks extension

2013-11-06 Thread Fede Naum
sorry, I meant RB 1.7.14 instead of 1.7.4

On Wednesday, 6 November 2013 18:50:16 UTC+11, Fede Naum wrote:

 Hi Rodrigo, 

 I know that this was more than a year ago, but can you tell me how did you 
 end up installing the webhooks extension on RB?

 I followed what you did 

 - git clone https://github.com/reviewboard/rb-extension-pack
 - cd rbwebhooks
 - pyhton setup.py install

 but I'm on version 1.7.4 of RB

 That failed with the error.

 super(RBWebHooksExtension, self).__init__()
 TypeError: __init__() takes exactly 2 arguments (1 given)

 Then after checking  this page 
 http://www.reviewboard.org/docs/manual/dev/extending/extensions/overview/#extension-example-files-extension-pyon
  
 how to build extensions, I just modified the code to be 
 super(RBWebHooksExtension, self).__init__(*args, **kwargs)

 it went further, I was able to install the extension, but when I try to 
 add a new  weeb hook target



 I got the following error:

   File 
 /var/virtualenv/REVIEWBOARD/lib/python2.7/site-packages/Django-1.4.8-py2.7.egg/django/db/backends/postgresql_psycopg2/base.py,
  
 line 52, in execute
 return self.cursor.execute(query, args)
 DatabaseError: relation rbwebhooks_webhooktarget does not exist
 LINE 1: INSERT INTO rbwebhooks_webhooktarget (hook_id, descript...
 ^


 So it looks like I'm missing the creation of some DB tables, how do I do 
 that?

 Thanks in advance
 Federico

 On Tuesday, 26 June 2012 07:03:48 UTC+10, Rodrigo Castro wrote:

 Hello Steve,

 I've just finished installing review board 1.7 alpha 0 (dev) and I 
 confirm your extension still works. I haven't fully verified the payload of 
 the POST request it sends but it seems to be fine ;)

 There is one small little problem though. The empty file __init__.py in 
 the rbwebhooks directory is missing which in turn makes review board not to 
 be aware of the extension. Otherwise everything is running smoothly.

 I'm rather overbooked the coming weeks, but if I happen to have some 
 spare time I know where to find help :)

 Thanks Steve and Christian for your promptly and useful answers.

 Rodrigo

 Le lundi 25 juin 2012 19:51:27 UTC+2, Steven MacLeod a écrit :

 Hey Rodrigo,

 I'm the author of the Web Hooks extension. I believe it should 
 be compatible with the latest 1.7 dev code, as I don't remember any changes 
 which would have broken it since it was committed.

 As for not running a production site off of 1.7, the Web Hooks extension 
 is even less ready for production. To be honest, it is more of a prototype 
 which has had only minimal testing. Working to improve this extension isn't 
 currently one of my priorities, but I'd be more than happy to offer support 
 if you are interested in tinkering with it.

 Steve


 Le lundi 25 juin 2012 19:51:27 UTC+2, Steven MacLeod a écrit :

 Hey Rodrigo,

 I'm the author of the Web Hooks extension. I believe it should 
 be compatible with the latest 1.7 dev code, as I don't remember any changes 
 which would have broken it since it was committed.

 As for not running a production site off of 1.7, the Web Hooks extension 
 is even less ready for production. To be honest, it is more of a prototype 
 which has had only minimal testing. Working to improve this extension isn't 
 currently one of my priorities, but I'd be more than happy to offer support 
 if you are interested in tinkering with it.

 Steve


 Le lundi 25 juin 2012 19:51:27 UTC+2, Steven MacLeod a écrit :

 Hey Rodrigo,

 I'm the author of the Web Hooks extension. I believe it should 
 be compatible with the latest 1.7 dev code, as I don't remember any changes 
 which would have broken it since it was committed.

 As for not running a production site off of 1.7, the Web Hooks extension 
 is even less ready for production. To be honest, it is more of a prototype 
 which has had only minimal testing. Working to improve this extension isn't 
 currently one of my priorities, but I'd be more than happy to offer support 
 if you are interested in tinkering with it.

 Steve



-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
reviewboard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: post-reivew WEB API?

2011-03-30 Thread fede
Hi I'm facing a similar problem but I can not solve it with the fixes
given above, is there something else I can try ?

* Review Board: 1.5.4
* RBTools: 0.3.1
* SCM tool: Clearcase
* I'm using mod_wsgi

* I have the following setting  on the conf/apache-wsgi.conf
 WSGIPassAuthorization On

* Also tried adding this and restarting the httpd service
  Directory /
Options FollowSymLinks
AllowOverride None
Order deny,allow
 /Directory

but  still getting
Error creating review request: You are not logged in (HTTP 401, API
Error 103)

Notes :
  * As other people and I can log properly on the web ui using the
same user/passw
  * using -n I can see that the diff are well formed

Thanks in advance
fede


On Mar 9, 11:56 am, Chris Tandiono chris.tandi...@gmail.com wrote:
 Oh huh, that seems like that'd be it. I couldn't try it earlier (building  
 flooded, power was out, then drive in the RAID started to flake) but that  
 worked perfectly. Thanks.

 Chris

 On Tue, 08 Mar 2011 01:33:07 -0800, Christian Hammond







 chip...@chipx86.com wrote:
  Hi Chris,

  Assuming your install is from before RB 1.5.2, you need to make a small
  change to your Apache configuration.

  Try:

 http://www.reviewboard.org/docs/manual/dev/faq/#i-m-using-post-review...

  Christian

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: post-reivew WEB API?

2011-03-30 Thread fede
Hi Christian, Thanks for your pormpt response,

We are using LDAP, and it is working fine from the WEB UI (as before)

Yes i'm including it directly, the  apache-wsgi.conf, it looks like
this

  1 VirtualHost *:80
  2 ServerName reviewboard.al.com.au
  3 DocumentRoot /var/www/reviewboard/rnd/htdocs
  4
  5 # Error handlers
  6 ErrorDocument 500 /errordocs/500.html
  7
  8 WSGIPassAuthorization On
  9 WSGIScriptAlias / /var/www/reviewboard/rnd/htdocs/
reviewboard.wsgi
 10
 11 Directory /var/www/reviewboard/rnd/htdocs
 12 AllowOverride All
 13 /Directory
 14
 15 # Alias static media requests to filesystem
 16 Alias /media /var/www/reviewboard/rnd/htdocs/media
 17 Alias /errordocs /var/www/reviewboard/rnd/htdocs/
errordocs
 18 /VirtualHost


We had it working before with RB 1.0.8, so we have not changed the
apache conf, we just upgrade to 1.5.4 and RBTools: 0.3.1 and the post-
review stop working
There is no message in the httpd.erro.log when I try to submit the
post-review
We upgrade RB and started with a clean DB, so we did the rb-site
install.

This is the only error on the http/error.log  But I think it is not
related
 [error] /var/virtualenv/REVIEWBOARD-1/lib/python2.5/site-packages/
Crypto/Util/randpool.py:40: RandomPool_DeprecationWarning: This
application uses RandomPool, which is BROKEN in older releases.  See
http://www.pycrypto.org/randpool-broken


Fede

On Mar 30, 5:46 pm, Christian Hammond chip...@chipx86.com wrote:
 Hi,

 Just to be sure, is your Apache configuration directly including our
 conf/apache-wsgi.conf? Or did you copy the contents of that file elsewhere
 when setting up the server?

 What authentication backend are you using?

 Christian

 --
 Christian Hammond - chip...@chipx86.com
 Review Board -http://www.reviewboard.org
 VMware, Inc. -http://www.vmware.com







 On Tue, Mar 29, 2011 at 11:08 PM, fede fede.n...@gmail.com wrote:
  Hi I'm facing a similar problem but I can not solve it with the fixes
  given above, is there something else I can try ?

  * Review Board: 1.5.4
  * RBTools: 0.3.1
  * SCM tool: Clearcase
  * I'm using mod_wsgi

  * I have the following setting  on the conf/apache-wsgi.conf
      WSGIPassAuthorization On

  * Also tried adding this and restarting the httpd service
    Directory /
                 Options FollowSymLinks
                 AllowOverride None
                 Order deny,allow
   /Directory

  but  still getting
  Error creating review request: You are not logged in (HTTP 401, API
  Error 103)

  Notes :
   * As other people and I can log properly on the web ui using the
  same user/passw
   * using -n I can see that the diff are well formed

  Thanks in advance
  fede

  On Mar 9, 11:56 am, Chris Tandiono chris.tandi...@gmail.com wrote:
   Oh huh, that seems like that'd be it. I couldn't try it earlier (building

   flooded, power was out, then drive in the RAID started to flake) but that

   worked perfectly. Thanks.

   Chris

   On Tue, 08 Mar 2011 01:33:07 -0800, Christian Hammond

   chip...@chipx86.com wrote:
Hi Chris,

Assuming your install is from before RB 1.5.2, you need to make a small
change to your Apache configuration.

Try:

   http://www.reviewboard.org/docs/manual/dev/faq/#i-m-using-post-review.
  ..

Christian

  --
  Want to help the Review Board project? Donate today at
 http://www.reviewboard.org/donate/
  Happy user? Let us know athttp://www.reviewboard.org/users/
  -~--~~~~--~~--~--~---
  To unsubscribe from this group, send email to
  reviewboard+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: post-reivew WEB API?

2011-03-30 Thread fede
Hi Christian,

I'm restarting the web server every time I do any change, and checking
the httpd/error.logs  to make sure it is restarted

We added ldap to the apache conf., we are close but not there yet
Here is the configuration, maybe you can spot something wrong

  3 VirtualHost *:80
  4 ServerName reviewboard.al.com.au
  5 ServerAlias reviewboard
  6
  7 ServerAdmin @@
  8 DocumentRoot /var/www/reviewboard
  9
 10 HostNameLookups Off
 11 UseCanonicalName On
 12 ServerSignature On
 13
 14 # Alias static media requests to filesystem
 15 Alias /media /var/www/reviewboard/rnd/htdocs/media
 16 Alias /errordocs /var/www/reviewboard/rnd/htdocs/
errordocs
 17
 18 WSGIScriptAlias / /var/www/reviewboard.wsgi
 19
 20 Location /api
 21   AuthType Basic
 22   AuthName AL ReviewBoard Repositories
 23   AuthBasicProvider ldap
 24   AuthzLDAPAuthoritative off
 25   AuthLDAPBindDN **
 26   AuthLDAPBindPassword *
 27   AuthLDAPUrl ldap://ldap.al.com.au:389/ou=Active
Accounts,dc=al,dc=com,dc=au?sAMAccountName?sub?(objectClass=*)
 28   Require valid-user
 29 /Location
 30
 31 Directory /var/www/reviewboard/rnd/htdocs
 32 AllowOverride All
 33 /Directory
 34
 35 /VirtualHost


Here are the logs I'm getting (NOTE it is passing the GETting
http://reviewboard.al.com.au/api/info/)

 HTTP GETting api/
== HTTP Authentication Required
Enter authorization information for AL ReviewBoard Repositories at
reviewboard.al.com.au
Username: federicon
Password:
 HTTP GETting http://reviewboard.al.com.au/api/info/
 Using the new web API
 Attempting to create review request on None for None
 HTTP POSTing to http://reviewboard.al.com.au/api/review-requests/: 
 {'repository': None}
 Got API Error 103 (HTTP code 401): You are not logged in
 Error data: {'stat': 'fail', 'err': {'msg': 'You are not logged in', 
 'code': 103}}
 Attempting to create review request on None for None
 HTTP POSTing to http://reviewboard.al.com.au/api/review-requests/: 
 {'repository': None}
 Got HTTP error: 401: !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
htmlhead
title401 Authorization Required/title
/headbody
h1Authorization Required/h1
pThis server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required./p
hr
addressApache/2.2.3 (CentOS) Server at reviewboard.al.com.au Port
80/address
/body/html

Error creating review request: HTTP 401


Looks like Django/RB is not picking the user:passw ??


If I try a GET to this page, it is successful

curl -u federicon http://reviewboard.al.com.au/api/review-requests/
Enter host password for user 'federicon':
{total_results: 0, stat: ok, review_requests: [], links:
{self: {href: http://reviewboard.al.com.au/api/review-requests/;,
method: GET}, create: {href: http://reviewboard.al.com.au/api/
review-requests/, method: POST}}}

If I try a POST I get he Your are not  Logged in error

curl --data sdf -u federicon http://reviewboard.al.com.au/api/review-requests/
Enter host password for user 'federicon':
{stat: fail, err: {msg: You are not logged in, code: 103}}

we run out of ideas in what to try



On Mar 31, 11:16 am, Christian Hammond chip...@chipx86.com wrote:
 Hi Fede,

 The reason it's broken now is that we've moved to using Basic HTTP auth for
 the API. This is a standard protocol, and things have supported it forever,
 but wsgi (and fastcgi) by default actually specifically filter out any
 Authorization headers related to it. That's what that directive is meant to
 prevent. The web UI itself doesn't use Basic HTTP auth, which is why you're
 not seeing the problem there.

 I don't know why it's not working for you. If that's the Apache file that
 your main Apache config is directly including, or those contents are in the
 main Apache config directly, then it should be solving the problem. The only
 other thing at this point that I can think of is if the web server actually
 wasn't restarted.

 Can you provide the full debug log (pass --debug) on post-review, with a
 login attempt?

 Christian

 --
 Christian Hammond - chip...@chipx86.com
 Review Board -http://www.reviewboard.org
 VMware, Inc. -http://www.vmware.com







 On Wed, Mar 30, 2011 at 5:08 PM, fede fede.n...@gmail.com wrote:
  Hi Christian, Thanks for your pormpt response,

  We are using LDAP, and it is working fine from the WEB UI (as before)

  Yes i'm including it directly, the  apache-wsgi.conf, it looks like
  this

       1 VirtualHost *:80
       2     ServerName reviewboard.al.com.au
       3     DocumentRoot /var/www/reviewboard/rnd/htdocs
       4
       5     # Error handlers
       6

Re: post-reivew WEB API?

2011-03-30 Thread fede
Hi Christian,
You were right all along .

 I deleted the ldap bit and make sure that we have
WSGIPassAuthorization On  on the apache conf file we are using  and
now everything is working
 Previously I got confused because we had 2 apache conf
files , and I thought we were using the one from the RB installation,
but l was wrong. just with your first answer I should have had this
working

Thanks millions for you help. I really appreciate it
Fede


On Mar 31, 3:48 pm, Christian Hammond chip...@chipx86.com wrote:
 Hi,

 You actually shouldn't have any ldap or auth configuration in your
 Apache config. The wsgi directive you were using, though, is
 absolutely required.

 The reason is that we need Django and Review Board to handle all auth 
 attempts.

 Can you go back to the prior configuration and rerun post-review --debug?

 Christian









 On Wednesday, March 30, 2011, fede fede.n...@gmail.com wrote:
  Hi Christian,

  I'm restarting thewebserver every time I do any change, and checking
  the httpd/error.logs  to make sure it is restarted

  We added ldap to the apache conf., we are close but not there yet
  Here is the configuration, maybe you can spot something wrong

        3 VirtualHost *:80
        4     ServerName reviewboard.al.com.au
        5     ServerAlias reviewboard
        6
        7     ServerAdmin @@
        8     DocumentRoot /var/www/reviewboard
        9
       10     HostNameLookups Off
       11     UseCanonicalName On
       12     ServerSignature On
       13
       14     # Alias static media requests to filesystem
       15     Alias /media /var/www/reviewboard/rnd/htdocs/media
       16     Alias /errordocs /var/www/reviewboard/rnd/htdocs/
  errordocs
       17
       18     WSGIScriptAlias / /var/www/reviewboard.wsgi
       19
       20     Location /api
       21       AuthType Basic
       22       AuthName AL ReviewBoard Repositories
       23       AuthBasicProvider ldap
       24       AuthzLDAPAuthoritative off
       25       AuthLDAPBindDN **
       26       AuthLDAPBindPassword *
       27       AuthLDAPUrl ldap://ldap.al.com.au:389/ou=Active
  Accounts,dc=al,dc=com,dc=au?sAMAccountName?sub?(objectClass=*)
       28       Require valid-user
       29     /Location
       30
       31     Directory /var/www/reviewboard/rnd/htdocs
       32         AllowOverride All
       33     /Directory
       34
       35 /VirtualHost

  Here are the logs I'm getting (NOTE it is passing the GETting
 http://reviewboard.al.com.au/api/info/)

  HTTP GETtingapi/
  == HTTP Authentication Required
  Enter authorization information for AL ReviewBoard Repositories at
  reviewboard.al.com.au
  Username: federicon
  Password:
  HTTP GETtinghttp://reviewboard.al.com.au/api/info/
  Using the newwebAPI
  Attempting to create review request on None for None
  HTTP POSTing 
  tohttp://reviewboard.al.com.au/api/review-requests/:{'repository': None}
  GotAPIError 103 (HTTP code 401): You are not logged in
  Error data: {'stat': 'fail', 'err': {'msg': 'You are not logged in', 
  'code': 103}}
  Attempting to create review request on None for None
  HTTP POSTing 
  tohttp://reviewboard.al.com.au/api/review-requests/:{'repository': None}
  Got HTTP error: 401: !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
  htmlhead
  title401 Authorization Required/title
  /headbody
  h1Authorization Required/h1
  pThis server could not verify that you
  are authorized to access the document
  requested.  Either you supplied the wrong
  credentials (e.g., bad password), or your
  browser doesn't understand how to supply
  the credentials required./p
  hr
  addressApache/2.2.3 (CentOS) Server at reviewboard.al.com.au Port
  80/address
  /body/html

  Error creating review request: HTTP 401

  Looks like Django/RB is not picking the user:passw ??

  
  If I try a GET to this page, it is successful

 curl -u federiconhttp://reviewboard.al.com.au/api/review-requests/
  Enter host password for user 'federicon':
  {total_results: 0, stat: ok, review_requests: [], links:
  {self: {href: http://reviewboard.al.com.au/api/review-requests/;,
  method: GET}, create: {href: http://reviewboard.al.com.au/api/
  review-requests/, method: POST}}}

  If I try a POST I get he Your are not  Logged in error

 curl --data sdf -u 
 federiconhttp://reviewboard.al.com.au/api/review-requests/
  Enter host password for user 'federicon':
  {stat: fail, err: {msg: You are not logged in, code: 103}}

  we run out of ideas in what to try

  

  On Mar 31, 11:16 am, Christian Hammond chip...@chipx86.com wrote:
  Hi Fede,

  The reason it's broken now is that we've moved to using Basic HTTP auth for
  theAPI. This is a standard protocol, and things have supported it forever,
  but wsgi (and fastcgi) by default actually specifically filter out any
  Authorization headers related to it. That's what that directive is meant to
  prevent. ThewebUI