Bug 967481

Summary: cannot comment on recipe set which was cancelled before it started
Product: [Retired] Beaker Reporter: Raymond Mancy <rmancy>
Component: web UIAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.12CC: dcallagh, dowang, ebaak, huiwang, jingwang, qwan, rjoost, tools-bugs
Target Milestone: 23.0Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: UX
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-07 23:12:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1263917    
Bug Blocks:    
Attachments:
Description Flags
screenshot for comment9 none

Description Raymond Mancy 2013-05-27 09:05:46 UTC
Description of problem:

Clicking on the 'comment' link throws a 500

Version-Release number of selected component (if applicable):

0.12

How reproducible:

Always

Steps to Reproduce:
1. Open a completed Job
2. Click on the 'comment' link
3.

Actual results:

It seems to be unresponsive, but on closer inspection the AJAX
call is returning with a 500

Expected results:

Working, and if not working, some dialog box to tell us as much.

Additional info:

Comment 1 Dan Callaghan 2013-05-28 00:05:05 UTC
Do you have a traceback for the 500? Is this a regression in 0.12, or just on develop?

Comment 2 Raymond Mancy 2013-05-29 22:10:05 UTC
It's a regression.

2013-05-29 22:08:31,173 cherrypy.msg INFO HTTP: Page handler: <bound method Jobs.get_response_comment of <bkr.server.jobs.Jobs object at 0x7fed4eee0890>>
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/CherryPy-2.3.0-py2.6.egg/cherrypy/_cphttptools.py", line 121, in _run
    self.main()
  File "/usr/lib/python2.6/site-packages/CherryPy-2.3.0-py2.6.egg/cherrypy/_cphttptools.py", line 264, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in get_response_comment
  File "/usr/lib/python2.6/site-packages/turbogears/controllers.py", line 361, in expose
    *args, **kw)
  File "<generated code>", line 0, in run_with_transaction
  File "/usr/lib/python2.6/site-packages/peak/rules/core.py", line 153, in __call__
    return self.body(*args, **kw)
  File "/usr/lib/python2.6/site-packages/turbogears/database.py", line 458, in sa_rwt
    retval = func(*args, **kw)
  File "/usr/lib/python2.6/site-packages/turbogears/controllers.py", line 244, in _expose
    @abstract()
  File "<generated code>", line 0, in _expose
  File "/usr/lib/python2.6/site-packages/peak/rules/core.py", line 153, in __call__
    return self.body(*args, **kw)
  File "/usr/lib/python2.6/site-packages/turbogears/controllers.py", line 255, in <lambda>
    False, {}, args, kw))
  File "/usr/lib/python2.6/site-packages/turbogears/controllers.py", line 425, in _execute_func
    output = errorhandling.try_call(func, *args, **kw)
  File "/usr/lib/python2.6/site-packages/turbogears/errorhandling.py", line 77, in try_call
    return func(self, *args, **kw)
  File "/usr/lib/python2.6/site-packages/bkr/server/jobs.py", line 702, in get_response_comment
    rs_nacked = RecipeSetResponse.by_id(rs_id)
  File "/usr/lib/python2.6/site-packages/bkr/server/model.py", line 4839, in by_id
    return cls.query.filter_by(recipe_set_id=id).one()
  File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/query.py", line 1684, in one

Comment 3 Raymond Mancy 2013-06-24 23:42:17 UTC
Hi Jing,

Can you tell me where you thought this bug had been resolved? I think you will find this bug still exists

Comment 4 wangjing 2013-06-25 00:51:50 UTC
(In reply to Raymond Mancy from comment #3)
> Hi Jing,
> 
> Can you tell me where you thought this bug had been resolved? I think you
> will find this bug still exists

hi, Raymond,

I tested it following steps in comment0:
1. Open a completed Job
2. Click on the 'comment' link

the actual result is:
comment was displayed without a 500 error.

env:
bearker-devel Version - 0.13.1

so I thought it was fixed on current release.
thanks.

Comment 9 wangjing 2013-06-25 06:38:10 UTC
steps for reproducing:

1. Open a Job which was cancelled before running.
2. Click on the 'comment' link when 'Needs Review' was checked beside(see screenshot attached).
3. tail the log on sever: tail -F /var/log/httpd/*log /var/log/beaker/*

then actual result:
error log:
2013-06-25 06:33:14,742 cherrypy.msg INFO HTTP: Page handler: <bound method Jobs.get_response_comment of <bkr.server.jobs.Jobs object at 0x7f831eee3150>>
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/CherryPy-2.3.0-py2.6.egg/cherrypy/_cphttptools.py", line 121, in _run
    self.main()
  File "/usr/lib/python2.6/site-packages/CherryPy-2.3.0-py2.6.egg/cherrypy/_cphttptools.py", line 264, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in get_response_comment
  File "/usr/lib/python2.6/site-packages/turbogears/controllers.py", line 361, in expose
    *args, **kw)
  File "<generated code>", line 0, in run_with_transaction
  File "/usr/lib/python2.6/site-packages/peak/rules/core.py", line 153, in __call__
    return self.body(*args, **kw)
  File "/usr/lib/python2.6/site-packages/turbogears/database.py", line 458, in sa_rwt
    retval = func(*args, **kw)
  File "<generated code>", line 0, in _expose
  File "/usr/lib/python2.6/site-packages/peak/rules/core.py", line 153, in __call__
    return self.body(*args, **kw)
  File "/usr/lib/python2.6/site-packages/turbogears/controllers.py", line 255, in <lambda>
    False, {}, args, kw))
  File "/usr/lib/python2.6/site-packages/turbogears/controllers.py", line 425, in _execute_func
    output = errorhandling.try_call(func, *args, **kw)
  File "/usr/lib/python2.6/site-packages/turbogears/errorhandling.py", line 77, in try_call
    return func(self, *args, **kw)
  File "/usr/lib/python2.6/site-packages/bkr/server/jobs.py", line 701, in get_response_comment
    rs_nacked = RecipeSetResponse.by_id(rs_id)
  File "/usr/lib/python2.6/site-packages/bkr/server/model.py", line 4905, in by_id
    return cls.query.filter_by(recipe_set_id=id).one()
  File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/query.py", line 1684, in one
    raise orm_exc.NoResultFound("No row was found for one()")
NoResultFound: No row was found for one()

Comment 10 wangjing 2013-06-25 06:39:06 UTC
Created attachment 764944 [details]
screenshot for comment9

Comment 14 Dan Callaghan 2016-07-07 23:12:31 UTC
Beaker 23.0 has been released.