Today, we ignore koji messages with a None `task_id` in two ways. First
with a conditional, and then with a second check in the message
`__init__` method. This is a belt-and-suspenders approach.
For other reasons in the UMB messaging plugin, we'd like to put this
check in just one place and use a special exception in the initializer
instead of in a conditional beforehand.
Fixes:
```
File "/usr/lib/python2.7/site-packages/module_build_service/pdc.py", line 193, in get_module
retval = session['unreleasedvariants/'](page_size=1, **query)
File "<string>", line 1, in <lambda>
File "/usr/lib/python2.7/site-packages/beanbag/namespace.py", line 136, in fn
*args, **kwargs)
File "/usr/lib/python2.7/site-packages/beanbag/url_v1.py", line 102, in call
return self.make_request(path, verb, kwargs, body)
File "/usr/lib/python2.7/site-packages/beanbag/url_v1.py", line 155, in make_request
"Bad response code: %d" % (r.status_code,))
beanbag.bbexcept.BeanBagException: Bad response code: 404
```
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
The message format broke in 3cb41aa5dc
The resulted in tracebacks in pdc-updater when it tried to learn things
about a module that was just submitted. It relied on certain fields
(`stream`) being in the message body. This change restores those fields
to get things working again.
We need to check for the error here *before* we make a second request
for the "last page". If we don't, we can end up submitting a query
asking for "page 0" which fails without a helpful message.
- Refactor MBS API code
- Unify module-/component_build API philosophy/design/approach
- Naming fixes
- _utc_datetime_to_iso moved from ModuleBuildAPI and is now a module-level function.
- Existing v1 API remains unchanged. ComponentBuildAPI now supports individual component build listing + verbose mode.
- documented in README
- various component_build API tests added
mbs-build adds --skiptests option, but mbs-manager thinks that skiptests
is positional argument.
Fixes: aac4227eb8
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Just replacing %check macro is ¤&%¤#%&¤%¤. I'm not going to
add any more words on it.
It breaks building many packages.
Fixes: 5391e7c9af
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>