Bug 821287 - Modify retention tag via bkr client
Summary: Modify retention tag via bkr client
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Raymond Mancy
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-13 23:31 UTC by Raymond Mancy
Modified: 2019-05-22 13:42 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-20 00:38:29 UTC
Embargoed:


Attachments (Terms of Use)

Description Raymond Mancy 2012-05-13 23:31:31 UTC
Add the ability to change the retention tag via the bkr client. See 812831

Comment 1 Raymond Mancy 2012-07-12 07:26:04 UTC
http://gerrit.beaker-project.org/#/c/1205/

Comment 2 Dan Callaghan 2012-07-13 04:30:43 UTC
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 05:13:15 UTC
http://gerrit.beaker-project.org/#/c/1213/

Comment 6 Dan Callaghan 2012-07-17 04:46:18 UTC
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 04:47:26 UTC
(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 07:20:24 UTC
http://gerrit.beaker-project.org/#/c/1215/

Comment 9 Dan Callaghan 2012-07-20 00:38:29 UTC
Beaker 0.9.1 has been released.


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