[jira] [Created] (COUCHDB-1144) oauth requests with URL realms result in function_clause error in HTTP request
oauth requests with URL realms result in function_clause error in HTTP request -- Key: COUCHDB-1144 URL: https://issues.apache.org/jira/browse/COUCHDB-1144 Project: CouchDB Issue Type: Bug Components: HTTP Interface Affects Versions: 1.0.2, 1.1 Environment: OSX - branch 1.1 - r1095237 Reporter: Joan Touzet Priority: Critical As illustrated in this Wireshark packet dump, lines 53ff, any OAuth request with a URL as the realm will return a 500 error: http://friendpaste.com/3vXPjHP6s7dLZjsj7DOfSH Erlang stacktrace is similar to: [error] [0.189.0] function_clause error in HTTP request [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] Stacktrace: [{oauth_uri,decode, [://127.0.0.1:5984,ptth]}, {oauth_uri,param_from_header_string,1}, {oauth_uri, '-params_from_header_string/1-lc$^0/1-0-', 1}, {couch_httpd_oauth,serve_oauth,3}, {couch_httpd,authenticate_request,2}, {couch_httpd,handle_request_int,5}, {mochiweb_http,headers,5}, {proc_lib,init_p_do_apply,3}] [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] 127.0.0.1 - - 'PUT' /test_c_project/16f74c25-d641-4710-8f38-18295a8a69b1 500 Chatted with benoitc today and he suggested this may be because the realm is not being properly encoded before being passed on. By default, some OAuth libraries such as python's popular oauth2 library always set the realm of a request to the URL of the resource being accessed, such as http://localhost:5984/ . (In fact, oauth2 library does not support overriding this setting.) The OAuth spec @ http://oauth.net/core/1.0/ also shows realms specified as URLs. RFC5849 states The OPTIONAL realm parameter MAY be added and interpreted per [RFC2617] section 1.2., which in turn says the realm is any quoted-string. It seems that this may already be fixed in trunk simply because trunk has a newer version of the upstream erlang-oauth. A JS test could be added in futon to validate this by modifying function oauthRequest to accept a realm parameter, then passing that down to OAuth.getAuthorizationHeader on line 56. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
Development environment
Hi all, in order to understand how CouchDB works I want be able to run the application under debugger. Unfortunately it does not look like an easy task. The information provided on the wiiki ( http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may be enough for a professional Erlang developer but it is not enough for anyone who learns Erlang together with CouchDB. I could not find any resource which gives step-by-step instructions on how to organise an effective development environment for CouchDB. Can someone point me to such a guide/tutorial/manual/screencast ? Thanks, Andrey
Re: Development environment
On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov trophyb...@googlemail.com wrote: Hi all, in order to understand how CouchDB works I want be able to run the application under debugger. Unfortunately it does not look like an easy task. The information provided on the wiiki ( http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may be enough for a professional Erlang developer but it is not enough for anyone who learns Erlang together with CouchDB. I could not find any resource which gives step-by-step instructions on how to organise an effective development environment for CouchDB. Can someone point me to such a guide/tutorial/manual/screencast ? Thanks, Andrey Getting deps on Ubuntu (maybe debian?) $ sudo apt-get build-deps couchdb On OS X with Homebrew you should only need to do something like: $ brew install erlang $ brew install spidermonkey $ brew install icu4c brew link icu4c Then for CouchDB: $ mkdir -p ~/code cd code $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb $ # alternatively: git clone git://git.apache.org/couchdb.git $ cd couchdb $ ./bootstrap ./configure make dev $ ./utils/run
Re: Development environment
Thank you, but the question is not how to run but how to DEBUG (and watch all the values, function calls etc) Just the ability to run CouchDB does not help to understand who is calling whom, when, how, with which arguments... - Andrey On Thu, Apr 28, 2011 at 6:10 PM, Paul Davis paul.joseph.da...@gmail.comwrote: On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov trophyb...@googlemail.com wrote: Hi all, in order to understand how CouchDB works I want be able to run the application under debugger. Unfortunately it does not look like an easy task. The information provided on the wiiki ( http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may be enough for a professional Erlang developer but it is not enough for anyone who learns Erlang together with CouchDB. I could not find any resource which gives step-by-step instructions on how to organise an effective development environment for CouchDB. Can someone point me to such a guide/tutorial/manual/screencast ? Thanks, Andrey Getting deps on Ubuntu (maybe debian?) $ sudo apt-get build-deps couchdb On OS X with Homebrew you should only need to do something like: $ brew install erlang $ brew install spidermonkey $ brew install icu4c brew link icu4c Then for CouchDB: $ mkdir -p ~/code cd code $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb $ # alternatively: git clone git://git.apache.org/couchdb.git $ cd couchdb $ ./bootstrap ./configure make dev $ ./utils/run
[jira] [Commented] (COUCHDB-1144) oauth requests with URL realms result in function_clause error in HTTP request
[ https://issues.apache.org/jira/browse/COUCHDB-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13026369#comment-13026369 ] Joan Touzet commented on COUCHDB-1144: -- CouchDB only errors when the OAuth request is malformed (not percent-encoded). python-oauth2 (simplegeo) doesn't percent-encode its OAuth realm. We're pushing upstream to fix that. It's interesting that the newer version of erlang-oauth in trunk handles the malformed request successfully, without the stacktrace. I'll reduce this to a minor issue, upload a .diff to the JS tests that shows the issue, and suggest that, if possible, CouchDB be modified not to 500 on these malformed requests. oauth requests with URL realms result in function_clause error in HTTP request -- Key: COUCHDB-1144 URL: https://issues.apache.org/jira/browse/COUCHDB-1144 Project: CouchDB Issue Type: Bug Components: HTTP Interface Affects Versions: 1.0.2, 1.1 Environment: OSX - branch 1.1 - r1095237 Reporter: Joan Touzet Priority: Critical As illustrated in this Wireshark packet dump, lines 53ff, any OAuth request with a URL as the realm will return a 500 error: http://friendpaste.com/3vXPjHP6s7dLZjsj7DOfSH Erlang stacktrace is similar to: [error] [0.189.0] function_clause error in HTTP request [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] Stacktrace: [{oauth_uri,decode, [://127.0.0.1:5984,ptth]}, {oauth_uri,param_from_header_string,1}, {oauth_uri, '-params_from_header_string/1-lc$^0/1-0-', 1}, {couch_httpd_oauth,serve_oauth,3}, {couch_httpd,authenticate_request,2}, {couch_httpd,handle_request_int,5}, {mochiweb_http,headers,5}, {proc_lib,init_p_do_apply,3}] [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] 127.0.0.1 - - 'PUT' /test_c_project/16f74c25-d641-4710-8f38-18295a8a69b1 500 Chatted with benoitc today and he suggested this may be because the realm is not being properly encoded before being passed on. By default, some OAuth libraries such as python's popular oauth2 library always set the realm of a request to the URL of the resource being accessed, such as http://localhost:5984/ . (In fact, oauth2 library does not support overriding this setting.) The OAuth spec @ http://oauth.net/core/1.0/ also shows realms specified as URLs. RFC5849 states The OPTIONAL realm parameter MAY be added and interpreted per [RFC2617] section 1.2., which in turn says the realm is any quoted-string. It seems that this may already be fixed in trunk simply because trunk has a newer version of the upstream erlang-oauth. A JS test could be added in futon to validate this by modifying function oauthRequest to accept a realm parameter, then passing that down to OAuth.getAuthorizationHeader on line 56. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (COUCHDB-1144) oauth requests with non-percent-encoded realms result in function_clause error in HTTP request
[ https://issues.apache.org/jira/browse/COUCHDB-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joan Touzet updated COUCHDB-1144: - Priority: Minor (was: Critical) Description: As illustrated in this Wireshark packet dump, lines 53ff, any OAuth request with a non-percent-encoded URL as the realm will return a 500 error: http://friendpaste.com/3vXPjHP6s7dLZjsj7DOfSH Erlang stacktrace is similar to: [error] [0.189.0] function_clause error in HTTP request [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] Stacktrace: [{oauth_uri,decode, [://127.0.0.1:5984,ptth]}, {oauth_uri,param_from_header_string,1}, {oauth_uri, '-params_from_header_string/1-lc$^0/1-0-', 1}, {couch_httpd_oauth,serve_oauth,3}, {couch_httpd,authenticate_request,2}, {couch_httpd,handle_request_int,5}, {mochiweb_http,headers,5}, {proc_lib,init_p_do_apply,3}] [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] 127.0.0.1 - - 'PUT' /test_c_project/16f74c25-d641-4710-8f38-18295a8a69b1 500 Chatted with benoitc today and he suggested this may be because the realm is not being properly encoded before being passed on. By default, some OAuth libraries such as python's popular oauth2 library always set the realm of a request to the URL of the resource being accessed, such as http://localhost:5984/ . (In fact, oauth2 library does not support overriding this setting.) The OAuth spec @ http://oauth.net/core/1.0/ also shows realms specified as URLs. RFC5849 states The OPTIONAL realm parameter MAY be added and interpreted per [RFC2617] section 1.2., which in turn says the realm is any quoted-string. It seems that this may already be fixed in trunk simply because trunk has a newer version of the upstream erlang-oauth. A JS test could be added in futon to validate this by modifying function oauthRequest to accept a realm parameter, then passing that down to OAuth.getAuthorizationHeader on line 56. was: As illustrated in this Wireshark packet dump, lines 53ff, any OAuth request with a URL as the realm will return a 500 error: http://friendpaste.com/3vXPjHP6s7dLZjsj7DOfSH Erlang stacktrace is similar to: [error] [0.189.0] function_clause error in HTTP request [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] Stacktrace: [{oauth_uri,decode, [://127.0.0.1:5984,ptth]}, {oauth_uri,param_from_header_string,1}, {oauth_uri, '-params_from_header_string/1-lc$^0/1-0-', 1}, {couch_httpd_oauth,serve_oauth,3}, {couch_httpd,authenticate_request,2}, {couch_httpd,handle_request_int,5}, {mochiweb_http,headers,5}, {proc_lib,init_p_do_apply,3}] [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] 127.0.0.1 - - 'PUT' /test_c_project/16f74c25-d641-4710-8f38-18295a8a69b1 500 Chatted with benoitc today and he suggested this may be because the realm is not being properly encoded before being passed on. By default, some OAuth libraries such as python's popular oauth2 library always set the realm of a request to the URL of the resource being accessed, such as http://localhost:5984/ . (In fact, oauth2 library does not support overriding this setting.) The OAuth spec @ http://oauth.net/core/1.0/ also shows realms specified as URLs. RFC5849 states The OPTIONAL realm parameter MAY be added and interpreted per [RFC2617] section 1.2., which in turn says the realm is any quoted-string. It seems that this may already be fixed in trunk simply because trunk has a newer version of the upstream erlang-oauth. A JS test could be added in futon to validate this by modifying function oauthRequest to accept a realm parameter, then passing that down to OAuth.getAuthorizationHeader on line 56. Summary: oauth requests with non-percent-encoded realms result in function_clause error in HTTP request (was: oauth requests with URL realms result in function_clause error in HTTP request) oauth requests with non-percent-encoded realms result in function_clause error in HTTP request -- Key: COUCHDB-1144 URL: https://issues.apache.org/jira/browse/COUCHDB-1144 Project: CouchDB Issue Type: Bug Components: HTTP Interface Affects Versions: 1.0.2, 1.1 Environment: OSX - branch 1.1 - r1095237 Reporter: Joan Touzet
[jira] [Updated] (COUCHDB-1144) oauth requests with non-percent-encoded realms result in function_clause error in HTTP request
[ https://issues.apache.org/jira/browse/COUCHDB-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joan Touzet updated COUCHDB-1144: - Attachment: oauth-realm-test.patch Applying this patch to 1.0.2/1.1 will cause the oauth test to fail. As this patch makes OAuth do the wrong thing by not percent-encoding the OAuth realm parameter, it is probably not suitable for inclusion long-term. oauth requests with non-percent-encoded realms result in function_clause error in HTTP request -- Key: COUCHDB-1144 URL: https://issues.apache.org/jira/browse/COUCHDB-1144 Project: CouchDB Issue Type: Bug Components: HTTP Interface Affects Versions: 1.0.2, 1.1 Environment: OSX - branch 1.1 - r1095237 Reporter: Joan Touzet Priority: Minor Attachments: oauth-realm-test.patch As illustrated in this Wireshark packet dump, lines 53ff, any OAuth request with a non-percent-encoded URL as the realm will return a 500 error: http://friendpaste.com/3vXPjHP6s7dLZjsj7DOfSH Erlang stacktrace is similar to: [error] [0.189.0] function_clause error in HTTP request [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] Stacktrace: [{oauth_uri,decode, [://127.0.0.1:5984,ptth]}, {oauth_uri,param_from_header_string,1}, {oauth_uri, '-params_from_header_string/1-lc$^0/1-0-', 1}, {couch_httpd_oauth,serve_oauth,3}, {couch_httpd,authenticate_request,2}, {couch_httpd,handle_request_int,5}, {mochiweb_http,headers,5}, {proc_lib,init_p_do_apply,3}] [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] 127.0.0.1 - - 'PUT' /test_c_project/16f74c25-d641-4710-8f38-18295a8a69b1 500 Chatted with benoitc today and he suggested this may be because the realm is not being properly encoded before being passed on. By default, some OAuth libraries such as python's popular oauth2 library always set the realm of a request to the URL of the resource being accessed, such as http://localhost:5984/ . (In fact, oauth2 library does not support overriding this setting.) The OAuth spec @ http://oauth.net/core/1.0/ also shows realms specified as URLs. RFC5849 states The OPTIONAL realm parameter MAY be added and interpreted per [RFC2617] section 1.2., which in turn says the realm is any quoted-string. It seems that this may already be fixed in trunk simply because trunk has a newer version of the upstream erlang-oauth. A JS test could be added in futon to validate this by modifying function oauthRequest to accept a realm parameter, then passing that down to OAuth.getAuthorizationHeader on line 56. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: Development environment
On Thu, Apr 28, 2011 at 12:15 PM, Andrey Somov trophyb...@googlemail.com wrote: Thank you, but the question is not how to run but how to DEBUG (and watch all the values, function calls etc) Just the ability to run CouchDB does not help to understand who is calling whom, when, how, with which arguments... Oh, gotchya. Yeah, I know Bob Dionne does some stuff with emacs and distel or something or other. I'm one of those weirdos that just uses a lot of ?LOG_DEBUG/?LOG_INFO calls when I need to investigate something. - Andrey On Thu, Apr 28, 2011 at 6:10 PM, Paul Davis paul.joseph.da...@gmail.comwrote: On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov trophyb...@googlemail.com wrote: Hi all, in order to understand how CouchDB works I want be able to run the application under debugger. Unfortunately it does not look like an easy task. The information provided on the wiiki ( http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may be enough for a professional Erlang developer but it is not enough for anyone who learns Erlang together with CouchDB. I could not find any resource which gives step-by-step instructions on how to organise an effective development environment for CouchDB. Can someone point me to such a guide/tutorial/manual/screencast ? Thanks, Andrey Getting deps on Ubuntu (maybe debian?) $ sudo apt-get build-deps couchdb On OS X with Homebrew you should only need to do something like: $ brew install erlang $ brew install spidermonkey $ brew install icu4c brew link icu4c Then for CouchDB: $ mkdir -p ~/code cd code $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb $ # alternatively: git clone git://git.apache.org/couchdb.git $ cd couchdb $ ./bootstrap ./configure make dev $ ./utils/run
Re: Development environment
I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang IDE that runs under Eclipse. Now how much further that takes you into the guts of CouchDB is another story. Andrey Somov wrote: Thank you, but the question is not how to run but how to DEBUG (and watch all the values, function calls etc) Just the ability to run CouchDB does not help to understand who is calling whom, when, how, with which arguments... - Andrey On Thu, Apr 28, 2011 at 6:10 PM, Paul Davispaul.joseph.da...@gmail.comwrote: On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov trophyb...@googlemail.com wrote: Hi all, in order to understand how CouchDB works I want be able to run the application under debugger. Unfortunately it does not look like an easy task. The information provided on the wiiki ( http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may be enough for a professional Erlang developer but it is not enough for anyone who learns Erlang together with CouchDB. I could not find any resource which gives step-by-step instructions on how to organise an effective development environment for CouchDB. Can someone point me to such a guide/tutorial/manual/screencast ? Thanks, Andrey Getting deps on Ubuntu (maybe debian?) $ sudo apt-get build-deps couchdb On OS X with Homebrew you should only need to do something like: $ brew install erlang $ brew install spidermonkey $ brew install icu4c brew link icu4c Then for CouchDB: $ mkdir -p ~/code cd code $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb $ # alternatively: git clone git://git.apache.org/couchdb.git $ cd couchdb $ ./bootstrap ./configure make dev $ ./utils/run -- In theory, there is no difference between theory and practice. Infnord practice, there is. Yogi Berra
[jira] [Commented] (COUCHDB-1144) oauth requests with non-percent-encoded realms result in function_clause error in HTTP request
[ https://issues.apache.org/jira/browse/COUCHDB-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13026395#comment-13026395 ] Joan Touzet commented on COUCHDB-1144: -- After chatting with davisp in IRC, we agree that the bug is in erlang-oauth/src/oauth_uri.erl . A patch against the 1.1 is attached; it is the oauth_uri.erl from trunk/upstream. Paired code inspection (with davisp) shows no variance in the exported functions, so this is a dropin replacement. I respectfully request including this in 1.1.0. :) oauth requests with non-percent-encoded realms result in function_clause error in HTTP request -- Key: COUCHDB-1144 URL: https://issues.apache.org/jira/browse/COUCHDB-1144 Project: CouchDB Issue Type: Bug Components: HTTP Interface Affects Versions: 1.0.2, 1.1 Environment: OSX - branch 1.1 - r1095237 Reporter: Joan Touzet Priority: Minor Attachments: oauth-realm-test.patch, oauth_uri.erl As illustrated in this Wireshark packet dump, lines 53ff, any OAuth request with a non-percent-encoded URL as the realm will return a 500 error: http://friendpaste.com/3vXPjHP6s7dLZjsj7DOfSH Erlang stacktrace is similar to: [error] [0.189.0] function_clause error in HTTP request [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] Stacktrace: [{oauth_uri,decode, [://127.0.0.1:5984,ptth]}, {oauth_uri,param_from_header_string,1}, {oauth_uri, '-params_from_header_string/1-lc$^0/1-0-', 1}, {couch_httpd_oauth,serve_oauth,3}, {couch_httpd,authenticate_request,2}, {couch_httpd,handle_request_int,5}, {mochiweb_http,headers,5}, {proc_lib,init_p_do_apply,3}] [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] 127.0.0.1 - - 'PUT' /test_c_project/16f74c25-d641-4710-8f38-18295a8a69b1 500 Chatted with benoitc today and he suggested this may be because the realm is not being properly encoded before being passed on. By default, some OAuth libraries such as python's popular oauth2 library always set the realm of a request to the URL of the resource being accessed, such as http://localhost:5984/ . (In fact, oauth2 library does not support overriding this setting.) The OAuth spec @ http://oauth.net/core/1.0/ also shows realms specified as URLs. RFC5849 states The OPTIONAL realm parameter MAY be added and interpreted per [RFC2617] section 1.2., which in turn says the realm is any quoted-string. It seems that this may already be fixed in trunk simply because trunk has a newer version of the upstream erlang-oauth. A JS test could be added in futon to validate this by modifying function oauthRequest to accept a realm parameter, then passing that down to OAuth.getAuthorizationHeader on line 56. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (COUCHDB-1144) oauth requests with non-percent-encoded realms result in function_clause error in HTTP request
[ https://issues.apache.org/jira/browse/COUCHDB-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joan Touzet updated COUCHDB-1144: - Attachment: oauth_uri.erl Patch to fix this in 1.0.x/1.1. oauth requests with non-percent-encoded realms result in function_clause error in HTTP request -- Key: COUCHDB-1144 URL: https://issues.apache.org/jira/browse/COUCHDB-1144 Project: CouchDB Issue Type: Bug Components: HTTP Interface Affects Versions: 1.0.2, 1.1 Environment: OSX - branch 1.1 - r1095237 Reporter: Joan Touzet Priority: Minor Attachments: oauth-realm-test.patch, oauth_uri.erl As illustrated in this Wireshark packet dump, lines 53ff, any OAuth request with a non-percent-encoded URL as the realm will return a 500 error: http://friendpaste.com/3vXPjHP6s7dLZjsj7DOfSH Erlang stacktrace is similar to: [error] [0.189.0] function_clause error in HTTP request [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] Stacktrace: [{oauth_uri,decode, [://127.0.0.1:5984,ptth]}, {oauth_uri,param_from_header_string,1}, {oauth_uri, '-params_from_header_string/1-lc$^0/1-0-', 1}, {couch_httpd_oauth,serve_oauth,3}, {couch_httpd,authenticate_request,2}, {couch_httpd,handle_request_int,5}, {mochiweb_http,headers,5}, {proc_lib,init_p_do_apply,3}] [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] 127.0.0.1 - - 'PUT' /test_c_project/16f74c25-d641-4710-8f38-18295a8a69b1 500 Chatted with benoitc today and he suggested this may be because the realm is not being properly encoded before being passed on. By default, some OAuth libraries such as python's popular oauth2 library always set the realm of a request to the URL of the resource being accessed, such as http://localhost:5984/ . (In fact, oauth2 library does not support overriding this setting.) The OAuth spec @ http://oauth.net/core/1.0/ also shows realms specified as URLs. RFC5849 states The OPTIONAL realm parameter MAY be added and interpreted per [RFC2617] section 1.2., which in turn says the realm is any quoted-string. It seems that this may already be fixed in trunk simply because trunk has a newer version of the upstream erlang-oauth. A JS test could be added in futon to validate this by modifying function oauthRequest to accept a realm parameter, then passing that down to OAuth.getAuthorizationHeader on line 56. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1144) oauth requests with non-percent-encoded realms result in function_clause error in HTTP request
[ https://issues.apache.org/jira/browse/COUCHDB-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13026401#comment-13026401 ] Paul Joseph Davis commented on COUCHDB-1144: Crux of the issue is that oauth_uri:decode in 1.1.x is much more strict than in trunk. Trunk version just de-hexes any %HH encodings, where as 1.1.x asserts that non %HH sequences match [a-zA-Z0-9-_.~] oauth requests with non-percent-encoded realms result in function_clause error in HTTP request -- Key: COUCHDB-1144 URL: https://issues.apache.org/jira/browse/COUCHDB-1144 Project: CouchDB Issue Type: Bug Components: HTTP Interface Affects Versions: 1.0.2, 1.1 Environment: OSX - branch 1.1 - r1095237 Reporter: Joan Touzet Priority: Minor Attachments: oauth-realm-test.patch, oauth_uri.erl As illustrated in this Wireshark packet dump, lines 53ff, any OAuth request with a non-percent-encoded URL as the realm will return a 500 error: http://friendpaste.com/3vXPjHP6s7dLZjsj7DOfSH Erlang stacktrace is similar to: [error] [0.189.0] function_clause error in HTTP request [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] Stacktrace: [{oauth_uri,decode, [://127.0.0.1:5984,ptth]}, {oauth_uri,param_from_header_string,1}, {oauth_uri, '-params_from_header_string/1-lc$^0/1-0-', 1}, {couch_httpd_oauth,serve_oauth,3}, {couch_httpd,authenticate_request,2}, {couch_httpd,handle_request_int,5}, {mochiweb_http,headers,5}, {proc_lib,init_p_do_apply,3}] [Wed, 27 Apr 2011 23:31:46 GMT] [info] [0.189.0] 127.0.0.1 - - 'PUT' /test_c_project/16f74c25-d641-4710-8f38-18295a8a69b1 500 Chatted with benoitc today and he suggested this may be because the realm is not being properly encoded before being passed on. By default, some OAuth libraries such as python's popular oauth2 library always set the realm of a request to the URL of the resource being accessed, such as http://localhost:5984/ . (In fact, oauth2 library does not support overriding this setting.) The OAuth spec @ http://oauth.net/core/1.0/ also shows realms specified as URLs. RFC5849 states The OPTIONAL realm parameter MAY be added and interpreted per [RFC2617] section 1.2., which in turn says the realm is any quoted-string. It seems that this may already be fixed in trunk simply because trunk has a newer version of the upstream erlang-oauth. A JS test could be added in futon to validate this by modifying function oauthRequest to accept a realm parameter, then passing that down to OAuth.getAuthorizationHeader on line 56. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (COUCHDB-1136) cleanup views does not work when a design document has no views
[ https://issues.apache.org/jira/browse/COUCHDB-1136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Randall Leeds updated COUCHDB-1136: --- Attachment: view_cleanup_etap.patch Passing etap test. Ship it! cleanup views does not work when a design document has no views --- Key: COUCHDB-1136 URL: https://issues.apache.org/jira/browse/COUCHDB-1136 Project: CouchDB Issue Type: Bug Components: Build System Affects Versions: 1.0.2 Reporter: Randall Leeds Priority: Minor Attachments: fix_empty_ddoc_cleanup.patch, view_cleanup_etap.patch When a view has no design documents the cleanup code creates an empty regex which matches everything, thus saving all the index files. In this case it should delete everything instead. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (COUCHDB-1145) As a CouchApp developer, I'd like access to a listing of local-only (_local) docs.
As a CouchApp developer, I'd like access to a listing of local-only (_local) docs. -- Key: COUCHDB-1145 URL: https://issues.apache.org/jira/browse/COUCHDB-1145 Project: CouchDB Issue Type: New Feature Components: HTTP Interface Reporter: Benjamin Young I'm seeing an increased use of _local/{doc} in CouchApps for storing local config data that should not be replicated for security reasons or because they want it to stay local for instance identification. Currently, those docs can only be retrieved if the app developer knows they're there--which may be fine for the app developer. However, if the local user/admin who installed the CouchApp wanted to see the data stored, they can't--at least not via Futon...they'd have to use some pretty complex Erlang via the Erlang shell (re: davisp). Please consider making _local doc listing available to the REST API, so it can be exposed to Futon (and others). Thanks. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: Development environment
The simplest thing is just: make dev ./utils/run -i This will launch couch and drop you into an interacting erlang session. From there you can use erlang calls to inspect processes, enable tracing, etc. As far as an interactive step debugger I don't know. Never tried. On Thu, Apr 28, 2011 at 10:43, Miles Fidelman mfidel...@meetinghouse.net wrote: I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang IDE that runs under Eclipse. Now how much further that takes you into the guts of CouchDB is another story. Andrey Somov wrote: Thank you, but the question is not how to run but how to DEBUG (and watch all the values, function calls etc) Just the ability to run CouchDB does not help to understand who is calling whom, when, how, with which arguments... - Andrey On Thu, Apr 28, 2011 at 6:10 PM, Paul Davispaul.joseph.da...@gmail.comwrote: On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov trophyb...@googlemail.com wrote: Hi all, in order to understand how CouchDB works I want be able to run the application under debugger. Unfortunately it does not look like an easy task. The information provided on the wiiki ( http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may be enough for a professional Erlang developer but it is not enough for anyone who learns Erlang together with CouchDB. I could not find any resource which gives step-by-step instructions on how to organise an effective development environment for CouchDB. Can someone point me to such a guide/tutorial/manual/screencast ? Thanks, Andrey Getting deps on Ubuntu (maybe debian?) $ sudo apt-get build-deps couchdb On OS X with Homebrew you should only need to do something like: $ brew install erlang $ brew install spidermonkey $ brew install icu4c brew link icu4c Then for CouchDB: $ mkdir -p ~/code cd code $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb $ # alternatively: git clone git://git.apache.org/couchdb.git $ cd couchdb $ ./bootstrap ./configure make dev $ ./utils/run -- In theory, there is no difference between theory and practice. Infnord practice, there is. Yogi Berra
Re: Development environment
On Thursday, April 28, 2011, Paul Davis paul.joseph.da...@gmail.com wrote: On Thu, Apr 28, 2011 at 12:15 PM, Andrey Somov trophyb...@googlemail.com wrote: Thank you, but the question is not how to run but how to DEBUG (and watch all the values, function calls etc) Just the ability to run CouchDB does not help to understand who is calling whom, when, how, with which arguments... Oh, gotchya. Yeah, I know Bob Dionne does some stuff with emacs and distel or something or other. I'm one of those weirdos that just uses a lot of ?LOG_DEBUG/?LOG_INFO calls when I need to investigate something. or io:format ? - Andrey On Thu, Apr 28, 2011 at 6:10 PM, Paul Davis paul.joseph.da...@gmail.comwrote: On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov trophyb...@googlemail.com wrote: Hi all, in order to understand how CouchDB works I want be able to run the application under debugger. Unfortunately it does not look like an easy task. The information provided on the wiiki ( http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may be enough for a professional Erlang developer but it is not enough for anyone who learns Erlang together with CouchDB. I could not find any resource which gives step-by-step instructions on how to organise an effective development environment for CouchDB. Can someone point me to such a guide/tutorial/manual/screencast ? Thanks, Andrey Getting deps on Ubuntu (maybe debian?) $ sudo apt-get build-deps couchdb On OS X with Homebrew you should only need to do something like: $ brew install erlang $ brew install spidermonkey $ brew install icu4c brew link icu4c Then for CouchDB: $ mkdir -p ~/code cd code $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb $ # alternatively: git clone git://git.apache.org/couchdb.git $ cd couchdb $ ./bootstrap ./configure make dev $ ./utils/run
Re: Development environment
On Thu, Apr 28, 2011 at 3:19 PM, Benoit Chesneau bchesn...@gmail.com wrote: On Thursday, April 28, 2011, Paul Davis paul.joseph.da...@gmail.com wrote: On Thu, Apr 28, 2011 at 12:15 PM, Andrey Somov trophyb...@googlemail.com wrote: Thank you, but the question is not how to run but how to DEBUG (and watch all the values, function calls etc) Just the ability to run CouchDB does not help to understand who is calling whom, when, how, with which arguments... Oh, gotchya. Yeah, I know Bob Dionne does some stuff with emacs and distel or something or other. I'm one of those weirdos that just uses a lot of ?LOG_DEBUG/?LOG_INFO calls when I need to investigate something. or io:format ? And Rob Newson mentioned erlang:display(Term) as well. - Andrey On Thu, Apr 28, 2011 at 6:10 PM, Paul Davis paul.joseph.da...@gmail.comwrote: On Thu, Apr 28, 2011 at 12:03 PM, Andrey Somov trophyb...@googlemail.com wrote: Hi all, in order to understand how CouchDB works I want be able to run the application under debugger. Unfortunately it does not look like an easy task. The information provided on the wiiki ( http://wiki.apache.org/couchdb/Running%20CouchDB%20in%20Dev%20Mode) may be enough for a professional Erlang developer but it is not enough for anyone who learns Erlang together with CouchDB. I could not find any resource which gives step-by-step instructions on how to organise an effective development environment for CouchDB. Can someone point me to such a guide/tutorial/manual/screencast ? Thanks, Andrey Getting deps on Ubuntu (maybe debian?) $ sudo apt-get build-deps couchdb On OS X with Homebrew you should only need to do something like: $ brew install erlang $ brew install spidermonkey $ brew install icu4c brew link icu4c Then for CouchDB: $ mkdir -p ~/code cd code $ svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb $ # alternatively: git clone git://git.apache.org/couchdb.git $ cd couchdb $ ./bootstrap ./configure make dev $ ./utils/run
[jira] [Created] (COUCHDB-1146) Content-Length ignored on GET requests
Content-Length ignored on GET requests -- Key: COUCHDB-1146 URL: https://issues.apache.org/jira/browse/COUCHDB-1146 Project: CouchDB Issue Type: Bug Components: HTTP Interface Reporter: Nathan Vander Wilt In the case of a GET request, CouchDB does not wait for the client to send any content promised by a Content-Length header but sends its response as soon as the last header is received. This can confuse some HTTP client libraries (such as node.js) that do not expect to receive a response before they have finished the request. To reproduce: $ telnet localhost 5984 GET / HTTP/1.1 Content-Length: 3 ... Expected results: No response from CouchDB until last . is typed Actual results: CouchDB sends response and closes the client's connection as soon as request headers are done. From IRC conversation (and RFC 2616) this doesn't seem to be out-of-spec per se, but is a bit rude and therefore can break fragile clients. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1123) Longpolling changes feed with filter and accidental Content-Length header stalls
[ https://issues.apache.org/jira/browse/COUCHDB-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13026713#comment-13026713 ] Paul Joseph Davis commented on COUCHDB-1123: Pretty sure it needs to go down into the body of handle_request. I just wanted to paste a patch that had not_on_my_watch in it. Longpolling changes feed with filter and accidental Content-Length header stalls Key: COUCHDB-1123 URL: https://issues.apache.org/jira/browse/COUCHDB-1123 Project: CouchDB Issue Type: Bug Components: HTTP Interface Affects Versions: 1.0.2 Environment: Mac OS X Snow Leopard, Ubuntu 10.10. Reporter: Jyrki Pulliainen Priority: Minor Labels: changes, contentlength, couchdb, header, http CouchDB behaves erroneously when doing a GET request with Content-Length header to long polling changes feed with filter set. Easiest way to reproduce: 1. Create a new DB 2. Create a single design doc with a filter that just returns true 3. Query database with curl: curl -v -H Content-Length: 123 http://localhost:5984/database/_changes?feed=longpollfilter=designdoc/filter At this point CouchDB behaves strangely. It does not wait for the client to feed the Content-Length bytes of content (which I think is correct, since GET should not have payload), instead, it returns 200 OK and starts the response with '{results:['. However, no changes done to database ever get emitted and the connection never gets closed, not even if explicit timeout is set upon the request. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (COUCHDB-1146) Content-Length ignored on GET requests
[ https://issues.apache.org/jira/browse/COUCHDB-1146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Vander Wilt updated COUCHDB-1146: Description: In the case of a GET request, CouchDB does not wait for the client to send any content promised by a Content-Length header but sends its response as soon as the last header is received. This can confuse some HTTP client libraries (such as node.js) that do not expect to receive a response before they have finished the request. To reproduce: $ telnet localhost 5984 GET / HTTP/1.1 Content-Length: 3 ... Expected results: No response from CouchDB until last . is typed Actual results: CouchDB sends response and closes the client's connection as soon as request headers are done. From IRC conversation (and RFC 2616) this doesn't seem to be out-of-spec per se, but is a bit rude and therefore can break fragile clients (eg https://github.com/joyent/node/issues/989). was: In the case of a GET request, CouchDB does not wait for the client to send any content promised by a Content-Length header but sends its response as soon as the last header is received. This can confuse some HTTP client libraries (such as node.js) that do not expect to receive a response before they have finished the request. To reproduce: $ telnet localhost 5984 GET / HTTP/1.1 Content-Length: 3 ... Expected results: No response from CouchDB until last . is typed Actual results: CouchDB sends response and closes the client's connection as soon as request headers are done. From IRC conversation (and RFC 2616) this doesn't seem to be out-of-spec per se, but is a bit rude and therefore can break fragile clients. Content-Length ignored on GET requests -- Key: COUCHDB-1146 URL: https://issues.apache.org/jira/browse/COUCHDB-1146 Project: CouchDB Issue Type: Bug Components: HTTP Interface Reporter: Nathan Vander Wilt In the case of a GET request, CouchDB does not wait for the client to send any content promised by a Content-Length header but sends its response as soon as the last header is received. This can confuse some HTTP client libraries (such as node.js) that do not expect to receive a response before they have finished the request. To reproduce: $ telnet localhost 5984 GET / HTTP/1.1 Content-Length: 3 ... Expected results: No response from CouchDB until last . is typed Actual results: CouchDB sends response and closes the client's connection as soon as request headers are done. From IRC conversation (and RFC 2616) this doesn't seem to be out-of-spec per se, but is a bit rude and therefore can break fragile clients (eg https://github.com/joyent/node/issues/989). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (COUCHDB-1146) Content-Length ignored on GET requests
[ https://issues.apache.org/jira/browse/COUCHDB-1146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Vander Wilt updated COUCHDB-1146: Description: In the case of a GET request, CouchDB does not wait for the client to send any content promised by a Content-Length header but sends its response as soon as the last header is received. This can confuse some HTTP client libraries (such as node.js) that do not expect to receive a response before they have finished the request. To reproduce: $ telnet localhost 5984 GET / HTTP/1.1 Content-Length: 3 ... Expected results: No response from CouchDB until last . is typed Actual results: CouchDB sends response and closes the client's connection as soon as request headers are done. From IRC conversation (and RFC 2616) this doesn't seem to be out-of-spec per se, but is a bit rude and therefore can break fragile clients (e.g. https://github.com/joyent/node/issues/989 ). was: In the case of a GET request, CouchDB does not wait for the client to send any content promised by a Content-Length header but sends its response as soon as the last header is received. This can confuse some HTTP client libraries (such as node.js) that do not expect to receive a response before they have finished the request. To reproduce: $ telnet localhost 5984 GET / HTTP/1.1 Content-Length: 3 ... Expected results: No response from CouchDB until last . is typed Actual results: CouchDB sends response and closes the client's connection as soon as request headers are done. From IRC conversation (and RFC 2616) this doesn't seem to be out-of-spec per se, but is a bit rude and therefore can break fragile clients (eg https://github.com/joyent/node/issues/989). Content-Length ignored on GET requests -- Key: COUCHDB-1146 URL: https://issues.apache.org/jira/browse/COUCHDB-1146 Project: CouchDB Issue Type: Bug Components: HTTP Interface Reporter: Nathan Vander Wilt In the case of a GET request, CouchDB does not wait for the client to send any content promised by a Content-Length header but sends its response as soon as the last header is received. This can confuse some HTTP client libraries (such as node.js) that do not expect to receive a response before they have finished the request. To reproduce: $ telnet localhost 5984 GET / HTTP/1.1 Content-Length: 3 ... Expected results: No response from CouchDB until last . is typed Actual results: CouchDB sends response and closes the client's connection as soon as request headers are done. From IRC conversation (and RFC 2616) this doesn't seem to be out-of-spec per se, but is a bit rude and therefore can break fragile clients (e.g. https://github.com/joyent/node/issues/989 ). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1123) Longpolling changes feed with filter and accidental Content-Length header stalls
[ https://issues.apache.org/jira/browse/COUCHDB-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13026729#comment-13026729 ] Randall Leeds commented on COUCHDB-1123: http://www.youtube.com/watch?v=TpP8N-X1dF4 Longpolling changes feed with filter and accidental Content-Length header stalls Key: COUCHDB-1123 URL: https://issues.apache.org/jira/browse/COUCHDB-1123 Project: CouchDB Issue Type: Bug Components: HTTP Interface Affects Versions: 1.0.2 Environment: Mac OS X Snow Leopard, Ubuntu 10.10. Reporter: Jyrki Pulliainen Priority: Minor Labels: changes, contentlength, couchdb, header, http CouchDB behaves erroneously when doing a GET request with Content-Length header to long polling changes feed with filter set. Easiest way to reproduce: 1. Create a new DB 2. Create a single design doc with a filter that just returns true 3. Query database with curl: curl -v -H Content-Length: 123 http://localhost:5984/database/_changes?feed=longpollfilter=designdoc/filter At this point CouchDB behaves strangely. It does not wait for the client to feed the Content-Length bytes of content (which I think is correct, since GET should not have payload), instead, it returns 200 OK and starts the response with '{results:['. However, no changes done to database ever get emitted and the connection never gets closed, not even if explicit timeout is set upon the request. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1123) Longpolling changes feed with filter and accidental Content-Length header stalls
[ https://issues.apache.org/jira/browse/COUCHDB-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13026740#comment-13026740 ] Paul Joseph Davis commented on COUCHDB-1123: I love you man. Longpolling changes feed with filter and accidental Content-Length header stalls Key: COUCHDB-1123 URL: https://issues.apache.org/jira/browse/COUCHDB-1123 Project: CouchDB Issue Type: Bug Components: HTTP Interface Affects Versions: 1.0.2 Environment: Mac OS X Snow Leopard, Ubuntu 10.10. Reporter: Jyrki Pulliainen Priority: Minor Labels: changes, contentlength, couchdb, header, http CouchDB behaves erroneously when doing a GET request with Content-Length header to long polling changes feed with filter set. Easiest way to reproduce: 1. Create a new DB 2. Create a single design doc with a filter that just returns true 3. Query database with curl: curl -v -H Content-Length: 123 http://localhost:5984/database/_changes?feed=longpollfilter=designdoc/filter At this point CouchDB behaves strangely. It does not wait for the client to feed the Content-Length bytes of content (which I think is correct, since GET should not have payload), instead, it returns 200 OK and starts the response with '{results:['. However, no changes done to database ever get emitted and the connection never gets closed, not even if explicit timeout is set upon the request. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: Development environment
On Thu, Apr 28, 2011 at 7:43 PM, Miles Fidelman mfidel...@meetinghouse.netwrote: I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang IDE that runs under Eclipse. Now how much further that takes you into the guts of CouchDB is another story. I tried to use erlIDE but I did not find a way to launch CouchDB. Googling did not help and asking the question in this mailing list did not help either. As far as I understand no CouchDB developer is using erlIDE at the moment. It looks like I have to keep using io:format. - Andrey
Re: Development environment
On Thu, Apr 28, 2011 at 6:45 PM, Andrey Somov trophyb...@googlemail.com wrote: On Thu, Apr 28, 2011 at 7:43 PM, Miles Fidelman mfidel...@meetinghouse.netwrote: I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang IDE that runs under Eclipse. Now how much further that takes you into the guts of CouchDB is another story. I tried to use erlIDE but I did not find a way to launch CouchDB. Googling did not help and asking the question in this mailing list did not help either. As far as I understand no CouchDB developer is using erlIDE at the moment. It looks like I have to keep using io:format. - Andrey The only person I know doing debugger things is a big emacs guy. If you're into that sort of thing Erlang supposedly has good integration there.
Re: Development environment
So couchdb is really developed without using step-by-step debugging at all? That seems quite odd. On Thu, Apr 28, 2011 at 5:52 PM, Paul Davis paul.joseph.da...@gmail.com wrote: On Thu, Apr 28, 2011 at 6:45 PM, Andrey Somov trophyb...@googlemail.com wrote: On Thu, Apr 28, 2011 at 7:43 PM, Miles Fidelman mfidel...@meetinghouse.netwrote: I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang IDE that runs under Eclipse. Now how much further that takes you into the guts of CouchDB is another story. I tried to use erlIDE but I did not find a way to launch CouchDB. Googling did not help and asking the question in this mailing list did not help either. As far as I understand no CouchDB developer is using erlIDE at the moment. It looks like I have to keep using io:format. - Andrey The only person I know doing debugger things is a big emacs guy. If you're into that sort of thing Erlang supposedly has good integration there.
Re: Development environment
Tracing seems more common in Erlang. Have you looked at the debugger or redbug? On 28/04/2011, at 10:57 PM, Nathan Stott wrote: So couchdb is really developed without using step-by-step debugging at all? That seems quite odd. On Thu, Apr 28, 2011 at 5:52 PM, Paul Davis paul.joseph.da...@gmail.com wrote: On Thu, Apr 28, 2011 at 6:45 PM, Andrey Somov trophyb...@googlemail.com wrote: On Thu, Apr 28, 2011 at 7:43 PM, Miles Fidelman mfidel...@meetinghouse.netwrote: I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang IDE that runs under Eclipse. Now how much further that takes you into the guts of CouchDB is another story. I tried to use erlIDE but I did not find a way to launch CouchDB. Googling did not help and asking the question in this mailing list did not help either. As far as I understand no CouchDB developer is using erlIDE at the moment. It looks like I have to keep using io:format. - Andrey The only person I know doing debugger things is a big emacs guy. If you're into that sort of thing Erlang supposedly has good integration there.
Sporadically failing tests.
In preparing to roll the 1.0.3 release I've noticed a couple etap tests failing sporadically. Specifically 090 and 140 have both failed. Neither is easy to trigger. 140 at least looks like its related to a race condition error on a socket closing somewhere. Anyone want to look into either of these?
Re: Development environment
On Thu, Apr 28, 2011 at 15:57, Nathan Stott nrst...@gmail.com wrote: So couchdb is really developed without using step-by-step debugging at all? That seems quite odd. Most of the time, when I've written couchdb patches and they're wrong I immediately get dying processes, stack traces and errors. The number of silent, strange problems I produce is just smaller in Erlang than other languages. I think it's a combination of pattern matching, immutable variables and referential transparency. On Thu, Apr 28, 2011 at 5:52 PM, Paul Davis paul.joseph.da...@gmail.com wrote: On Thu, Apr 28, 2011 at 6:45 PM, Andrey Somov trophyb...@googlemail.com wrote: On Thu, Apr 28, 2011 at 7:43 PM, Miles Fidelman mfidel...@meetinghouse.netwrote: I'm not 100% sure, but I expect Erlide might fill the bill - it's an Erlang IDE that runs under Eclipse. Now how much further that takes you into the guts of CouchDB is another story. I tried to use erlIDE but I did not find a way to launch CouchDB. Googling did not help and asking the question in this mailing list did not help either. As far as I understand no CouchDB developer is using erlIDE at the moment. It looks like I have to keep using io:format. - Andrey The only person I know doing debugger things is a big emacs guy. If you're into that sort of thing Erlang supposedly has good integration there.
Re: Development environment
On Fri, Apr 29, 2011 at 1:01 AM, Paul Davis paul.joseph.da...@gmail.comwrote: On Thu, Apr 28, 2011 at 6:57 PM, Nathan Stott nrst...@gmail.com wrote: So couchdb is really developed without using step-by-step debugging at all? That seems quite odd. I never use step by step debugging on any project in any language. I've never found it that useful. step by step debugging of a unit test is one the most effective ways to find bugs. - Andrey
Re: Development environment
On Thu, Apr 28, 2011 at 8:21 PM, Andrey Somov trophyb...@googlemail.com wrote: On Fri, Apr 29, 2011 at 1:01 AM, Paul Davis paul.joseph.da...@gmail.comwrote: On Thu, Apr 28, 2011 at 6:57 PM, Nathan Stott nrst...@gmail.com wrote: So couchdb is really developed without using step-by-step debugging at all? That seems quite odd. I never use step by step debugging on any project in any language. I've never found it that useful. step by step debugging of a unit test is one the most effective ways to find bugs. - Andrey I prefer the Feynman approach.
Re: Development environment
Andrey Somov wrote: On Fri, Apr 29, 2011 at 1:01 AM, Paul Davispaul.joseph.da...@gmail.comwrote: On Thu, Apr 28, 2011 at 6:57 PM, Nathan Stottnrst...@gmail.com wrote: So couchdb is really developed without using step-by-step debugging at all? That seems quite odd. I never use step by step debugging on any project in any language. I've never found it that useful. step by step debugging of a unit test is one the most effective ways to find bugs. Until you start running highly concurrent software, distributed across multiple nodes. That takes debugging to a whole new level. -- In theory, there is no difference between theory and practice. Infnord practice, there is. Yogi Berra
Re: Development environment
On Fri, Apr 29, 2011 at 2:38 AM, Miles Fidelman mfidel...@meetinghouse.net wrote: Andrey Somov wrote: On Fri, Apr 29, 2011 at 1:01 AM, Paul Davispaul.joseph.da...@gmail.comwrote: On Thu, Apr 28, 2011 at 6:57 PM, Nathan Stottnrst...@gmail.com wrote: So couchdb is really developed without using step-by-step debugging at all? That seems quite odd. I never use step by step debugging on any project in any language. I've never found it that useful. step by step debugging of a unit test is one the most effective ways to find bugs. Until you start running highly concurrent software, distributed across multiple nodes. That takes debugging to a whole new level. A unit test doesn't run on multiple nodes.
Re: Development environment
Originally, (until 0.11 I think?) CouchDB was developed without unit tests. I take it from this thread it was also developed then without step-by-step debugging. It's amazing how stable it is and has been in light of those two facts. On Thu, Apr 28, 2011 at 7:40 PM, till t...@php.net wrote: On Fri, Apr 29, 2011 at 2:38 AM, Miles Fidelman mfidel...@meetinghouse.net wrote: Andrey Somov wrote: On Fri, Apr 29, 2011 at 1:01 AM, Paul Davispaul.joseph.da...@gmail.comwrote: On Thu, Apr 28, 2011 at 6:57 PM, Nathan Stottnrst...@gmail.com wrote: So couchdb is really developed without using step-by-step debugging at all? That seems quite odd. I never use step by step debugging on any project in any language. I've never found it that useful. step by step debugging of a unit test is one the most effective ways to find bugs. Until you start running highly concurrent software, distributed across multiple nodes. That takes debugging to a whole new level. A unit test doesn't run on multiple nodes.