Bug 862970 - bkr task-details reports destructive=False and nda=False when it is not known
bkr task-details reports destructive=False and nda=False when it is not known
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: tests (Show other bugs)
0.9
Unspecified Unspecified
medium Severity unspecified (vote)
: 0.10.0
: ---
Assigned To: Qixiang Wan
Dan Callaghan
TaskLibrary
:
Depends On:
Blocks: 869957
  Show dependency treegraph
 
Reported: 2012-10-04 00:07 EDT by Dan Callaghan
Modified: 2012-11-22 01:44 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 869957 (view as bug list)
Environment:
Last Closed: 2012-11-22 01:44:03 EST
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 Dan Callaghan 2012-10-04 00:07:53 EDT
bkr task-details reports destructive=False and nda=False for tasks where the field is missing in testinfo.desc (therefore the value is stored by Beaker as NULL/None, not False). This is dangerous because it means Beaker is reporting a test as not destructive, or not under NDA, when it does not know that.

See also bug 749512.

Originally this was probably to work around problems with encoding None/nil in XML-RPC responses. I don't think that is an issue anymore with Python 2.4+.
Comment 2 Dan Callaghan 2012-10-25 02:01:25 EDT
It turns out the nda field is never populated or displayed anywhere except in bkr task-details, so it is useless. So for this bug we should just remove the nda field entirely.

The original problem still applies to the destructive field though. We should report destructive=None when it's not known.
Comment 3 Qixiang Wan 2012-10-25 03:48:44 EDT
patch post:

http://gerrit.beaker-project.org/#/c/1439/

With this fix, bkr task-details will report destructive:None and nda: None when these two fields are missing in testinfo.desc (which means beaker store the value as NULL).

mysql> select name, destructive, nda from task where name = "/distribution/install";
+-----------------------+-------------+------+
| name                  | destructive | nda  |
+-----------------------+-------------+------+
| /distribution/install |        NULL | NULL |
+-----------------------+-------------+------+
1 row in set (0.00 sec)

Before fix:

# bkr task-details /distribution/install

/distribution/install {'excluded_osmajor': [], 'creation_date': '2012-10-18 08:55:50', 'bugzillas': [], 'runfor': [], 'path': '/mnt/tests/distribution/install', 'owner': 'Bill Peck <bpeck@redhat.com>', 'rpm': 'beaker-distribution-install-1.10-15.noarch.rpm', 'id': 1, 'update_date': '2012-10-18 08:55:50', 'priority': 'Manual', 'version': '1.10-15', 'description': 'Reports back on the Installation that was done', 'repo': 'None', 'uploader': 'admin', 'oldrpm': None, 'destructive': False, 'types': [], 'excluded_arch': [], 'name': '/distribution/install', 'license': 'GPL', 'nda': False, 'required': ['@desktop-platform-devel', '@development', '@development-libs', '@development-tools', '@server-platform-devel', 'expect', 'gcc', 'libxml2-python', 'make', 'nfs-utils', 'ntp', 'procmail', 'pyOpenSSL', 'redhat-lsb', 'wget'], 'max_time': 1200, 'valid': True}

After fix:
# bkr task-details /distribution/install

/distribution/install {'excluded_osmajor': [], 'creation_date': '2012-10-18 08:55:50', 'bugzillas': [], 'runfor': [], 'path': '/mnt/tests/distribution/install', 'owner': 'Bill Peck <bpeck@redhat.com>', 'rpm': 'beaker-distribution-install-1.10-15.noarch.rpm', 'id': 1, 'update_date': '2012-10-18 08:55:50', 'priority': 'Manual', 'version': '1.10-15', 'description': 'Reports back on the Installation that was done', 'repo': 'None', 'uploader': 'admin', 'oldrpm': None, 'destructive': None, 'types': [], 'excluded_arch': [], 'name': '/distribution/install', 'license': 'GPL', 'nda': None, 'required': ['@desktop-platform-devel', '@development', '@development-libs', '@development-tools', '@server-platform-devel', 'expect', 'gcc', 'libxml2-python', 'make', 'nfs-utils', 'ntp', 'procmail', 'pyOpenSSL', 'redhat-lsb', 'wget'], 'max_time': 1200, 'valid': True}
Comment 4 Qixiang Wan 2012-10-25 04:37:53 EDT
Bug 869957 is cloned to track the useless nda issue.
Comment 6 Dan Callaghan 2012-11-09 00:50:55 EST
Verified that we get 'destructive': None and no destructive attribute in the XML for /distribution/install, whereas for /distribution/beaker/Sanity/sync-set_block-tests we get 'destructive': False and destructive="false".
Comment 7 Raymond Mancy 2012-11-22 01:44:03 EST
This has now been released

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