include tag name in newRepo args
Fixes https://pagure.io/koji/issue/4208
This commit is contained in:
parent
fb2bbaf229
commit
74fe5301a2
2 changed files with 7 additions and 4 deletions
|
|
@ -88,7 +88,7 @@ def check_repo_queue():
|
||||||
return
|
return
|
||||||
|
|
||||||
clauses = [['repo_id', 'IS', None], ['active', 'IS', True]]
|
clauses = [['repo_id', 'IS', None], ['active', 'IS', True]]
|
||||||
fields = ('*', 'task_state')
|
fields = ('*', 'task_state', 'tag_name')
|
||||||
waiting = RepoQueueQuery(clauses, fields=fields, opts={'order': 'priority,id'}).execute()
|
waiting = RepoQueueQuery(clauses, fields=fields, opts={'order': 'priority,id'}).execute()
|
||||||
logger.debug('Got %i waiting repo requests', len(waiting))
|
logger.debug('Got %i waiting repo requests', len(waiting))
|
||||||
|
|
||||||
|
|
@ -369,7 +369,8 @@ def repo_queue_task(req):
|
||||||
kwargs['event'] = req['at_event']
|
kwargs['event'] = req['at_event']
|
||||||
# otherwise any new repo will satisfy any valid min_event
|
# otherwise any new repo will satisfy any valid min_event
|
||||||
|
|
||||||
args = koji.encode_args(req['tag_id'], **kwargs)
|
tagspec = {'id': req['tag_id'], 'name': req['tag_name']}
|
||||||
|
args = koji.encode_args(tagspec, **kwargs)
|
||||||
taskopts = {'priority': 15, 'channel': 'createrepo'}
|
taskopts = {'priority': 15, 'channel': 'createrepo'}
|
||||||
user_id = kojihub.get_id('users', context.opts['RepoQueueUser'], strict=False)
|
user_id = kojihub.get_id('users', context.opts['RepoQueueUser'], strict=False)
|
||||||
# TODO should we error if user doesn't exist
|
# TODO should we error if user doesn't exist
|
||||||
|
|
|
||||||
|
|
@ -581,7 +581,8 @@ class TestSymlink(BaseTest):
|
||||||
class TestQueueTask(BaseTest):
|
class TestQueueTask(BaseTest):
|
||||||
|
|
||||||
def test_queue_task(self):
|
def test_queue_task(self):
|
||||||
req = {'id': 100, 'tag_id': 42, 'min_event': None, 'at_event': None, 'opts': None}
|
req = {'id': 100, 'tag_id': 42, 'tag_name': 'tag 100',
|
||||||
|
'min_event': None, 'at_event': None, 'opts': None}
|
||||||
req['opts'] = {}
|
req['opts'] = {}
|
||||||
|
|
||||||
repos.repo_queue_task(req)
|
repos.repo_queue_task(req)
|
||||||
|
|
@ -589,7 +590,8 @@ class TestQueueTask(BaseTest):
|
||||||
self.make_task.assert_called_once()
|
self.make_task.assert_called_once()
|
||||||
|
|
||||||
def test_queue_task_event(self):
|
def test_queue_task_event(self):
|
||||||
req = {'id': 100, 'tag_id': 42, 'min_event': None, 'at_event': 101010, 'opts': None}
|
req = {'id': 100, 'tag_id': 42, 'tag_name': 'tag 100',
|
||||||
|
'min_event': None, 'at_event': 101010, 'opts': None}
|
||||||
req['opts'] = {}
|
req['opts'] = {}
|
||||||
|
|
||||||
repos.repo_queue_task(req)
|
repos.repo_queue_task(req)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue