Bug 821287 - Modify retention tag via bkr client
Modify retention tag via bkr client
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: command line (Show other bugs)
0.8
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.9.1
: ---
Assigned To: Raymond Mancy
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-13 19:31 EDT by Raymond Mancy
Modified: 2014-12-07 20:12 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-19 20:38:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Raymond Mancy 2012-05-13 19:31:31 EDT
Add the ability to change the retention tag via the bkr client. See 812831
Comment 1 Raymond Mancy 2012-07-12 03:26:04 EDT
http://gerrit.beaker-project.org/#/c/1205/
Comment 2 Dan Callaghan 2012-07-13 00:30:43 EDT
Tests broken:

FAIL: test_change_retention_tag (bkr.inttest.server.selenium.test_jobs.JobAttributeChange)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dcallagh/work/beaker/IntegrationTests/src/bkr/inttest/server/selenium/test_jobs.py", line 464, in test_change_retention_tag
    self.wait_and_try(lambda: self.assert_(sel.is_text_present("Tag has been updated")), wait_time=10)
  File "/home/dcallagh/work/beaker/IntegrationTests/src/bkr/inttest/server/selenium/__init__.py", line 50, in wait_and_try
    f()
  File "/home/dcallagh/work/beaker/IntegrationTests/src/bkr/inttest/server/selenium/test_jobs.py", line 464, in <lambda>
    self.wait_and_try(lambda: self.assert_(sel.is_text_present("Tag has been updated")), wait_time=10)
AssertionError: 

Server traceback is:

2012-07-13 13:58:33,870 cherrypy.msg INFO HTTP: Page handler: <bound method Jobs.update of <bkr.server.jobs.Jobs object at 0x2ed2110>>
Traceback (most recent call last):
[...]
  File "/home/dcallagh/work/beaker/Server/bkr/server/jobs.py", line 739, in update
    returns.update(Utility.update_task_product(job,retention_tag_id,product_id))
  File "/home/dcallagh/work/beaker/Server/bkr/server/job_utilities.py", line 38, in update_task_product
    return cls.check_retentiontag_job(job, retentiontag)
  File "/home/dcallagh/work/beaker/Server/bkr/server/job_utilities.py", line 76, in check_retentiontag_job
    if new_retentiontag.requires_product() != bool(the_product):
AttributeError: 'int' object has no attribute 'requires_product'
Comment 3 Raymond Mancy 2012-07-13 01:13:15 EDT
http://gerrit.beaker-project.org/#/c/1213/
Comment 6 Dan Callaghan 2012-07-17 00:46:18 EDT
Trying to set a product while leaving the retention tag at 'scratch' gives this unhelpful error:

<Fault 1: "<class 'bkr.common.bexceptions.BeakerException'>:'Job 16475 not updated: Unknown reason'">

Should we try and make the message more descriptive?
Comment 7 Dan Callaghan 2012-07-17 00:47:26 EDT
(In reply to comment #6)
> Trying to set a product while leaving the retention tag at 'scratch' gives
> this unhelpful error:
> 
> <Fault 1: "<class 'bkr.common.bexceptions.BeakerException'>:'Job 16475 not
> updated: Unknown reason'">
> 
> Should we try and make the message more descriptive?

Setting the retention tag back to scratch without unsetting the product gives a much better error message:

<Fault 1: "<class 'bkr.common.bexceptions.BeakerException'>:'Job 16475 not updated: Incompatible product and tags'">
Comment 8 Raymond Mancy 2012-07-17 03:20:24 EDT
http://gerrit.beaker-project.org/#/c/1215/
Comment 9 Dan Callaghan 2012-07-19 20:38:29 EDT
Beaker 0.9.1 has been released.

Note You need to log in before you can comment on or make changes to this bug.