Bug 1314369 - Exception raised when resubmitting Git&Tito build
Summary: Exception raised when resubmitting Git&Tito build
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Copr
Classification: Community
Component: frontend
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-03 13:09 UTC by clime
Modified: 2016-03-29 12:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-29 12:19:19 UTC


Attachments (Terms of Use)

Description clime 2016-03-03 13:09:46 UTC
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/share/copr/coprs_frontend/coprs/rest_api/__init__.py", line 44, in error_router
    return original_handler(e)
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/share/copr/coprs_frontend/coprs/views/misc.py", line 274, in decorated_function
    return f(*args, **kwargs)
  File "/usr/share/copr/coprs_frontend/coprs/views/misc.py", line 323, in wrapper
    return f(copr, **kwargs)
  File "/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_builds.py", line 499, in copr_new_build_rebuild
    return process_rebuild(copr, build_id, view=view, url_on_success=url_on_success)
  File "/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_builds.py", line 528, in process_rebuild
    **build_options
  File "/usr/share/copr/coprs_frontend/coprs/logic/builds_logic.py", line 281, in create_new_from_other_build
    skip_import=skip_import)
  File "/usr/share/copr/coprs_frontend/coprs/logic/builds_logic.py", line 522, in add
    if " " in pkgs or "\n" in pkgs or "\t" in pkgs or pkgs.strip() != pkgs:
TypeError: argument of type 'NoneType' is not iterable


Happens when resubmitting a Git&Tito build. Probly affects also MockSCM and PyPI builds where pkgs is NULL.

Comment 1 clime 2016-03-03 14:20:23 UTC
Occurs on copr-fe-dev for builds that have NULL in pkgs field. Newly created builds have empty string as value if there are no input pkgs (as is the case for Git&Tito, Mock SCM, and PyPI builds). NULLs for the past builds must have got there by some db operations probly.

Anyway, I made commit b2112ab16e as a counter-measure. pkgs field, hopefully, will soon disappear.

Comment 2 Jakub Kadlčík 2016-03-15 08:51:06 UTC
Code with this fix is currently deployed on testing server.
You can test it before it will be deployed to production.
Please see: http://copr-fe-dev.cloud.fedoraproject.org

Comment 3 Jakub Kadlčík 2016-03-29 12:19:19 UTC
Copr production machines were upgraded to version containing a fix to this issue.
If you are not satisfied with provided solution, please feel free to reopen this.


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