adding tipx tag to a test-case: With python-nitrate-0.9-0.el7.noarch.rpm ---------------------------------------------- [chuchvalec tip]$ DEBUG=2 tip-force /CoreOS/coreutils/dd/no-space [DEBUG] Caching on level 2 [DEBUG] Coloring enabled processing task /CoreOS/coreutils/dd/no-space [INFO] Contacting server https://tcms.engineering.redhat.com/xmlrpc/ [DEBUG] Initializing test case TC#108990 [DEBUG] {'alias': '', 'arguments': '', 'attachment': [], 'author': 'azelinka', 'author_id': 2111, 'case_id': 108990, 'case_status': 'CONFIRMED', 'case_status_id': 2, 'category': 'Sanity', 'category_id': 175, 'component': [24397], 'create_date': '2011-08-16 23:23:38', 'default_tester': 'azelinka', 'default_tester_id': 2111, 'estimated_time': '00:04:00', 'extra_link': 'http://pkgs.devel.redhat.com/cgit/tests/coreutils/tree/dd/no-space', 'is_automated': 1, 'is_automated_proposed': False, 'notes': '', 'plan': [12614, 11812, 10292, 10037, 9348, 8681, 5749, 5528, 4829, 4769, 4667, 4595, 4324], 'priority': 'P2', 'priority_id': 2, 'requirement': '', 'reviewer': None, 'reviewer_id': None, 'script': '/CoreOS/coreutils/dd/no-space', 'summary': '/CoreOS/coreutils/dd/no-space', 'tag': []} [DEBUG] Caching user UID#2111 [DEBUG] Caching category ID#175 [DEBUG] Using cached user UID#2111 [DEBUG] Initializing test case TC#139589 [DEBUG] {'alias': '', 'arguments': '', 'attachment': [], 'author': 'azelinka', 'author_id': 2111, 'case_id': 139589, 'case_status': 'DISABLED', 'case_status_id': 3, 'category': 'Sanity', 'category_id': 175, 'component': [], 'create_date': '2012-02-29 19:03:27', 'default_tester': 'azelinka', 'default_tester_id': 2111, 'estimated_time': '00:04:00', 'extra_link': 'http://pkgs.devel.redhat.com/cgit/tests/coreutils/tree/dd/no-space', 'is_automated': 1, 'is_automated_proposed': False, 'notes': 'Duplicate of TC#108990.', 'plan': [4324], 'priority': 'P2', 'priority_id': 2, 'requirement': '', 'reviewer': None, 'reviewer_id': None, 'script': '/CoreOS/coreutils/dd/no-space', 'summary': '/CoreOS/coreutils/dd/no-space', 'tag': []} [DEBUG] Using cached user UID#2111 [DEBUG] Using cached category ID#175 [DEBUG] Using cached user UID#2111 tagging case TC#108990 - /CoreOS/coreutils/dd/no-space [INFO] Fetching tags for TC#108990 [DEBUG] [] [INFO] Tagging TC#108990 with 'TIPx' With python-nitrate-0.14-0.el7.noarch.rpm ---------------------------------------------- [chuchvalec tip]$ DEBUG=2 tip-force /CoreOS/coreutils/dd/no-space processing task /CoreOS/coreutils/dd/no-space DEBUG Coloring enabled (COLOR_AUTO) DEBUG Parsing config file /home/zelialx/.nitrate DEBUG Caching on level 2 (CACHE_OBJECTS) DEBUG Contacting server https://tcms.engineering.redhat.com/xmlrpc/ DEBUG Initializing test case TC#0108990 DEBUG Initializing CaseTags for TC#0108990 from the inset DEBUG [] DEBUG Initializing test case TC#0139589 DEBUG Initializing CaseTags for TC#0139589 from the inset DEBUG [] tagging case TC#0108990 - /CoreOS/coreutils/dd/no-space INFO Adding ID#UNKNOWN to TC#0108990's CaseTags INFO Fetching tags for TC#0108990 DEBUG [] PS: also notice the leading zero in TC number: TC#108990 vs TC#0108990 and the decreased verbosity of DEBUG=2 log - those might be considered regressions by themselves.
reproducer: import nitrate import sys import os if os.path.exists(sys.argv[1]): f=open(sys.argv[1]) tasks=map(str.strip,f.readlines()) else: tasks=sys.argv[1:] for task in tasks: print "processing task %s" % task for case in nitrate.TestCase.search(script=task): if case.status.name == 'DISABLED': continue print "tagging case %s" % case case.tags.add('TIPx') case.tags.remove('TIPpass') case.tags.remove('TIPWaived5') case.tags.remove('TIPWaived6') case.tags.remove('TIPWaived7') case.tags.update()
Nice catch, thanks for the bug, Aleš! Should now be fixed in git: https://github.com/psss/python-nitrate/commit/5c356b81d581e736d7ba Adding an uncached tag to the container caused the Container._items() method to fetch the original container content from the server despite the container has been in modified state, thus overriding the update.
python-nitrate-1.0-0.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/python-nitrate-1.0-0.fc20
Package python-nitrate-1.0-0.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-nitrate-1.0-0.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-5095/python-nitrate-1.0-0.fc20 then log in and leave karma (feedback).
python-nitrate-1.0-0.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.