[Bug 238301] New: api chokes on unknown user
https://bugzilla.novell.com/show_bug.cgi?id=238301 Summary: api chokes on unknown user Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: BuildService AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: poeml@novell.com QAContact: adrian@novell.com on a fresh install, I did a osc createprj test and entered a line containing a user, which doesn't actually exist (yet): <person role="maintainer" userid="poeml" /> ruby logs an extensive backtrace, is this an unhandled exception? ActiveRecord::StatementInvalid (Mysql::Error: Column 'bs_user_id' cannot be null: INSERT INTO project_user_role_relationships (`bs_role_id`, `db_project_id`, `bs_user_id`) VALUES(1, 3, NULL)): /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract_adapter.rb:120:in `log' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:184:in `execute' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/mysql_adapter.rb:194:in `insert' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1739:in `create_without_callbacks' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:265:in `create_without_timestamps' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/timestamp.rb:30:in `create' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1718:in `create_or_update_without_callbacks' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/callbacks.rb:253:in `create_or_update' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1392:in `save_without_validation' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/validations.rb:736:in `save_without_transactions' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:126:in `save' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/database_statements.rb:51:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:91:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:118:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:126:in `save' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:408:in `create' /app/models/db_project.rb:83:in `store_axml' /srv/www/obs/common/lib/activexml/node.rb:227:in `call' /srv/www/obs/common/lib/activexml/node.rb:227:in `method_missing' /usr/lib/ruby/1.8/rexml/element.rb:939:in `each' /usr/lib/ruby/1.8/rexml/xpath.rb:53:in `each' /usr/lib/ruby/1.8/rexml/element.rb:939:in `each' /srv/www/obs/common/lib/activexml/node.rb:225:in `method_missing' /app/models/db_project.rb:60:in `store_axml' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/database_statements.rb:51:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:91:in `transaction' /app/models/db_project.rb:43:in `store_axml' /app/models/db_project.rb:21:in `store_axml' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/database_statements.rb:51:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/transactions.rb:91:in `transaction' /app/models/db_project.rb:17:in `store_axml' /srv/www/obs/common/lib/activexml/transport.rb:227:in `save' /srv/www/obs/common/lib/activexml/base.rb:90:in `save' /app/controllers/source_controller.rb:260:in `project_meta' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in `process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in `process!' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:612:in `each_cgi' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:609:in `each' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:609:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in `process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in `process!' /srv/www/obs/frontend/public/dispatch.fcgi:24 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238301 ------- Comment #1 from poeml@novell.com 2007-01-24 10:28 MST ------- Here's another one (project doesn't exist): root@zweite-geige ~ # ::ffff:127.0.42.2 127.0.42.2 - [24/Jan/2007:18:18:51 +0100] "GET /source/test/_meta HTTP/1.1" 401 151 "-" "osc/0.9" [F|# 7334] ActiveXML::Transport::NotFoundError (not found): /srv/www/obs/common/lib/activexml/transport.rb:213:in `find' /srv/www/obs/common/lib/activexml/base.rb:69:in `find' /app/controllers/source_controller.rb:211:in `project_meta' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in `perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in `process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in `process!' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:612:in `each_cgi' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:609:in `each' /usr/lib/ruby/vendor_ruby/1.8/fcgi.rb:609:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in `process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in `process!' /srv/www/obs/frontend/public/dispatch.fcgi:24 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238301 chrubis@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |adrian@novell.com |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238301 adrian@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|adrian@novell.com |abauer@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238301 abauer@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Normal |Minor ------- Comment #2 from abauer@novell.com 2007-05-11 08:09 MST ------- Every exception in the frontend is caught by a catch-all mechanism and wrapped in xml, so it's not really unhandled. But in the first case (missing user) it's probably a better idea to catch it earlier and produce a more meaningful error message. I haven't spent much research into how to suppress the backtraces. They're generated on every exception, handled or not. The only drawback I see here is that they increase the size of the logfile. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238301 User martin.mohring@5etech.eu added comment https://bugzilla.novell.com/show_bug.cgi?id=238301#c3 Martin Mohring <martin.mohring@5etech.eu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.mohring@5etech.eu --- Comment #3 from Martin Mohring <martin.mohring@5etech.eu> 2008-09-17 08:43:17 MDT --- Since somewhere around svn trunc 5014 - 5041, the following new behavor was introduced, leading to even more confusing messages:
cat osco.xml <package name="osc-svn" project="openSUSE:Tools:Devel"> <title>openSUSE (build service) commander Developer Version</title> <description>CAUTION: This is a developer Version from SVN trunc.After first test goes to osc pkg.
Commandline client for the openSUSE build service. See http://en.opensuse.org/Build_Service/CLI , as well as http://en.opensuse.org/Build_Service_Tutorial for a general introduction.</description> <person role="maintainer" userid="mlschroeblablugg"/> </package>
osc -A api.opensuse.org meta pkg -F osco.xml openSUSE:Tools:Devel osc-svn Sending meta data... Server returned an error: HTTP Error 500: Internal Server Error
osc -A api.d-atasoft.com meta pkg -F osco.xml openSUSE:Tools:Devel osc-svn Sending meta data... Server returned an error: HTTP Error 500: Internal Server Error Mysql::Error: Column 'bs_user_id' cannot be null: INSERT INTO `package_user_role_relationships` (`role_id`, `bs_user_id`, `db_package_id`) VALUES(3, NULL, 10049)
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=238301 User martin.mohring@5etech.eu added comment https://bugzilla.novell.com/show_bug.cgi?id=238301#c4 --- Comment #4 from Martin Mohring <martin.mohring@5etech.eu> 2008-09-17 08:57:39 MDT --- Since I am not sure, I correct the above statement. I have tested this behavior with svn trunc -r 5051 and with the build.o.o at that day, so I don't know exactly when "Mysql::" was introduced. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=238301 User martin.mohring@5etech.eu added comment https://bugzilla.novell.com/show_bug.cgi?id=238301#c5 --- Comment #5 from Martin Mohring <martin.mohring@5etech.eu> 2008-09-17 09:53:01 MDT --- Its interesting to see that the error was already the same (on the server side - see first description of Peter), but osc (equivalent of rel 0.108) now prints the exception from the server (once its prints it, once not). The same osc version was used. Btw, the complete installation of the OBS including "build" and "osc", is from svn trunc -r 5051 (openSUSE:Tools:Devel/obs-all-svn package). Is it a configuration option, if the exception is printed in the client or not? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=238301 User abauer@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=238301#c6 --- Comment #6 from Andreas Bauer <abauer@novell.com> 2008-09-17 11:08:37 MDT --- no, it's the IChain HTTP 500 replacement "feature". IChain replaces the entire response if the response code is 500. The body is replaced with informative HTML and all the headers are set by ICHain too. TODO for this bug: - change response code to 400 - check for validity of user and produce a sensible error message -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=238301 User abauer@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=238301#c7 Andreas Bauer <abauer@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |suse-tux@gmx.de --- Comment #7 from Andreas Bauer <abauer@novell.com> 2008-09-26 08:32:57 MDT --- *** Bug 404097 has been marked as a duplicate of this bug. *** https://bugzilla.novell.com/show_bug.cgi?id=404097 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com