running develop running egg_info writing requirements to module_build_service.egg-info/requires.txt writing module_build_service.egg-info/PKG-INFO writing top-level names to module_build_service.egg-info/top_level.txt writing dependency_links to module_build_service.egg-info/dependency_links.txt writing entry points to module_build_service.egg-info/entry_points.txt reading manifest file 'module_build_service.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files matching '*.pyo' found anywhere in distribution warning: no files found matching '*.service' under directory 'conf' warning: no files found matching '*.txt' under directory 'docs' warning: no files found matching '*.md' under directory 'docs' writing manifest file 'module_build_service.egg-info/SOURCES.txt' running build_ext Creating /usr/lib/python2.7/site-packages/module-build-service.egg-link (link to .) Adding module-build-service 2.3.2 to easy-install.pth file Installing mbs-upgradedb script to /usr/bin Installing mbs-frontend script to /usr/bin Installing mbs-manager script to /usr/bin Installed /src Processing dependencies for module-build-service==2.3.2 Searching for munch Reading https://pypi.org/simple/munch/ Downloading https://files.pythonhosted.org/packages/68/f4/260ec98ea840757a0da09e0ed8135333d59b8dfebe9752a365b04857660a/munch-2.3.2.tar.gz#sha256=6ae3d26b837feacf732fb8aa5b842130da1daf221f5af9f9d4b2a0a6414b0d51 Best match: munch 2.3.2 Processing munch-2.3.2.tar.gz Writing /tmp/easy_install-z6LgYp/munch-2.3.2/setup.cfg Running munch-2.3.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-z6LgYp/munch-2.3.2/egg-dist-tmp-Gi2jYp zip_safe flag not set; analyzing archive contents... Moving munch-2.3.2-py2.7.egg to /usr/lib/python2.7/site-packages Adding munch 2.3.2 to easy-install.pth file Installed /usr/lib/python2.7/site-packages/munch-2.3.2-py2.7.egg Searching for SQLAlchemy==1.2.9 Best match: SQLAlchemy 1.2.9 Adding SQLAlchemy 1.2.9 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for six==1.11.0 Best match: six 1.11.0 Adding six 1.11.0 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for requests==2.6.0 Best match: requests 2.6.0 Adding requests 2.6.0 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for pygobject==3.22.0 Best match: pygobject 3.22.0 Adding pygobject 3.22.0 to easy-install.pth file Using /usr/lib64/python2.7/site-packages Searching for pyOpenSSL==0.13.1 Best match: pyOpenSSL 0.13.1 Adding pyOpenSSL 0.13.1 to easy-install.pth file Using /usr/lib64/python2.7/site-packages Searching for moksha.hub==1.5.9 Best match: moksha.hub 1.5.9 Adding moksha.hub 1.5.9 to easy-install.pth file Installing moksha-hub script to /usr/bin Using /usr/lib/python2.7/site-packages Searching for ldap3==2.4 Best match: ldap3 2.4 Adding ldap3 2.4 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for kobo==0.6.0 Best match: kobo 0.6.0 Adding kobo 0.6.0 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for kerberos==1.1 Best match: kerberos 1.1 Adding kerberos 1.1 to easy-install.pth file Using /usr/lib64/python2.7/site-packages Searching for futures==3.0.5 Best match: futures 3.0.5 Adding futures 3.0.5 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for funcsigs==1.0.2 Best match: funcsigs 1.0.2 Adding funcsigs 1.0.2 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for fedmsg==1.1.1 Best match: fedmsg 1.1.1 Adding fedmsg 1.1.1 to easy-install.pth file Installing fedmsg-tail script to /usr/bin Installing fedmsg-dg-replay script to /usr/bin Installing fedmsg-announce script to /usr/bin Installing fedmsg-irc script to /usr/bin Installing fedmsg-gateway script to /usr/bin Installing fedmsg-trigger script to /usr/bin Installing fedmsg-collectd script to /usr/bin Installing fedmsg-signing-relay script to /usr/bin Installing fedmsg-relay script to /usr/bin Installing fedmsg-check script to /usr/bin Installing fedmsg-hub script to /usr/bin Installing fedmsg-logger script to /usr/bin Using /usr/lib/python2.7/site-packages Searching for dogpile.cache==0.5.7 Best match: dogpile.cache 0.5.7 Adding dogpile.cache 0.5.7 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for Flask-Script==2.0.5 Best match: Flask-Script 2.0.5 Adding Flask-Script 2.0.5 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for Flask-SQLAlchemy==2.3.2 Best match: Flask-SQLAlchemy 2.3.2 Adding Flask-SQLAlchemy 2.3.2 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for Flask-Migrate==2.0.0 Best match: Flask-Migrate 2.0.0 Adding Flask-Migrate 2.0.0 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for Flask==1.0.2 Best match: Flask 1.0.2 Adding Flask 1.0.2 to easy-install.pth file Installing flask script to /usr/bin Using /usr/lib/python2.7/site-packages Searching for enum34==1.1.6 Best match: enum34 1.1.6 Adding enum34 1.1.6 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for txWS==0.9 Best match: txWS 0.9 Adding txWS 0.9 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for txZMQ==0.7.3 Best match: txZMQ 0.7.3 Adding txZMQ 0.7.3 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for pyzmq==14.3.1 Best match: pyzmq 14.3.1 Adding pyzmq 14.3.1 to easy-install.pth file Using /usr/lib64/python2.7/site-packages Searching for moksha.common==1.2.3 Best match: moksha.common 1.2.3 Adding moksha.common 1.2.3 to easy-install.pth file Installing moksha script to /usr/bin Using /usr/lib/python2.7/site-packages Searching for pyasn1==0.1.9 Best match: pyasn1 0.1.9 Adding pyasn1 0.1.9 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for arrow==0.8.0 Best match: arrow 0.8.0 Adding arrow 0.8.0 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for kitchen==1.1.1 Best match: kitchen 1.1.1 Adding kitchen 1.1.1 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for dogpile.core==0.4.1 Best match: dogpile.core 0.4.1 Adding dogpile.core 0.4.1 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for alembic==0.8.3 Best match: alembic 0.8.3 Adding alembic 0.8.3 to easy-install.pth file Installing alembic script to /usr/bin Using /usr/lib/python2.7/site-packages Searching for Jinja2==2.10 Best match: Jinja2 2.10 Adding Jinja2 2.10 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for itsdangerous==0.24 Best match: itsdangerous 0.24 Adding itsdangerous 0.24 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for click==6.7 Best match: click 6.7 Adding click 6.7 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for Werkzeug==0.14.1 Best match: Werkzeug 0.14.1 Adding Werkzeug 0.14.1 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for pytz==2016.10 Best match: pytz 2016.10 Adding pytz 2016.10 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for decorator==3.4.0 Best match: decorator 3.4.0 Adding decorator 3.4.0 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for python-dateutil==1.5 Best match: python-dateutil 1.5 Adding python-dateutil 1.5 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for python-editor==0.4 Best match: python-editor 0.4 Adding python-editor 0.4 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for Mako==0.8.1 Best match: Mako 0.8.1 Adding Mako 0.8.1 to easy-install.pth file Using /usr/lib/python2.7/site-packages Searching for MarkupSafe==1.0 Best match: MarkupSafe 1.0 Adding MarkupSafe 1.0 to easy-install.pth file Using /usr/lib/python2.7/site-packages Finished processing dependencies for module-build-service==2.3.2 flake8 installed: alembic==0.8.3,arrow==0.8.0,atomicwrites==1.1.5,attrs==18.1.0,Babel==0.9.6,backports.ssl-match-hostname==3.5.0.1,Beaker==1.5.4,chardet==2.2.1,click==6.7,configparser==3.5.0,decorator==3.4.0,dogpile.cache==0.5.7,dogpile.core==0.4.1,enum34==1.1.6,fedmsg==1.1.1,flake8==3.5.0,Flask==1.0.2,Flask-Migrate==2.0.0,Flask-Script==2.0.5,Flask-SQLAlchemy==2.3.2,fpconst==0.7.3,funcsigs==1.0.2,futures==3.0.5,iniparse==0.4,ipaddress==1.0.16,itsdangerous==0.24,Jinja2==2.10,kerberos==1.1,kitchen==1.1.1,kobo==0.6.0,ldap3==2.4,lockfile==0.9.1,M2Crypto==0.21.1,m2ext==0.1,Mako==0.8.1,MarkupSafe==1.0,mccabe==0.6.1,mock==1.0.1,-e git+ssh://git@pagure.io/fm-orchestrator.git@dfe76605197cec8c82d09c10f1d19f5faecfc6bd#egg=module_build_service,moksha.common==1.2.3,moksha.hub==1.5.9,more-itertools==4.2.0,munch==2.3.2,Paste==1.7.5.1,pep8==1.4.6,Pillow==2.0.0,pluggy==0.6.0,psutil==2.2.1,py==1.5.4,pyasn1==0.1.9,pycodestyle==2.3.1,pycurl==7.19.0,pyflakes==1.6.0,Pygments==1.4,pygobject==3.22.0,pygpgme==0.3,pyliblzma==0.5.3,pyOpenSSL==0.13.1,pyserial==2.6,pytest==3.6.3,python-daemon==1.6,python-dateutil==1.5,python-editor==0.4,pytz==2016.10,pyxattr==0.5.1,pyzmq==14.3.1,requests==2.6.0,requests-kerberos==0.7.0,six==1.11.0,SOAPpy==0.11.6,SQLAlchemy==1.2.9,stomper==0.2.9,Tempita==0.5.1,tox==3.0.0,Twisted-Core==12.2.0,Twisted-Web==12.1.0,txWS==0.9,txZMQ==0.7.3,urlgrabber==3.10,urllib3==1.10.2,virtualenv==16.0.0,Werkzeug==0.14.1,yum-metadata-parser==1.1.4,zope.interface==4.0.5 flake8 runtests: PYTHONHASHSEED='2836050380' flake8 runtests: commands[0] | flake8 --ignore E731 --exclude ./.tox,./.git,./module_build_service/migrations,./build WARNING:test command found but not installed in testenv cmd: /usr/bin/flake8 env: /src/.tox/flake8 Maybe you forgot to specify a dependency? See also the whitelist_externals envconfig setting. py27 develop-inst-nodeps: /src py27 installed: alembic==0.8.3,arrow==0.8.0,atomicwrites==1.1.5,attrs==18.1.0,Babel==0.9.6,backports.ssl-match-hostname==3.5.0.1,Beaker==1.5.4,chardet==2.2.1,click==6.7,configparser==3.5.0,decorator==3.4.0,dogpile.cache==0.5.7,dogpile.core==0.4.1,enum34==1.1.6,fedmsg==1.1.1,flake8==3.5.0,Flask==1.0.2,Flask-Migrate==2.0.0,Flask-Script==2.0.5,Flask-SQLAlchemy==2.3.2,fpconst==0.7.3,funcsigs==1.0.2,futures==3.0.5,iniparse==0.4,ipaddress==1.0.16,itsdangerous==0.24,Jinja2==2.10,kerberos==1.1,kitchen==1.1.1,kobo==0.6.0,ldap3==2.4,lockfile==0.9.1,M2Crypto==0.21.1,m2ext==0.1,Mako==0.8.1,MarkupSafe==1.0,mccabe==0.6.1,mock==1.0.1,-e git+ssh://git@pagure.io/fm-orchestrator.git@dfe76605197cec8c82d09c10f1d19f5faecfc6bd#egg=module_build_service,moksha.common==1.2.3,moksha.hub==1.5.9,more-itertools==4.2.0,munch==2.3.2,Paste==1.7.5.1,pep8==1.4.6,Pillow==2.0.0,pluggy==0.6.0,psutil==2.2.1,py==1.5.4,pyasn1==0.1.9,pycodestyle==2.3.1,pycurl==7.19.0,pyflakes==1.6.0,Pygments==1.4,pygobject==3.22.0,pygpgme==0.3,pyliblzma==0.5.3,pyOpenSSL==0.13.1,pyserial==2.6,pytest==3.6.3,python-daemon==1.6,python-dateutil==1.5,python-editor==0.4,pytz==2016.10,pyxattr==0.5.1,pyzmq==14.3.1,requests==2.6.0,requests-kerberos==0.7.0,six==1.11.0,SOAPpy==0.11.6,SQLAlchemy==1.2.9,stomper==0.2.9,Tempita==0.5.1,tox==3.0.0,Twisted-Core==12.2.0,Twisted-Web==12.1.0,txWS==0.9,txZMQ==0.7.3,urlgrabber==3.10,urllib3==1.10.2,virtualenv==16.0.0,Werkzeug==0.14.1,yum-metadata-parser==1.1.4,zope.interface==4.0.5 py27 runtests: PYTHONHASHSEED='2836050380' py27 runtests: commands[0] | py.test -v WARNING:test command found but not installed in testenv cmd: /usr/bin/py.test env: /src/.tox/py27 Maybe you forgot to specify a dependency? See also the whitelist_externals envconfig setting. ============================= test session starts ============================== platform linux2 -- Python 2.7.5, pytest-3.6.3, py-1.5.4, pluggy-0.6.0 -- /usr/bin/python2 cachedir: .pytest_cache rootdir: /src, inifile: collecting 0 items collecting 0 items collecting 7 items collecting 7 items collecting 11 items collecting 11 items collecting 11 items collecting 12 items collecting 12 items collecting 12 items collecting 19 items collecting 19 items collecting 19 items collecting 21 items collecting 21 items collecting 21 items collecting 24 items collecting 24 items collecting 24 items collecting 40 items collecting 40 items collecting 40 items collecting 56 items collecting 56 items collecting 56 items collecting 74 items collecting 74 items collecting 75 items collecting 75 items collecting 75 items collecting 77 items collecting 77 items collecting 77 items collecting 78 items collecting 78 items collecting 78 items collecting 102 items collecting 102 items collecting 102 items collecting 104 items collecting 104 items collecting 104 items collecting 107 items collecting 107 items collecting 110 items collecting 110 items collecting 110 items collecting 116 items collecting 116 items collecting 116 items collecting 122 items collecting 122 items collecting 122 items collecting 124 items collecting 124 items collecting 124 items collecting 128 items collecting 128 items collecting 128 items collecting 133 items collecting 133 items collecting 133 items collecting 144 items collecting 144 items collecting 144 items collecting 149 items collecting 149 items collecting 149 items collecting 156 items collecting 156 items collecting 156 items collecting 169 items collecting 169 items collecting 187 items collecting 187 items collecting 194 items collecting 194 items collecting 201 items collecting 201 items collecting 201 items collecting 224 items collecting 224 items collecting 224 items collecting 299 items collecting 299 items collecting 299 items collected 299 items tests/test_auth.py::TestAuthModule::test_get_user_no_token PASSED [ 0%] tests/test_auth.py::TestAuthModule::test_get_user_failure PASSED [ 0%] tests/test_auth.py::TestAuthModule::test_get_user_good PASSED [ 1%] tests/test_auth.py::TestAuthModule::test_disable_authentication PASSED [ 1%] tests/test_auth.py::TestAuthModule::test_misconfiguring_oidc_client_secrets_should_be_failed PASSED [ 1%] tests/test_auth.py::TestAuthModule::test_get_required_scope_not_present PASSED [ 2%] tests/test_auth.py::TestAuthModule::test_get_required_scope_not_set_in_cfg PASSED [ 2%] tests/test_auth.py::TestAuthModuleKerberos::test_get_user_kerberos PASSED [ 2%] tests/test_auth.py::TestAuthModuleKerberos::test_auth_header_not_set PASSED [ 3%] tests/test_auth.py::TestAuthModuleKerberos::test_keytab_not_set PASSED [ 3%] tests/test_auth.py::TestAuthModuleKerberos::test_get_user_kerberos_invalid_ticket PASSED [ 3%] tests/test_config.py::TestConfig::test_path_expanduser PASSED [ 4%] tests/test_content_generator.py::TestBuild::test_get_generator_json <- /src/tests/test_content_generator.py PASSED [ 4%] tests/test_content_generator.py::TestBuild::test_get_generator_json_no_log <- /src/tests/test_content_generator.py PASSED [ 4%] tests/test_content_generator.py::TestBuild::test_prepare_file_directory <- /src/tests/test_content_generator.py PASSED [ 5%] tests/test_content_generator.py::TestBuild::test_tag_cg_build <- /src/tests/test_content_generator.py PASSED [ 5%] tests/test_content_generator.py::TestBuild::test_tag_cg_build_fallback_to_default_tag <- /src/tests/test_content_generator.py PASSED [ 5%] tests/test_content_generator.py::TestBuild::test_tag_cg_build_no_tag_set <- /src/tests/test_content_generator.py PASSED [ 6%] tests/test_content_generator.py::TestBuild::test_tag_cg_build_no_tag_available <- /src/tests/test_content_generator.py PASSED [ 6%] tests/test_logger.py::TestLogger::test_module_build_logs PASSED [ 6%] tests/test_logger.py::TestLogger::test_module_build_logs_name_format PASSED [ 7%] tests/test_messaging.py::TestFedmsgMessaging::test_buildsys_state_change PASSED [ 7%] tests/test_messaging.py::TestFedmsgMessaging::test_buildsys_tag PASSED [ 7%] tests/test_messaging.py::TestFedmsgMessaging::test_buildsys_repo_done PASSED [ 8%] tests/test_mmd_resolver.py::TestMMDResolver::test_deps2reqs[deps0-None] PASSED [ 8%] tests/test_mmd_resolver.py::TestMMDResolver::test_deps2reqs[deps1-module(x)] PASSED [ 8%] tests/test_mmd_resolver.py::TestMMDResolver::test_deps2reqs[deps2-(module(x) with module(x:1))] PASSED [ 9%] tests/test_mmd_resolver.py::TestMMDResolver::test_deps2reqs[deps3-(module(x) without module(x:1))] PASSED [ 9%] tests/test_mmd_resolver.py::TestMMDResolver::test_deps2reqs[deps4-(module(x) with (module(x:1) or module(x:2)))] PASSED [ 9%] tests/test_mmd_resolver.py::TestMMDResolver::test_deps2reqs[deps5-(module(x) with module(x:2))] PASSED [ 10%] tests/test_mmd_resolver.py::TestMMDResolver::test_deps2reqs[deps6-(module(x) and module(y))] PASSED [ 10%] tests/test_mmd_resolver.py::TestMMDResolver::test_deps2reqs[deps7-(module(x) or module(y))] PASSED [ 10%] tests/test_mmd_resolver.py::TestMMDResolver::test_solve[buildrequires0-expected0] PASSED [ 11%] tests/test_mmd_resolver.py::TestMMDResolver::test_solve[buildrequires1-expected1] PASSED [ 11%] tests/test_mmd_resolver.py::TestMMDResolver::test_solve[buildrequires2-expected2] PASSED [ 11%] tests/test_mmd_resolver.py::TestMMDResolver::test_solve[buildrequires3-expected3] PASSED [ 12%] tests/test_mmd_resolver.py::TestMMDResolver::test_solve[buildrequires4-expected4] PASSED [ 12%] tests/test_mmd_resolver.py::TestMMDResolver::test_solve[buildrequires5-expected5] PASSED [ 12%] tests/test_mmd_resolver.py::TestMMDResolver::test_solve[buildrequires6-expected6] PASSED [ 13%] tests/test_mmd_resolver.py::TestMMDResolver::test_solve[buildrequires7-expected7] PASSED [ 13%] tests/test_scm.py::TestSCMModule::test_simple_local_checkout PASSED [ 13%] tests/test_scm.py::TestSCMModule::test_local_get_latest_is_sane PASSED [ 14%] tests/test_scm.py::TestSCMModule::test_local_get_latest_unclean_input PASSED [ 14%] tests/test_scm.py::TestSCMModule::test_local_extract_name PASSED [ 14%] tests/test_scm.py::TestSCMModule::test_local_extract_name_trailing_slash PASSED [ 15%] tests/test_scm.py::TestSCMModule::test_verify PASSED [ 15%] tests/test_scm.py::TestSCMModule::test_verify_unknown_branch PASSED [ 15%] tests/test_scm.py::TestSCMModule::test_verify_commit_in_branch PASSED [ 16%] tests/test_scm.py::TestSCMModule::test_verify_commit_not_in_branch PASSED [ 16%] tests/test_scm.py::TestSCMModule::test_verify_unknown_hash PASSED [ 16%] tests/test_scm.py::TestSCMModule::test_get_module_yaml PASSED [ 17%] tests/test_scm.py::TestSCMModule::test_get_latest_incorrect_component_branch PASSED [ 17%] tests/test_scm.py::TestSCMModule::test_get_latest_component_branch PASSED [ 17%] tests/test_scm.py::TestSCMModule::test_get_latest_component_ref PASSED [ 18%] tests/test_scm.py::TestSCMModule::test_get_latest_incorrect_component_ref PASSED [ 18%] tests/test_scm.py::TestSCMModule::test_get_latest_ignore_origin PASSED [ 18%] tests/test_build/test_build.py::TestBuild::test_submit_build[1] <- /src/tests/test_build/test_build.py FAILED [ 19%] tests/test_build/test_build.py::TestBuild::test_submit_build[2] <- /src/tests/test_build/test_build.py FAILED [ 19%] tests/test_build/test_build.py::TestBuild::test_submit_build_no_components <- /src/tests/test_build/test_build.py PASSED [ 19%] tests/test_build/test_build.py::TestBuild::test_submit_build_from_yaml_not_allowed <- /src/tests/test_build/test_build.py PASSED [ 20%] tests/test_build/test_build.py::TestBuild::test_submit_build_from_yaml_allowed <- /src/tests/test_build/test_build.py PASSED [ 20%] tests/test_build/test_build.py::TestBuild::test_submit_build_cancel <- /src/tests/test_build/test_build.py PASSED [ 20%] tests/test_build/test_build.py::TestBuild::test_submit_build_instant_complete <- /src/tests/test_build/test_build.py PASSED [ 21%] tests/test_build/test_build.py::TestBuild::test_submit_build_concurrent_threshold <- /src/tests/test_build/test_build.py PASSED [ 21%] tests/test_build/test_build.py::TestBuild::test_try_to_reach_concurrent_threshold <- /src/tests/test_build/test_build.py FAILED [ 21%] tests/test_build/test_build.py::TestBuild::test_build_in_batch_fails <- /src/tests/test_build/test_build.py PASSED [ 22%] tests/test_build/test_build.py::TestBuild::test_all_builds_in_batch_fail <- /src/tests/test_build/test_build.py PASSED [ 22%] tests/test_build/test_build.py::TestBuild::test_submit_build_reuse_all <- /src/tests/test_build/test_build.py PASSED [ 22%] tests/test_build/test_build.py::TestBuild::test_submit_build_reuse_all_without_build_macros <- /src/tests/test_build/test_build.py PASSED [ 23%] tests/test_build/test_build.py::TestBuild::test_submit_build_resume <- /src/tests/test_build/test_build.py PASSED [ 23%] tests/test_build/test_build.py::TestBuild::test_submit_build_resume_recover_orphaned_macros <- /src/tests/test_build/test_build.py PASSED [ 23%] tests/test_build/test_build.py::TestBuild::test_submit_build_resume_failed_init <- /src/tests/test_build/test_build.py PASSED [ 24%] tests/test_build/test_build.py::TestBuild::test_submit_build_resume_init_fail <- /src/tests/test_build/test_build.py FAILED [ 24%] tests/test_build/test_build.py::TestBuild::test_submit_build_repo_regen_not_started_batch <- /src/tests/test_build/test_build.py FAILED [ 24%] tests/test_build/test_build.py::TestLocalBuild::test_submit_build_local_dependency <- /src/tests/test_build/test_build.py PASSED [ 25%] tests/test_builder/test_base.py::TestGenericBuilder::test_default_buildroot_groups_cache <- /src/tests/test_builder/test_base.py PASSED [ 25%] tests/test_builder/test_base.py::TestGenericBuilder::test_get_build_weights <- /src/tests/test_builder/test_base.py PASSED [ 25%] tests/test_builder/test_builder_utils.py::TestBuilderUtils::test_create_local_repo_from_koji_tag <- /src/tests/test_builder/test_builder_utils.py PASSED [ 26%] tests/test_builder/test_koji.py::TestKojiBuilder::test_tag_to_repo PASSED [ 26%] tests/test_builder/test_koji.py::TestKojiBuilder::test_recover_orphaned_artifact_when_tagged PASSED [ 26%] tests/test_builder/test_koji.py::TestKojiBuilder::test_recover_orphaned_artifact_when_untagged PASSED [ 27%] tests/test_builder/test_koji.py::TestKojiBuilder::test_recover_orphaned_artifact_when_nothing_exists PASSED [ 27%] tests/test_builder/test_koji.py::TestKojiBuilder::test_buildroot_ready PASSED [ 27%] tests/test_builder/test_koji.py::TestKojiBuilder::test_tagging_already_tagged_artifacts[False] PASSED [ 28%] tests/test_builder/test_koji.py::TestKojiBuilder::test_tagging_already_tagged_artifacts[True] PASSED [ 28%] tests/test_builder/test_koji.py::TestKojiBuilder::test_untagged_artifacts PASSED [ 28%] tests/test_builder/test_koji.py::TestKojiBuilder::test_get_build_weights PASSED [ 29%] tests/test_builder/test_koji.py::TestKojiBuilder::test_get_build_weights_no_task_id PASSED [ 29%] tests/test_builder/test_koji.py::TestKojiBuilder::test_get_build_weights_no_build PASSED [ 29%] tests/test_builder/test_koji.py::TestKojiBuilder::test_get_build_weights_listBuilds_failed PASSED [ 30%] tests/test_builder/test_koji.py::TestKojiBuilder::test_get_build_weights_getPackageID_failed PASSED [ 30%] tests/test_builder/test_koji.py::TestKojiBuilder::test_get_build_weights_getLoggedInUser_failed PASSED [ 30%] tests/test_builder/test_koji.py::TestKojiBuilder::test_buildroot_connect[False-False-False] PASSED [ 31%] tests/test_builder/test_koji.py::TestKojiBuilder::test_buildroot_connect[False-False-True] PASSED [ 31%] tests/test_builder/test_koji.py::TestKojiBuilder::test_buildroot_connect[False-True-False] PASSED [ 31%] tests/test_builder/test_koji.py::TestKojiBuilder::test_buildroot_connect[False-True-True] PASSED [ 32%] tests/test_builder/test_koji.py::TestKojiBuilder::test_buildroot_connect[True-False-False] PASSED [ 32%] tests/test_builder/test_koji.py::TestKojiBuilder::test_buildroot_connect[True-False-True] PASSED [ 32%] tests/test_builder/test_koji.py::TestKojiBuilder::test_buildroot_connect[True-True-False] PASSED [ 33%] tests/test_builder/test_koji.py::TestKojiBuilder::test_buildroot_connect[True-True-True] PASSED [ 33%] tests/test_builder/test_koji.py::TestKojiBuilder::test_buildroot_connect_create_tag[False] PASSED [ 33%] tests/test_builder/test_koji.py::TestKojiBuilder::test_buildroot_connect_create_tag[True] PASSED [ 34%] tests/test_builder/test_mock.py::TestMockModuleBuilder::test_createrepo_filter_last_batch <- /src/tests/test_builder/test_mock.py PASSED [ 34%] tests/test_builder/test_mock.py::TestMockModuleBuilder::test_createrepo_not_last_batch <- /src/tests/test_builder/test_mock.py PASSED [ 34%] tests/test_models/test_models.py::TestModels::test_app_sqlalchemy_events PASSED [ 35%] tests/test_models/test_models.py::TestModels::test_context_functions PASSED [ 35%] tests/test_models/test_models.py::TestModels::test_siblings_property PASSED [ 35%] tests/test_models/test_models.py::TestModelsGetStreamsContexts::test_get_last_build_in_all_streams PASSED [ 36%] tests/test_models/test_models.py::TestModelsGetStreamsContexts::test_get_last_build_in_all_stream_last_version PASSED [ 36%] tests/test_models/test_models.py::TestModelsGetStreamsContexts::test_get_last_builds_in_stream PASSED [ 36%] tests/test_resolver/test_db.py::TestDBModule::test_get_module_build_dependencies[False] PASSED [ 37%] tests/test_resolver/test_db.py::TestDBModule::test_get_module_build_dependencies[True] PASSED [ 37%] tests/test_resolver/test_db.py::TestDBModule::test_get_module_build_dependencies_recursive PASSED [ 37%] tests/test_resolver/test_db.py::TestDBModule::test_get_module_build_dependencies_recursive_requires PASSED [ 38%] tests/test_resolver/test_db.py::TestDBModule::test_resolve_profiles PASSED [ 38%] tests/test_resolver/test_db.py::TestDBModule::test_resolve_profiles_local_module PASSED [ 38%] tests/test_resolver/test_mbs.py::TestMBSModule::test_get_module_modulemds_nsvc <- /src/tests/test_resolver/test_mbs.py FAILED [ 39%] tests/test_resolver/test_mbs.py::TestMBSModule::test_get_module_modulemds_partial <- /src/tests/test_resolver/test_mbs.py FAILED [ 39%] tests/test_resolver/test_mbs.py::TestMBSModule::test_get_module_build_dependencies <- /src/tests/test_resolver/test_mbs.py FAILED [ 39%] tests/test_resolver/test_mbs.py::TestMBSModule::test_get_module_build_dependencies_empty_buildrequires <- /src/tests/test_resolver/test_mbs.py FAILED [ 40%] tests/test_resolver/test_mbs.py::TestMBSModule::test_resolve_profiles <- /src/tests/test_resolver/test_mbs.py FAILED [ 40%] tests/test_resolver/test_mbs.py::TestMBSModule::test_resolve_profiles_local_module <- /src/tests/test_resolver/test_mbs.py PASSED [ 40%] tests/test_scheduler/test_consumer.py::TestConsumer::test_get_abstracted_msg_fedmsg PASSED [ 41%] tests/test_scheduler/test_consumer.py::TestConsumer::test_consume_fedmsg PASSED [ 41%] tests/test_scheduler/test_module_init.py::TestModuleInit::test_init_basic <- /src/tests/test_scheduler/test_module_init.py FAILED [ 41%] tests/test_scheduler/test_module_init.py::TestModuleInit::test_init_scm_not_available <- /src/tests/test_scheduler/test_module_init.py PASSED [ 42%] tests/test_scheduler/test_module_init.py::TestModuleInit::test_init_includedmodule <- /src/tests/test_scheduler/test_module_init.py FAILED [ 42%] tests/test_scheduler/test_module_init.py::TestModuleInit::test_init_when_get_latest_raises <- /src/tests/test_scheduler/test_module_init.py PASSED [ 42%] tests/test_scheduler/test_module_wait.py::TestModuleWait::test_init_basic <- /src/tests/test_scheduler/test_module_wait.py PASSED [ 43%] tests/test_scheduler/test_module_wait.py::TestModuleWait::test_new_repo_called_when_macros_reused <- /src/tests/test_scheduler/test_module_wait.py PASSED [ 43%] tests/test_scheduler/test_module_wait.py::TestModuleWait::test_new_repo_not_called_when_macros_not_reused <- /src/tests/test_scheduler/test_module_wait.py PASSED [ 43%] tests/test_scheduler/test_module_wait.py::TestModuleWait::test_set_cg_build_koji_tag_fallback_to_default <- /src/tests/test_scheduler/test_module_wait.py PASSED [ 44%] tests/test_scheduler/test_module_wait.py::TestModuleWait::test_set_cg_build_koji_tag <- /src/tests/test_scheduler/test_module_wait.py PASSED [ 44%] tests/test_scheduler/test_poller.py::TestPoller::test_process_paused_module_builds[True] <- /src/tests/test_scheduler/test_poller.py PASSED [ 44%] tests/test_scheduler/test_poller.py::TestPoller::test_process_paused_module_builds[False] <- /src/tests/test_scheduler/test_poller.py PASSED [ 45%] tests/test_scheduler/test_poller.py::TestPoller::test_trigger_new_repo_when_failed <- /src/tests/test_scheduler/test_poller.py PASSED [ 45%] tests/test_scheduler/test_poller.py::TestPoller::test_trigger_new_repo_when_succeded <- /src/tests/test_scheduler/test_poller.py PASSED [ 45%] tests/test_scheduler/test_poller.py::TestPoller::test_process_paused_module_builds_waiting_for_repo <- /src/tests/test_scheduler/test_poller.py PASSED [ 46%] tests/test_scheduler/test_poller.py::TestPoller::test_delete_old_koji_targets <- /src/tests/test_scheduler/test_poller.py PASSED [ 46%] tests/test_scheduler/test_poller.py::TestPoller::test_process_waiting_module_build <- /src/tests/test_scheduler/test_poller.py PASSED [ 46%] tests/test_scheduler/test_poller.py::TestPoller::test_process_waiting_module_build_not_old_enough <- /src/tests/test_scheduler/test_poller.py PASSED [ 47%] tests/test_scheduler/test_poller.py::TestPoller::test_process_waiting_module_build_none_found <- /src/tests/test_scheduler/test_poller.py PASSED [ 47%] tests/test_scheduler/test_poller.py::TestPoller::test_cleanup_stale_failed_builds <- /src/tests/test_scheduler/test_poller.py PASSED [ 47%] tests/test_scheduler/test_poller.py::TestPoller::test_cleanup_stale_failed_builds_no_components <- /src/tests/test_scheduler/test_poller.py PASSED [ 48%] tests/test_scheduler/test_repo_done.py::TestRepoDone::test_no_match <- /src/tests/test_scheduler/test_repo_done.py PASSED [ 48%] tests/test_scheduler/test_repo_done.py::TestRepoDone::test_a_single_match <- /src/tests/test_scheduler/test_repo_done.py PASSED [ 48%] tests/test_scheduler/test_repo_done.py::TestRepoDone::test_a_single_match_build_fail <- /src/tests/test_scheduler/test_repo_done.py PASSED [ 49%] tests/test_scheduler/test_repo_done.py::TestRepoDone::test_erroneous_regen_repo_received <- /src/tests/test_scheduler/test_repo_done.py PASSED [ 49%] tests/test_scheduler/test_repo_done.py::TestRepoDone::test_failed_component_build <- /src/tests/test_scheduler/test_repo_done.py PASSED [ 49%] tests/test_scheduler/test_tag_tagged.py::TestTagTagged::test_no_matching_module <- /src/tests/test_scheduler/test_tag_tagged.py PASSED [ 50%] tests/test_scheduler/test_tag_tagged.py::TestTagTagged::test_no_matching_artifact <- /src/tests/test_scheduler/test_tag_tagged.py PASSED [ 50%] tests/test_scheduler/test_tag_tagged.py::TestTagTagged::test_newrepo <- /src/tests/test_scheduler/test_tag_tagged.py PASSED [ 50%] tests/test_scheduler/test_tag_tagged.py::TestTagTagged::test_newrepo_still_building_components <- /src/tests/test_scheduler/test_tag_tagged.py PASSED [ 51%] tests/test_scheduler/test_tag_tagged.py::TestTagTagged::test_newrepo_failed_components <- /src/tests/test_scheduler/test_tag_tagged.py PASSED [ 51%] tests/test_scheduler/test_tag_tagged.py::TestTagTagged::test_newrepo_multiple_batches_tagged <- /src/tests/test_scheduler/test_tag_tagged.py PASSED [ 51%] tests/test_scheduler/test_tag_tagged.py::TestTagTagged::test_newrepo_build_time_only <- /src/tests/test_scheduler/test_tag_tagged.py PASSED [ 52%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_get_reusable_component_different_component[perl-List-Compare] PASSED [ 52%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_get_reusable_component_different_component[perl-Tangerine] PASSED [ 52%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_get_reusable_component_different_component[tangerine] PASSED [ 53%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_get_reusable_component_different_component[None] PASSED [ 53%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_get_reusable_component_different_rpm_macros PASSED [ 53%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_get_reusable_component_different_buildrequires_hash[only-changed] PASSED [ 54%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_get_reusable_component_different_buildrequires_hash[all] PASSED [ 54%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_get_reusable_component_different_buildrequires_hash[changed-and-after] PASSED [ 54%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_get_reusable_component_different_buildrequires_stream[only-changed] PASSED [ 55%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_get_reusable_component_different_buildrequires_stream[all] PASSED [ 55%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_get_reusable_component_different_buildrequires_stream[changed-and-after] PASSED [ 55%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_get_reusable_component_different_buildrequires PASSED [ 56%] tests/test_utils/test_utils.py::TestUtilsComponentReuse::test_submit_module_build_from_yaml_with_skiptests PASSED [ 56%] tests/test_utils/test_utils.py::TestUtils::test_get_rpm_release_mse PASSED [ 56%] tests/test_utils/test_utils.py::TestUtils::test_format_mmd[git://pkgs.stg.fedoraproject.org/modules/testmodule.git?#620ec77321b2ea7b0d67d82992dda3e1d67055b4] FAILED [ 57%] tests/test_utils/test_utils.py::TestUtils::test_format_mmd[None] FAILED [ 57%] tests/test_utils/test_utils.py::TestUtils::test_get_reusable_component_shared_userspace_ordering PASSED [ 57%] tests/test_utils/test_utils.py::TestUtils::test_validate_koji_tag_wrong_tag_arg_during_programming PASSED [ 58%] tests/test_utils/test_utils.py::TestUtils::test_validate_koji_tag_bad_tag_value PASSED [ 58%] tests/test_utils/test_utils.py::TestUtils::test_validate_koji_tag_bad_tag_value_in_list PASSED [ 58%] tests/test_utils/test_utils.py::TestUtils::test_validate_koji_tag_good_tag_value PASSED [ 59%] tests/test_utils/test_utils.py::TestUtils::test_validate_koji_tag_good_tag_values_in_list PASSED [ 59%] tests/test_utils/test_utils.py::TestUtils::test_validate_koji_tag_good_tag_value_in_dict PASSED [ 59%] tests/test_utils/test_utils.py::TestUtils::test_validate_koji_tag_good_tag_value_in_dict_nondefault_key PASSED [ 60%] tests/test_utils/test_utils.py::TestUtils::test_validate_koji_tag_double_trouble_good PASSED [ 60%] tests/test_utils/test_utils.py::TestUtils::test_validate_koji_tag_double_trouble_bad PASSED [ 60%] tests/test_utils/test_utils.py::TestUtils::test_validate_koji_tag_is_None PASSED [ 61%] tests/test_utils/test_utils.py::TestUtils::test_record_component_builds_duplicate_components PASSED [ 61%] tests/test_utils/test_utils.py::TestUtils::test_record_component_builds_set_weight FAILED [ 61%] tests/test_utils/test_utils.py::TestUtils::test_generate_koji_tag_in_nsvc_format PASSED [ 62%] tests/test_utils/test_utils.py::TestUtils::test_generate_koji_tag_in_hash_format PASSED [ 62%] tests/test_utils/test_utils.py::TestBatches::test_start_next_batch_build_reuse PASSED [ 62%] tests/test_utils/test_utils.py::TestBatches::test_start_next_batch_build_reuse_some PASSED [ 63%] tests/test_utils/test_utils.py::TestBatches::test_start_next_batch_build_rebuild_strategy_all PASSED [ 63%] tests/test_utils/test_utils.py::TestBatches::test_start_next_batch_build_rebuild_strategy_only_changed PASSED [ 63%] tests/test_utils/test_utils.py::TestBatches::test_start_next_batch_build_smart_scheduling PASSED [ 64%] tests/test_utils/test_utils.py::TestBatches::test_start_next_batch_continue PASSED [ 64%] tests/test_utils/test_utils.py::TestBatches::test_start_next_batch_build_repo_building PASSED [ 64%] tests/test_utils/test_utils.py::TestLocalBuilds::test_load_local_builds_name PASSED [ 65%] tests/test_utils/test_utils.py::TestLocalBuilds::test_load_local_builds_name_stream PASSED [ 65%] tests/test_utils/test_utils.py::TestLocalBuilds::test_load_local_builds_name_stream_non_existing PASSED [ 65%] tests/test_utils/test_utils.py::TestLocalBuilds::test_load_local_builds_name_stream_version PASSED [ 66%] tests/test_utils/test_utils.py::TestLocalBuilds::test_load_local_builds_name_stream_version_non_existing PASSED [ 66%] tests/test_utils/test_utils.py::TestLocalBuilds::test_load_local_builds_platform PASSED [ 66%] tests/test_utils/test_utils.py::TestLocalBuilds::test_load_local_builds_platform_f28 PASSED [ 67%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_context PASSED [ 67%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_buildrequires[requires0-build_requires0-True-expected_xmd0-expected_buildrequires0] PASSED [ 67%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_buildrequires[requires1-build_requires1-False-expected_xmd1-expected_buildrequires1] PASSED [ 68%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_buildrequires[requires2-build_requires2-False-expected_xmd2-expected_buildrequires2] PASSED [ 68%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_buildrequires[requires3-build_requires3-True-expected_xmd3-expected_buildrequires3] FAILED [ 68%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_buildrequires[requires4-build_requires4-False-expected_xmd4-expected_buildrequires4] FAILED [ 69%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_buildrequires[requires5-build_requires5-False-expected_xmd5-expected_buildrequires5] PASSED [ 69%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_buildrequires[requires6-build_requires6-True-expected_xmd6-expected_buildrequires6] PASSED [ 69%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_buildrequires[requires7-build_requires7-False-expected_xmd7-expected_buildrequires7] PASSED [ 70%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_requires[requires0-build_requires0-expected0] PASSED [ 70%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_requires[requires1-build_requires1-expected1] PASSED [ 70%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_requires[requires2-build_requires2-expected2] PASSED [ 71%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_requires[requires3-build_requires3-expected3] FAILED [ 71%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_requires[requires4-build_requires4-expected4] FAILED [ 71%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_generate_expanded_mmds_requires[requires5-build_requires5-expected5] PASSED [ 72%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_get_required_modules_simple[requires0-build_requires0-expected0] PASSED [ 72%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_get_required_modules_simple[requires1-build_requires1-expected1] PASSED [ 72%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_get_required_modules_simple[requires2-build_requires2-expected2] PASSED [ 73%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_get_required_modules_simple[requires3-build_requires3-expected3] PASSED [ 73%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_get_required_modules_simple[requires4-build_requires4-expected4] FAILED [ 73%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_get_required_modules_simple[requires5-build_requires5-expected5] FAILED [ 74%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_get_required_modules_recursion[requires0-build_requires0-expected0] PASSED [ 74%] tests/test_utils/test_utils_mse.py::TestUtilsModuleStreamExpansion::test_get_required_modules_recursion[requires1-build_requires1-expected1] PASSED [ 74%] tests/test_views/test_views.py::TestViews::test_query_build PASSED [ 75%] tests/test_views/test_views.py::TestViews::test_query_builds_invalid_api_version[0] PASSED [ 75%] tests/test_views/test_views.py::TestViews::test_query_builds_invalid_api_version[99] PASSED [ 75%] tests/test_views/test_views.py::TestViews::test_query_build_short PASSED [ 76%] tests/test_views/test_views.py::TestViews::test_query_build_with_verbose_mode PASSED [ 76%] tests/test_views/test_views.py::TestViews::test_pagination_metadata PASSED [ 76%] tests/test_views/test_views.py::TestViews::test_pagination_metadata_with_args PASSED [ 77%] tests/test_views/test_views.py::TestViews::test_query_builds PASSED [ 77%] tests/test_views/test_views.py::TestViews::test_query_builds_with_context PASSED [ 77%] tests/test_views/test_views.py::TestViews::test_query_builds_with_id_error PASSED [ 78%] tests/test_views/test_views.py::TestViews::test_query_builds_with_nsvc PASSED [ 78%] tests/test_views/test_views.py::TestViews::test_query_builds_with_binary_rpm PASSED [ 78%] tests/test_views/test_views.py::TestViews::test_query_builds_with_binary_rpm_not_koji PASSED [ 79%] tests/test_views/test_views.py::TestViews::test_query_component_build PASSED [ 79%] tests/test_views/test_views.py::TestViews::test_query_component_build_short PASSED [ 79%] tests/test_views/test_views.py::TestViews::test_query_component_build_verbose PASSED [ 80%] tests/test_views/test_views.py::TestViews::test_query_component_builds_filter_format PASSED [ 80%] tests/test_views/test_views.py::TestViews::test_query_component_builds_filter_ref PASSED [ 80%] tests/test_views/test_views.py::TestViews::test_query_component_builds_filter_tagged PASSED [ 81%] tests/test_views/test_views.py::TestViews::test_query_component_builds_filter_nvr PASSED [ 81%] tests/test_views/test_views.py::TestViews::test_query_component_builds_filter_task_id PASSED [ 81%] tests/test_views/test_views.py::TestViews::test_query_component_builds_filter_state PASSED [ 82%] tests/test_views/test_views.py::TestViews::test_query_component_builds_filter_multiple_states PASSED [ 82%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_name PASSED [ 82%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_koji_tag PASSED [ 83%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_completed_before PASSED [ 83%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_completed_after PASSED [ 83%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_submitted_before PASSED [ 84%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_submitted_after PASSED [ 84%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_modified_before PASSED [ 84%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_modified_after PASSED [ 85%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_owner PASSED [ 85%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_state PASSED [ 85%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_multiple_states PASSED [ 86%] tests/test_views/test_views.py::TestViews::test_query_builds_two_filters PASSED [ 86%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_nsv PASSED [ 86%] tests/test_views/test_views.py::TestViews::test_query_builds_filter_invalid_date PASSED [ 87%] tests/test_views/test_views.py::TestViews::test_query_builds_order_by PASSED [ 87%] tests/test_views/test_views.py::TestViews::test_query_builds_order_desc_by PASSED [ 87%] tests/test_views/test_views.py::TestViews::test_query_builds_order_desc_by_context PASSED [ 88%] tests/test_views/test_views.py::TestViews::test_query_builds_order_by_order_desc_by PASSED [ 88%] tests/test_views/test_views.py::TestViews::test_query_builds_order_by_wrong_key PASSED [ 88%] tests/test_views/test_views.py::TestViews::test_submit_build[1] PASSED [ 89%] tests/test_views/test_views.py::TestViews::test_submit_build[2] PASSED [ 89%] tests/test_views/test_views.py::TestViews::test_submit_build_rebuild_strategy PASSED [ 89%] tests/test_views/test_views.py::TestViews::test_submit_build_rebuild_strategy_not_allowed PASSED [ 90%] tests/test_views/test_views.py::TestViews::test_submit_build_dep_not_present PASSED [ 90%] tests/test_views/test_views.py::TestViews::test_submit_build_rebuild_strategy_override_not_allowed PASSED [ 90%] tests/test_views/test_views.py::TestViews::test_submit_componentless_build PASSED [ 91%] tests/test_views/test_views.py::TestViews::test_submit_build_auth_error PASSED [ 91%] tests/test_views/test_views.py::TestViews::test_submit_build_scm_url_error PASSED [ 91%] tests/test_views/test_views.py::TestViews::test_submit_build_scm_url_without_hash PASSED [ 92%] tests/test_views/test_views.py::TestViews::test_submit_build_bad_modulemd PASSED [ 92%] tests/test_views/test_views.py::TestViews::test_submit_build_includedmodule_custom_repo_not_allowed PASSED [ 92%] tests/test_views/test_views.py::TestViews::test_cancel_build PASSED [ 93%] tests/test_views/test_views.py::TestViews::test_cancel_build_already_failed PASSED [ 93%] tests/test_views/test_views.py::TestViews::test_cancel_build_unauthorized_no_groups PASSED [ 93%] tests/test_views/test_views.py::TestViews::test_cancel_build_unauthorized_not_owner PASSED [ 94%] tests/test_views/test_views.py::TestViews::test_cancel_build_admin PASSED [ 94%] tests/test_views/test_views.py::TestViews::test_cancel_build_no_admin PASSED [ 94%] tests/test_views/test_views.py::TestViews::test_cancel_build_wrong_param PASSED [ 95%] tests/test_views/test_views.py::TestViews::test_cancel_build_wrong_state PASSED [ 95%] tests/test_views/test_views.py::TestViews::test_submit_build_unsupported_scm_scheme PASSED [ 95%] tests/test_views/test_views.py::TestViews::test_submit_build_version_set_error PASSED [ 96%] tests/test_views/test_views.py::TestViews::test_submit_build_wrong_stream PASSED [ 96%] tests/test_views/test_views.py::TestViews::test_submit_build_set_owner PASSED [ 96%] tests/test_views/test_views.py::TestViews::test_submit_build_no_auth_set_owner PASSED [ 97%] tests/test_views/test_views.py::TestViews::test_patch_set_different_owner PASSED [ 97%] tests/test_views/test_views.py::TestViews::test_submit_build_commit_hash_not_found PASSED [ 97%] tests/test_views/test_views.py::TestViews::test_submit_custom_scmurl PASSED [ 98%] tests/test_views/test_views.py::TestViews::test_about PASSED [ 98%] tests/test_views/test_views.py::TestViews::test_rebuild_strategy_api PASSED [ 98%] tests/test_views/test_views.py::TestViews::test_rebuild_strategy_api_only_changed_default PASSED [ 99%] tests/test_views/test_views.py::TestViews::test_rebuild_strategy_api_override_allowed PASSED [ 99%] tests/test_views/test_views.py::TestViews::test_cors_header_decorator PASSED [100%] =================================== FAILURES =================================== ________________________ TestBuild.test_submit_build[1] ________________________ self = mocked_scm = mocked_get_user = conf_system = dbg = , mmd_version = 1 @pytest.mark.parametrize('mmd_version', [1, 2]) @patch('module_build_service.auth.get_user', return_value=user) @patch('module_build_service.scm.SCM') def test_submit_build(self, mocked_scm, mocked_get_user, conf_system, dbg, mmd_version): """ Tests the build of testmodule.yaml using FakeModuleBuilder which succeeds everytime. """ if mmd_version == 1: yaml_file = 'testmodule.yaml' else: yaml_file = 'testmodule_v2.yaml' FakeSCM(mocked_scm, 'testmodule', yaml_file, '620ec77321b2ea7b0d67d82992dda3e1d67055b4') rv = self.client.post('/module-build-service/1/module-builds/', data=json.dumps( {'branch': 'master', 'scmurl': 'git://pkgs.stg.fedoraproject.org/modules/' 'testmodule.git?#620ec77321b2ea7b0d67d82992dda3e1d67055b4'})) data = json.loads(rv.data) module_build_id = data['id'] # Check that components are tagged after the batch is built. tag_groups = [] tag_groups.append(set(['perl-Tangerine-1-1', 'perl-List-Compare-1-1'])) tag_groups.append(set(['tangerine-1-1'])) def on_tag_artifacts_cb(cls, artifacts, dest_tag=True): assert tag_groups.pop(0) == set(artifacts) FakeModuleBuilder.on_tag_artifacts_cb = on_tag_artifacts_cb # Check that the components are added to buildroot after the batch # is built. buildroot_groups = [] buildroot_groups.append(set(['module-build-macros-1-1'])) buildroot_groups.append(set(['perl-Tangerine-1-1', 'perl-List-Compare-1-1'])) buildroot_groups.append(set(['tangerine-1-1'])) def on_buildroot_add_artifacts_cb(cls, artifacts, install): assert buildroot_groups.pop(0) == set(artifacts) FakeModuleBuilder.on_buildroot_add_artifacts_cb = on_buildroot_add_artifacts_cb msgs = [] stop = module_build_service.scheduler.make_simple_stop_condition(db.session) module_build_service.scheduler.main(msgs, stop) # All components should be built and module itself should be in "done" # or "ready" state. for build in models.ComponentBuild.query.filter_by(module_id=module_build_id).all(): assert build.state == koji.BUILD_STATES['COMPLETE'] assert build.module_build.state in [models.BUILD_STATES["done"], models.BUILD_STATES["ready"]] # All components has to be tagged, so tag_groups and buildroot_groups are empty... > assert tag_groups == [] E AssertionError: assert [set(['perl-L...gerine-1-1'])] == [] E Left contains more items, first extra item: set(['perl-List-Compare-1-1', 'perl-Tangerine-1-1']) E Full diff: E - [set(['perl-List-Compare-1-1', 'perl-Tangerine-1-1']), set(['tangerine-1-1'])] E + [] tests/test_build/test_build.py:381: AssertionError ---------------------------- Captured stderr setup ----------------------------- 2018-07-05 12:17:45,915 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ------------------------------ Captured log setup ------------------------------ general.py 301 INFO Module platform:f28:3:00000000 imported ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:17:45,926 - MainThread - module_build_service - INFO - Starting resolving with following input modules: ['platform:f28:3:00000000'] 2018-07-05 12:17:45,927 - MainThread - module_build_service - INFO - Resolving done, possible requires: set([frozenset(['platform:f28:3:00000000:x86_64', 'testmodule:master:20180205135154:0:src'])]) 2018-07-05 12:17:45,942 - MainThread - module_build_service - WARNING - Hub not initialized. Queueing on the side. 2018-07-05 12:17:45,944 - MainThread - module_build_service - INFO - Homer J. Simpson submitted build of testmodule, stream=master, version=20180205135154, context=9c690d0e 2018-07-05 12:17:45,960 - MainThread - moksha.hub - INFO - Loading the Moksha Hub 2018-07-05 12:17:45,960 - MainThread - moksha.hub - WARNING - No 'zmq_publish_endpoints' set. Are you sure? 2018-07-05 12:17:45,962 - MainThread - moksha.hub - INFO - Loading Consumers 2018-07-05 12:17:45,962 - MainThread - fedmsg.consumers - INFO - enabled by config - module_build_service.scheduler.consumer:MBSConsumer 2018-07-05 12:17:45,962 - MainThread - moksha.hub - INFO - Blocking mode false for . Messages to be queued and distributed to 1 threads. 2018-07-05 12:17:45,963 - MainThread - fedmsg.consumers - INFO - No backlog handling. status: None, url: None 2018-07-05 12:17:45,963 - MainThread - moksha.hub - INFO - Loading Producers 2018-07-05 12:17:45,963 - MainThread - moksha.hub - INFO - Running the MokshaHub reactor 2018-07-05 12:17:45,963 - MainThread - moksha.hub - INFO - Suggesting threadpool size at 2 2018-07-05 12:17:45,966 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Calling init: MBSModule, 1 2018-07-05 12:17:45,976 - PoolThread-twisted.internet.reactor-1 - module_build_service - ERROR - unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' 2018-07-05 12:17:45,979 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - , state 0->4 2018-07-05 12:17:45,984 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Scheduling shutdown. 2018-07-05 12:17:45,986 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Calling failed: MBSModule, 2 2018-07-05 12:17:45,992 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Scheduling shutdown. 2018-07-05 12:17:45,993 - MainThread - moksha.hub - INFO - MokshaHub reactor stopped ------------------------------ Captured log call ------------------------------- mse.py 269 INFO Starting resolving with following input modules: ['platform:f28:3:00000000'] mse.py 274 INFO Resolving done, possible requires: set([frozenset(['platform:f28:3:00000000:x86_64', 'testmodule:master:20180205135154:0:src'])]) messaging.py 295 WARNING Hub not initialized. Queueing on the side. submit.py 387 INFO Homer J. Simpson submitted build of testmodule, stream=master, version=20180205135154, context=9c690d0e hub.py 263 INFO Loading the Moksha Hub zeromq.py 133 WARNING No 'zmq_publish_endpoints' set. Are you sure? hub.py 391 INFO Loading Consumers __init__.py 109 INFO enabled by config - module_build_service.scheduler.consumer:MBSConsumer consumer.py 92 INFO Blocking mode false for . Messages to be queued and distributed to 1 threads. __init__.py 159 INFO No backlog handling. status: None, url: None hub.py 432 INFO Loading Producers __init__.py 97 INFO Running the MokshaHub reactor __init__.py 106 INFO Suggesting threadpool size at 2 consumer.py 237 INFO Calling init: MBSModule, 1 modules.py 162 ERROR unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' models.py 460 INFO , state 0->4 consumer.py 132 INFO Scheduling shutdown. consumer.py 237 INFO Calling failed: MBSModule, 2 consumer.py 132 INFO Scheduling shutdown. __init__.py 110 INFO MokshaHub reactor stopped ________________________ TestBuild.test_submit_build[2] ________________________ self = mocked_scm = mocked_get_user = conf_system = dbg = , mmd_version = 2 @pytest.mark.parametrize('mmd_version', [1, 2]) @patch('module_build_service.auth.get_user', return_value=user) @patch('module_build_service.scm.SCM') def test_submit_build(self, mocked_scm, mocked_get_user, conf_system, dbg, mmd_version): """ Tests the build of testmodule.yaml using FakeModuleBuilder which succeeds everytime. """ if mmd_version == 1: yaml_file = 'testmodule.yaml' else: yaml_file = 'testmodule_v2.yaml' FakeSCM(mocked_scm, 'testmodule', yaml_file, '620ec77321b2ea7b0d67d82992dda3e1d67055b4') rv = self.client.post('/module-build-service/1/module-builds/', data=json.dumps( {'branch': 'master', 'scmurl': 'git://pkgs.stg.fedoraproject.org/modules/' 'testmodule.git?#620ec77321b2ea7b0d67d82992dda3e1d67055b4'})) data = json.loads(rv.data) module_build_id = data['id'] # Check that components are tagged after the batch is built. tag_groups = [] tag_groups.append(set(['perl-Tangerine-1-1', 'perl-List-Compare-1-1'])) tag_groups.append(set(['tangerine-1-1'])) def on_tag_artifacts_cb(cls, artifacts, dest_tag=True): assert tag_groups.pop(0) == set(artifacts) FakeModuleBuilder.on_tag_artifacts_cb = on_tag_artifacts_cb # Check that the components are added to buildroot after the batch # is built. buildroot_groups = [] buildroot_groups.append(set(['module-build-macros-1-1'])) buildroot_groups.append(set(['perl-Tangerine-1-1', 'perl-List-Compare-1-1'])) buildroot_groups.append(set(['tangerine-1-1'])) def on_buildroot_add_artifacts_cb(cls, artifacts, install): assert buildroot_groups.pop(0) == set(artifacts) FakeModuleBuilder.on_buildroot_add_artifacts_cb = on_buildroot_add_artifacts_cb msgs = [] stop = module_build_service.scheduler.make_simple_stop_condition(db.session) module_build_service.scheduler.main(msgs, stop) # All components should be built and module itself should be in "done" # or "ready" state. for build in models.ComponentBuild.query.filter_by(module_id=module_build_id).all(): assert build.state == koji.BUILD_STATES['COMPLETE'] assert build.module_build.state in [models.BUILD_STATES["done"], models.BUILD_STATES["ready"]] # All components has to be tagged, so tag_groups and buildroot_groups are empty... > assert tag_groups == [] E AssertionError: assert [set(['perl-L...gerine-1-1'])] == [] E Left contains more items, first extra item: set(['perl-List-Compare-1-1', 'perl-Tangerine-1-1']) E Full diff: E - [set(['perl-List-Compare-1-1', 'perl-Tangerine-1-1']), set(['tangerine-1-1'])] E + [] tests/test_build/test_build.py:381: AssertionError ---------------------------- Captured stderr setup ----------------------------- 2018-07-05 12:17:46,072 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ------------------------------ Captured log setup ------------------------------ general.py 301 INFO Module platform:f28:3:00000000 imported ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:17:46,079 - MainThread - module_build_service - INFO - Starting resolving with following input modules: ['platform:f28:3:00000000'] 2018-07-05 12:17:46,079 - MainThread - module_build_service - INFO - Resolving done, possible requires: set([frozenset(['platform:f28:3:00000000:x86_64', 'testmodule:master:20180205135154:0:src'])]) 2018-07-05 12:17:46,090 - MainThread - module_build_service - WARNING - Hub not initialized. Queueing on the side. 2018-07-05 12:17:46,092 - MainThread - module_build_service - INFO - Homer J. Simpson submitted build of testmodule, stream=master, version=20180205135154, context=9c690d0e 2018-07-05 12:17:46,098 - MainThread - moksha.hub - INFO - Loading the Moksha Hub 2018-07-05 12:17:46,099 - MainThread - moksha.hub - WARNING - No 'zmq_publish_endpoints' set. Are you sure? 2018-07-05 12:17:46,099 - MainThread - moksha.hub - INFO - Loading Consumers 2018-07-05 12:17:46,099 - MainThread - fedmsg.consumers - INFO - enabled by config - module_build_service.scheduler.consumer:MBSConsumer 2018-07-05 12:17:46,099 - MainThread - moksha.hub - INFO - Blocking mode false for . Messages to be queued and distributed to 1 threads. 2018-07-05 12:17:46,100 - MainThread - fedmsg.consumers - INFO - No backlog handling. status: None, url: None 2018-07-05 12:17:46,100 - MainThread - moksha.hub - INFO - Loading Producers 2018-07-05 12:17:46,100 - MainThread - moksha.hub - INFO - Running the MokshaHub reactor 2018-07-05 12:17:46,100 - MainThread - moksha.hub - INFO - Suggesting threadpool size at 2 2018-07-05 12:17:46,102 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Calling init: MBSModule, 3 2018-07-05 12:17:46,111 - PoolThread-twisted.internet.reactor-1 - module_build_service - ERROR - unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' 2018-07-05 12:17:46,114 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - , state 0->4 2018-07-05 12:17:46,118 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Scheduling shutdown. 2018-07-05 12:17:46,120 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Calling failed: MBSModule, 4 2018-07-05 12:17:46,126 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Scheduling shutdown. 2018-07-05 12:17:46,126 - MainThread - moksha.hub - INFO - MokshaHub reactor stopped ------------------------------ Captured log call ------------------------------- mse.py 269 INFO Starting resolving with following input modules: ['platform:f28:3:00000000'] mse.py 274 INFO Resolving done, possible requires: set([frozenset(['platform:f28:3:00000000:x86_64', 'testmodule:master:20180205135154:0:src'])]) messaging.py 295 WARNING Hub not initialized. Queueing on the side. submit.py 387 INFO Homer J. Simpson submitted build of testmodule, stream=master, version=20180205135154, context=9c690d0e hub.py 263 INFO Loading the Moksha Hub zeromq.py 133 WARNING No 'zmq_publish_endpoints' set. Are you sure? hub.py 391 INFO Loading Consumers __init__.py 109 INFO enabled by config - module_build_service.scheduler.consumer:MBSConsumer consumer.py 92 INFO Blocking mode false for . Messages to be queued and distributed to 1 threads. __init__.py 159 INFO No backlog handling. status: None, url: None hub.py 432 INFO Loading Producers __init__.py 97 INFO Running the MokshaHub reactor __init__.py 106 INFO Suggesting threadpool size at 2 consumer.py 237 INFO Calling init: MBSModule, 3 modules.py 162 ERROR unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' models.py 460 INFO , state 0->4 consumer.py 132 INFO Scheduling shutdown. consumer.py 237 INFO Calling failed: MBSModule, 4 consumer.py 132 INFO Scheduling shutdown. __init__.py 110 INFO MokshaHub reactor stopped _______________ TestBuild.test_try_to_reach_concurrent_threshold _______________ self = conf_num_concurrent_builds = mocked_scm = mocked_get_user = conf_system = dbg = @patch('module_build_service.auth.get_user', return_value=user) @patch('module_build_service.scm.SCM') @patch("module_build_service.config.Config.num_concurrent_builds", new_callable=PropertyMock, return_value=2) def test_try_to_reach_concurrent_threshold(self, conf_num_concurrent_builds, mocked_scm, mocked_get_user, conf_system, dbg): """ Tests that we try to submit new component build right after the previous one finished without waiting for all the num_concurrent_builds to finish. """ FakeSCM(mocked_scm, 'testmodule-more-components', 'testmodule-more-components.yaml', '620ec77321b2ea7b0d67d82992dda3e1d67055b4') self.client.post('/module-build-service/1/module-builds/', data=json.dumps( {'branch': 'master', 'scmurl': 'git://pkgs.stg.fedoraproject.org/modules/' 'testmodule.git?#620ec77321b2ea7b0d67d82992dda3e1d67055b4'})) # Holds the number of concurrent component builds during # the module build. TestBuild._global_var = [] def stop(message): """ Stop the scheduler when the module is built or when we try to build more components than the num_concurrent_builds. """ main_stop = module_build_service.scheduler.make_simple_stop_condition(db.session) num_building = db.session.query(models.ComponentBuild).filter_by( state=koji.BUILD_STATES['BUILDING']).count() over_threshold = conf.num_concurrent_builds < num_building TestBuild._global_var.append(num_building) return main_stop(message) or over_threshold msgs = [] module_build_service.scheduler.main(msgs, stop) # _global_var looks similar to this: [0, 1, 0, 0, 2, 2, 1, 0, 0, 0] # It shows the number of concurrent builds in the time. At first we # want to remove adjacent duplicate entries, because we only care # about changes. # We are building two batches, so there should be just two situations # when we should be building just single component: # 1) module-base-macros in first batch. # 2) The last component of second batch. # If we are building single component more often, num_concurrent_builds # does not work correctly. num_builds = [k for k, g in itertools.groupby(TestBuild._global_var)] > assert num_builds.count(1) == 2 E assert 0 == 2 E + where 0 = (1) E + where = [0].count tests/test_build/test_build.py:627: AssertionError ---------------------------- Captured stderr setup ----------------------------- 2018-07-05 12:17:46,659 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ------------------------------ Captured log setup ------------------------------ general.py 301 INFO Module platform:f28:3:00000000 imported ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:17:46,662 - MainThread - module_build_service - DEBUG - Verifying modulemd 2018-07-05 12:17:46,668 - MainThread - module_build_service - INFO - Starting resolving with following input modules: ['platform:f28:3:00000000'] 2018-07-05 12:17:46,668 - MainThread - module_build_service - DEBUG - Testing testmodule-more-components:master:20180205135154:0-20180205135154.src with combination: (,) 2018-07-05 12:17:46,669 - MainThread - module_build_service - DEBUG - Jobs: 2018-07-05 12:17:46,669 - MainThread - module_build_service - DEBUG - - favor platform:f28:3:00000000-3.x86_64 2018-07-05 12:17:46,669 - MainThread - module_build_service - DEBUG - - install testmodule-more-components:master:20180205135154:0-20180205135154.src 2018-07-05 12:17:46,669 - MainThread - module_build_service - DEBUG - Transaction: 2018-07-05 12:17:46,669 - MainThread - module_build_service - DEBUG - - testmodule-more-components:master:20180205135154:0-20180205135154.src 2018-07-05 12:17:46,669 - MainThread - module_build_service - DEBUG - - platform:f28:3:00000000-3.x86_64 2018-07-05 12:17:46,669 - MainThread - module_build_service - INFO - Resolving done, possible requires: set([frozenset(['platform:f28:3:00000000:x86_64', 'testmodule-more-components:master:20180205135154:0:src'])]) 2018-07-05 12:17:46,677 - MainThread - module_build_service - DEBUG - Checking whether module build already exists: testmodule-more-components:master:20180205135154:9c690d0e. 2018-07-05 12:17:46,679 - MainThread - module_build_service - DEBUG - Creating new module build 2018-07-05 12:17:46,686 - MainThread - module_build_service - WARNING - Hub not initialized. Queueing on the side. 2018-07-05 12:17:46,689 - MainThread - module_build_service - INFO - Homer J. Simpson submitted build of testmodule-more-components, stream=master, version=20180205135154, context=9c690d0e 2018-07-05 12:17:46,697 - MainThread - moksha.hub - INFO - Loading the Moksha Hub 2018-07-05 12:17:46,697 - MainThread - moksha.hub - WARNING - No 'zmq_publish_endpoints' set. Are you sure? 2018-07-05 12:17:46,698 - MainThread - moksha.hub - INFO - Loading Consumers 2018-07-05 12:17:46,698 - MainThread - moksha.hub - DEBUG - Loading explicitly passed entry-points. 2018-07-05 12:17:46,698 - MainThread - module_build_service - DEBUG - Setting topics: * 2018-07-05 12:17:46,698 - MainThread - fedmsg.consumers - DEBUG - mbsconsumer is True 2018-07-05 12:17:46,698 - MainThread - fedmsg.consumers - INFO - enabled by config - module_build_service.scheduler.consumer:MBSConsumer 2018-07-05 12:17:46,698 - MainThread - moksha.hub - DEBUG - Subscribing to consumer topic * 2018-07-05 12:17:46,698 - MainThread - moksha.hub - DEBUG - Subscribing to on 'ZmqEndpoint(type='connect', address='ipc:///dev/null')' 2018-07-05 12:17:46,698 - MainThread - moksha.hub - DEBUG - Creating new txzmq factory. 2018-07-05 12:17:46,699 - MainThread - moksha.hub - INFO - Blocking mode false for . Messages to be queued and distributed to 1 threads. 2018-07-05 12:17:46,699 - MainThread - fedmsg.consumers - INFO - No backlog handling. status: None, url: None 2018-07-05 12:17:46,699 - MainThread - moksha.hub - INFO - Loading Producers 2018-07-05 12:17:46,699 - MainThread - moksha.hub - DEBUG - Loading explicitly passed entry-points. 2018-07-05 12:17:46,699 - MainThread - moksha.hub - INFO - Running the MokshaHub reactor 2018-07-05 12:17:46,699 - MainThread - moksha.hub - INFO - Suggesting threadpool size at 2 2018-07-05 12:17:46,699 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139847767099136 | Worker thread picking a message. 2018-07-05 12:17:46,700 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Received MBSModule('18', 2, 0) 2018-07-05 12:17:46,700 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Received a message with an ID of "18" and of type "MBSModule" 2018-07-05 12:17:46,703 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Calling init: MBSModule, 18 2018-07-05 12:17:46,713 - PoolThread-twisted.internet.reactor-1 - module_build_service - ERROR - unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' 2018-07-05 12:17:46,716 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - , state 0->4 2018-07-05 12:17:46,720 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Done with init: MBSModule, 18 2018-07-05 12:17:46,727 - PoolThread-twisted.internet.reactor-1 - module_build_service.scheduler - DEBUG - stop_condition checking , got True 2018-07-05 12:17:46,727 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Scheduling shutdown. 2018-07-05 12:17:46,727 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139847767099136 | Going back to waiting on the incoming queue. Message handled: True 2018-07-05 12:17:46,728 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139847767099136 | Worker thread picking a message. 2018-07-05 12:17:46,728 - MainThread - moksha.hub - DEBUG - Stopping the CentralMokshaHub 2018-07-05 12:17:46,728 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Received MBSModule('19', 2, 4) 2018-07-05 12:17:46,728 - MainThread - moksha.hub - DEBUG - Stopping consumer 2018-07-05 12:17:46,729 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Received a message with an ID of "19" and of type "MBSModule" 2018-07-05 12:17:46,729 - MainThread - moksha.hub - DEBUG - Stopping the CentralMokshaHub 2018-07-05 12:17:46,731 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Calling failed: MBSModule, 19 2018-07-05 12:17:46,737 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Done with failed: MBSModule, 19 2018-07-05 12:17:46,744 - PoolThread-twisted.internet.reactor-1 - module_build_service.scheduler - DEBUG - stop_condition checking , got True 2018-07-05 12:17:46,744 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Scheduling shutdown. 2018-07-05 12:17:46,744 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139847767099136 | Going back to waiting on the incoming queue. Message handled: True 2018-07-05 12:17:46,744 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139847767099136 | Worker thread exiting. 2018-07-05 12:17:46,744 - MainThread - moksha.hub - INFO - MokshaHub reactor stopped ------------------------------ Captured log call ------------------------------- submit.py 399 DEBUG Verifying modulemd mse.py 269 INFO Starting resolving with following input modules: ['platform:f28:3:00000000'] mmd_resolver.py 179 DEBUG Testing testmodule-more-components:master:20180205135154:0-20180205135154.src with combination: (,) mmd_resolver.py 188 DEBUG Jobs: mmd_resolver.py 190 DEBUG - favor platform:f28:3:00000000-3.x86_64 mmd_resolver.py 190 DEBUG - install testmodule-more-components:master:20180205135154:0-20180205135154.src mmd_resolver.py 196 DEBUG Transaction: mmd_resolver.py 198 DEBUG - testmodule-more-components:master:20180205135154:0-20180205135154.src mmd_resolver.py 198 DEBUG - platform:f28:3:00000000-3.x86_64 mse.py 274 INFO Resolving done, possible requires: set([frozenset(['platform:f28:3:00000000:x86_64', 'testmodule-more-components:master:20180205135154:0:src'])]) submit.py 335 DEBUG Checking whether module build already exists: testmodule-more-components:master:20180205135154:9c690d0e. submit.py 368 DEBUG Creating new module build messaging.py 295 WARNING Hub not initialized. Queueing on the side. submit.py 387 INFO Homer J. Simpson submitted build of testmodule-more-components, stream=master, version=20180205135154, context=9c690d0e hub.py 263 INFO Loading the Moksha Hub zeromq.py 133 WARNING No 'zmq_publish_endpoints' set. Are you sure? hub.py 391 INFO Loading Consumers hub.py 405 DEBUG Loading explicitly passed entry-points. consumer.py 75 DEBUG Setting topics: * __init__.py 102 DEBUG mbsconsumer is True __init__.py 109 INFO enabled by config - module_build_service.scheduler.consumer:MBSConsumer consumer.py 71 DEBUG Subscribing to consumer topic * zeromq.py 170 DEBUG Subscribing to on 'ZmqEndpoint(type='connect', address='ipc:///dev/null')' zeromq.py 175 DEBUG Creating new txzmq factory. consumer.py 92 INFO Blocking mode false for . Messages to be queued and distributed to 1 threads. __init__.py 159 INFO No backlog handling. status: None, url: None hub.py 432 INFO Loading Producers hub.py 449 DEBUG Loading explicitly passed entry-points. __init__.py 97 INFO Running the MokshaHub reactor __init__.py 106 INFO Suggesting threadpool size at 2 consumer.py 129 DEBUG 'MBSConsumer' thread 139847767099136 | Worker thread picking a message. consumer.py 148 DEBUG Received MBSModule('18', 2, 0) consumer.py 202 DEBUG Received a message with an ID of "18" and of type "MBSModule" consumer.py 237 INFO Calling init: MBSModule, 18 modules.py 162 ERROR unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' models.py 460 INFO , state 0->4 consumer.py 251 DEBUG Done with init: MBSModule, 18 __init__.py 69 DEBUG stop_condition checking , got True consumer.py 132 INFO Scheduling shutdown. consumer.py 129 DEBUG 'MBSConsumer' thread 139847767099136 | Going back to waiting on the incoming queue. Message handled: True consumer.py 129 DEBUG 'MBSConsumer' thread 139847767099136 | Worker thread picking a message. hub.py 474 DEBUG Stopping the CentralMokshaHub consumer.py 148 DEBUG Received MBSModule('19', 2, 4) hub.py 487 DEBUG Stopping consumer consumer.py 202 DEBUG Received a message with an ID of "19" and of type "MBSModule" hub.py 474 DEBUG Stopping the CentralMokshaHub consumer.py 237 INFO Calling failed: MBSModule, 19 consumer.py 251 DEBUG Done with failed: MBSModule, 19 __init__.py 69 DEBUG stop_condition checking , got True consumer.py 132 INFO Scheduling shutdown. consumer.py 129 DEBUG 'MBSConsumer' thread 139847767099136 | Going back to waiting on the incoming queue. Message handled: True consumer.py 129 DEBUG 'MBSConsumer' thread 139847767099136 | Worker thread exiting. __init__.py 110 INFO MokshaHub reactor stopped _________________ TestBuild.test_submit_build_resume_init_fail _________________ self = mocked_scm = mocked_get_user = conf_system = dbg = @patch('module_build_service.auth.get_user', return_value=user) @patch('module_build_service.scm.SCM') def test_submit_build_resume_init_fail(self, mocked_scm, mocked_get_user, conf_system, dbg): """ Tests that resuming the build fails when the build is in init state """ FakeSCM(mocked_scm, 'testmodule', 'testmodule.yaml', '620ec77321b2ea7b0d67d82992dda3e1d67055b4') # Post so a module is in the init phase rv = self.client.post('/module-build-service/1/module-builds/', data=json.dumps( {'branch': 'master', 'scmurl': 'git://pkgs.stg.fedoraproject.org/modules/' 'testmodule.git?#620ec77321b2ea7b0d67d82992dda3e1d67055b4'})) assert rv.status_code == 201 # Run the backend stop = module_build_service.scheduler.make_simple_stop_condition(db.session) module_build_service.scheduler.main([], stop) # Post again and make sure it fails rv2 = self.client.post('/module-build-service/1/module-builds/', data=json.dumps( {'branch': 'master', 'scmurl': 'git://pkgs.stg.fedoraproject.org/modules/' 'testmodule.git?#620ec77321b2ea7b0d67d82992dda3e1d67055b4'})) data = json.loads(rv2.data) expected = { 'error': 'Conflict', 'message': ('Module (state=5) already exists. Only a new build or resubmission of a ' 'failed build is allowed.'), 'status': 409 } > assert data == expected E AssertionError: assert {'build_conte... 'id': 2, ...} == {'error': 'Con...'status': 409} E Left contains more items: E {u'build_context': u'f4bfd8304625d3f2835a5176ee910f50e86cc201', E u'component_builds': [], E u'context': u'9c690d0e', E u'id': 2, E u'koji_tag': None, E u'modulemd': u'---\ndocument: modulemd\nversion: 2\ndata:\n name: testmodule\n stream: master\n version: 20180205135154\n context: 9c690d0e\n summary: A test module in all its beautiful beauty\n description: >-\n This module demonstrates how to write simple modulemd files And can be used for\n testing the build and release pipeline.\n license:\n module:\n - MIT\n xmd:\n mbs:\n ... E E ...Full output truncated (73 lines hidden), use '-vv' to show tests/test_build/test_build.py:1158: AssertionError ---------------------------- Captured stderr setup ----------------------------- 2018-07-05 12:17:49,209 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ------------------------------ Captured log setup ------------------------------ general.py 301 INFO Module platform:f28:3:00000000 imported ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:17:49,211 - MainThread - module_build_service - DEBUG - Verifying modulemd 2018-07-05 12:17:49,220 - MainThread - module_build_service - INFO - Starting resolving with following input modules: ['platform:f28:3:00000000'] 2018-07-05 12:17:49,220 - MainThread - module_build_service - DEBUG - Testing testmodule:master:20180205135154:0-20180205135154.src with combination: (,) 2018-07-05 12:17:49,220 - MainThread - module_build_service - DEBUG - Jobs: 2018-07-05 12:17:49,221 - MainThread - module_build_service - DEBUG - - favor platform:f28:3:00000000-3.x86_64 2018-07-05 12:17:49,221 - MainThread - module_build_service - DEBUG - - install testmodule:master:20180205135154:0-20180205135154.src 2018-07-05 12:17:49,221 - MainThread - module_build_service - DEBUG - Transaction: 2018-07-05 12:17:49,221 - MainThread - module_build_service - DEBUG - - testmodule:master:20180205135154:0-20180205135154.src 2018-07-05 12:17:49,221 - MainThread - module_build_service - DEBUG - - platform:f28:3:00000000-3.x86_64 2018-07-05 12:17:49,221 - MainThread - module_build_service - INFO - Resolving done, possible requires: set([frozenset(['platform:f28:3:00000000:x86_64', 'testmodule:master:20180205135154:0:src'])]) 2018-07-05 12:17:49,229 - MainThread - module_build_service - DEBUG - Checking whether module build already exists: testmodule:master:20180205135154:9c690d0e. 2018-07-05 12:17:49,231 - MainThread - module_build_service - DEBUG - Creating new module build 2018-07-05 12:17:49,237 - MainThread - module_build_service - WARNING - Hub not initialized. Queueing on the side. 2018-07-05 12:17:49,240 - MainThread - module_build_service - INFO - Homer J. Simpson submitted build of testmodule, stream=master, version=20180205135154, context=9c690d0e 2018-07-05 12:17:49,249 - MainThread - moksha.hub - INFO - Loading the Moksha Hub 2018-07-05 12:17:49,249 - MainThread - moksha.hub - WARNING - No 'zmq_publish_endpoints' set. Are you sure? 2018-07-05 12:17:49,250 - MainThread - moksha.hub - INFO - Loading Consumers 2018-07-05 12:17:49,250 - MainThread - moksha.hub - DEBUG - Loading explicitly passed entry-points. 2018-07-05 12:17:49,250 - MainThread - module_build_service - DEBUG - Setting topics: * 2018-07-05 12:17:49,250 - MainThread - fedmsg.consumers - DEBUG - mbsconsumer is True 2018-07-05 12:17:49,250 - MainThread - fedmsg.consumers - INFO - enabled by config - module_build_service.scheduler.consumer:MBSConsumer 2018-07-05 12:17:49,250 - MainThread - moksha.hub - DEBUG - Subscribing to consumer topic * 2018-07-05 12:17:49,251 - MainThread - moksha.hub - DEBUG - Subscribing to on 'ZmqEndpoint(type='connect', address='ipc:///dev/null')' 2018-07-05 12:17:49,251 - MainThread - moksha.hub - DEBUG - Creating new txzmq factory. 2018-07-05 12:17:49,251 - MainThread - moksha.hub - INFO - Blocking mode false for . Messages to be queued and distributed to 1 threads. 2018-07-05 12:17:49,251 - MainThread - fedmsg.consumers - INFO - No backlog handling. status: None, url: None 2018-07-05 12:17:49,252 - MainThread - moksha.hub - INFO - Loading Producers 2018-07-05 12:17:49,252 - MainThread - moksha.hub - DEBUG - Loading explicitly passed entry-points. 2018-07-05 12:17:49,252 - MainThread - moksha.hub - INFO - Running the MokshaHub reactor 2018-07-05 12:17:49,252 - MainThread - moksha.hub - INFO - Suggesting threadpool size at 2 2018-07-05 12:17:49,252 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139846843901696 | Worker thread picking a message. 2018-07-05 12:17:49,253 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Received MBSModule('40', 2, 0) 2018-07-05 12:17:49,253 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Received a message with an ID of "40" and of type "MBSModule" 2018-07-05 12:17:49,255 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Calling init: MBSModule, 40 2018-07-05 12:17:49,267 - PoolThread-twisted.internet.reactor-1 - module_build_service - ERROR - unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' 2018-07-05 12:17:49,271 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - , state 0->4 2018-07-05 12:17:49,274 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Done with init: MBSModule, 40 2018-07-05 12:17:49,276 - PoolThread-twisted.internet.reactor-1 - module_build_service.scheduler - DEBUG - stop_condition checking , got True 2018-07-05 12:17:49,276 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Scheduling shutdown. 2018-07-05 12:17:49,276 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139846843901696 | Going back to waiting on the incoming queue. Message handled: True 2018-07-05 12:17:49,277 - MainThread - moksha.hub - DEBUG - Stopping the CentralMokshaHub 2018-07-05 12:17:49,277 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139846843901696 | Worker thread picking a message. 2018-07-05 12:17:49,277 - MainThread - moksha.hub - DEBUG - Stopping consumer 2018-07-05 12:17:49,277 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Received MBSModule('41', 2, 4) 2018-07-05 12:17:49,277 - MainThread - moksha.hub - DEBUG - Stopping the CentralMokshaHub 2018-07-05 12:17:49,278 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Received a message with an ID of "41" and of type "MBSModule" 2018-07-05 12:17:49,279 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Calling failed: MBSModule, 41 2018-07-05 12:17:49,286 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Done with failed: MBSModule, 41 2018-07-05 12:17:49,287 - PoolThread-twisted.internet.reactor-1 - module_build_service.scheduler - DEBUG - stop_condition checking , got True 2018-07-05 12:17:49,288 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Scheduling shutdown. 2018-07-05 12:17:49,288 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139846843901696 | Going back to waiting on the incoming queue. Message handled: True 2018-07-05 12:17:49,288 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139846843901696 | Worker thread exiting. 2018-07-05 12:17:49,288 - MainThread - moksha.hub - INFO - MokshaHub reactor stopped 2018-07-05 12:17:49,289 - MainThread - module_build_service - DEBUG - Verifying modulemd 2018-07-05 12:17:49,297 - MainThread - module_build_service - INFO - Starting resolving with following input modules: ['platform:f28:3:00000000'] 2018-07-05 12:17:49,298 - MainThread - module_build_service - DEBUG - Testing testmodule:master:20180205135154:0-20180205135154.src with combination: (,) 2018-07-05 12:17:49,298 - MainThread - module_build_service - DEBUG - Jobs: 2018-07-05 12:17:49,298 - MainThread - module_build_service - DEBUG - - favor platform:f28:3:00000000-3.x86_64 2018-07-05 12:17:49,298 - MainThread - module_build_service - DEBUG - - install testmodule:master:20180205135154:0-20180205135154.src 2018-07-05 12:17:49,298 - MainThread - module_build_service - DEBUG - Transaction: 2018-07-05 12:17:49,298 - MainThread - module_build_service - DEBUG - - testmodule:master:20180205135154:0-20180205135154.src 2018-07-05 12:17:49,298 - MainThread - module_build_service - DEBUG - - platform:f28:3:00000000-3.x86_64 2018-07-05 12:17:49,298 - MainThread - module_build_service - INFO - Resolving done, possible requires: set([frozenset(['platform:f28:3:00000000:x86_64', 'testmodule:master:20180205135154:0:src'])]) 2018-07-05 12:17:49,305 - MainThread - module_build_service - DEBUG - Checking whether module build already exists: testmodule:master:20180205135154:9c690d0e. 2018-07-05 12:17:49,307 - MainThread - module_build_service - DEBUG - Resuming existing module build 2018-07-05 12:17:49,308 - MainThread - module_build_service - INFO - , state 4->0 2018-07-05 12:17:49,311 - MainThread - module_build_service - WARNING - No MBSConsumer found. Shutting down? ValueError('No MBSConsumer found among 0.',) 2018-07-05 12:17:49,311 - MainThread - module_build_service - INFO - Resumed existing module build in previous state 0 2018-07-05 12:17:49,311 - MainThread - module_build_service - INFO - Homer J. Simpson submitted build of testmodule, stream=master, version=20180205135154, context=9c690d0e ------------------------------ Captured log call ------------------------------- submit.py 399 DEBUG Verifying modulemd mse.py 269 INFO Starting resolving with following input modules: ['platform:f28:3:00000000'] mmd_resolver.py 179 DEBUG Testing testmodule:master:20180205135154:0-20180205135154.src with combination: (,) mmd_resolver.py 188 DEBUG Jobs: mmd_resolver.py 190 DEBUG - favor platform:f28:3:00000000-3.x86_64 mmd_resolver.py 190 DEBUG - install testmodule:master:20180205135154:0-20180205135154.src mmd_resolver.py 196 DEBUG Transaction: mmd_resolver.py 198 DEBUG - testmodule:master:20180205135154:0-20180205135154.src mmd_resolver.py 198 DEBUG - platform:f28:3:00000000-3.x86_64 mse.py 274 INFO Resolving done, possible requires: set([frozenset(['platform:f28:3:00000000:x86_64', 'testmodule:master:20180205135154:0:src'])]) submit.py 335 DEBUG Checking whether module build already exists: testmodule:master:20180205135154:9c690d0e. submit.py 368 DEBUG Creating new module build messaging.py 295 WARNING Hub not initialized. Queueing on the side. submit.py 387 INFO Homer J. Simpson submitted build of testmodule, stream=master, version=20180205135154, context=9c690d0e hub.py 263 INFO Loading the Moksha Hub zeromq.py 133 WARNING No 'zmq_publish_endpoints' set. Are you sure? hub.py 391 INFO Loading Consumers hub.py 405 DEBUG Loading explicitly passed entry-points. consumer.py 75 DEBUG Setting topics: * __init__.py 102 DEBUG mbsconsumer is True __init__.py 109 INFO enabled by config - module_build_service.scheduler.consumer:MBSConsumer consumer.py 71 DEBUG Subscribing to consumer topic * zeromq.py 170 DEBUG Subscribing to on 'ZmqEndpoint(type='connect', address='ipc:///dev/null')' zeromq.py 175 DEBUG Creating new txzmq factory. consumer.py 92 INFO Blocking mode false for . Messages to be queued and distributed to 1 threads. __init__.py 159 INFO No backlog handling. status: None, url: None hub.py 432 INFO Loading Producers hub.py 449 DEBUG Loading explicitly passed entry-points. __init__.py 97 INFO Running the MokshaHub reactor __init__.py 106 INFO Suggesting threadpool size at 2 consumer.py 129 DEBUG 'MBSConsumer' thread 139846843901696 | Worker thread picking a message. consumer.py 148 DEBUG Received MBSModule('40', 2, 0) consumer.py 202 DEBUG Received a message with an ID of "40" and of type "MBSModule" consumer.py 237 INFO Calling init: MBSModule, 40 modules.py 162 ERROR unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' models.py 460 INFO , state 0->4 consumer.py 251 DEBUG Done with init: MBSModule, 40 __init__.py 69 DEBUG stop_condition checking , got True consumer.py 132 INFO Scheduling shutdown. consumer.py 129 DEBUG 'MBSConsumer' thread 139846843901696 | Going back to waiting on the incoming queue. Message handled: True hub.py 474 DEBUG Stopping the CentralMokshaHub consumer.py 129 DEBUG 'MBSConsumer' thread 139846843901696 | Worker thread picking a message. hub.py 487 DEBUG Stopping consumer consumer.py 148 DEBUG Received MBSModule('41', 2, 4) hub.py 474 DEBUG Stopping the CentralMokshaHub consumer.py 202 DEBUG Received a message with an ID of "41" and of type "MBSModule" consumer.py 237 INFO Calling failed: MBSModule, 41 consumer.py 251 DEBUG Done with failed: MBSModule, 41 __init__.py 69 DEBUG stop_condition checking , got True consumer.py 132 INFO Scheduling shutdown. consumer.py 129 DEBUG 'MBSConsumer' thread 139846843901696 | Going back to waiting on the incoming queue. Message handled: True consumer.py 129 DEBUG 'MBSConsumer' thread 139846843901696 | Worker thread exiting. __init__.py 110 INFO MokshaHub reactor stopped submit.py 399 DEBUG Verifying modulemd mse.py 269 INFO Starting resolving with following input modules: ['platform:f28:3:00000000'] mmd_resolver.py 179 DEBUG Testing testmodule:master:20180205135154:0-20180205135154.src with combination: (,) mmd_resolver.py 188 DEBUG Jobs: mmd_resolver.py 190 DEBUG - favor platform:f28:3:00000000-3.x86_64 mmd_resolver.py 190 DEBUG - install testmodule:master:20180205135154:0-20180205135154.src mmd_resolver.py 196 DEBUG Transaction: mmd_resolver.py 198 DEBUG - testmodule:master:20180205135154:0-20180205135154.src mmd_resolver.py 198 DEBUG - platform:f28:3:00000000-3.x86_64 mse.py 274 INFO Resolving done, possible requires: set([frozenset(['platform:f28:3:00000000:x86_64', 'testmodule:master:20180205135154:0:src'])]) submit.py 335 DEBUG Checking whether module build already exists: testmodule:master:20180205135154:9c690d0e. submit.py 351 DEBUG Resuming existing module build models.py 460 INFO , state 4->0 messaging.py 290 WARNING No MBSConsumer found. Shutting down? ValueError('No MBSConsumer found among 0.',) submit.py 366 INFO Resumed existing module build in previous state 0 submit.py 387 INFO Homer J. Simpson submitted build of testmodule, stream=master, version=20180205135154, context=9c690d0e ___________ TestBuild.test_submit_build_repo_regen_not_started_batch ___________ self = mocked_scm = mocked_get_user = conf_system = dbg = @patch('module_build_service.auth.get_user', return_value=user) @patch('module_build_service.scm.SCM') def test_submit_build_repo_regen_not_started_batch(self, mocked_scm, mocked_get_user, conf_system, dbg): """ Tests that if MBS starts a new batch, the concurrent component threshold is met before a build can start, and an unexpected repo regen occurs, the build will not fail. See: https://pagure.io/fm-orchestrator/issue/864 """ FakeSCM(mocked_scm, 'testmodule', 'testmodule.yaml', '620ec77321b2ea7b0d67d82992dda3e1d67055b4') rv = self.client.post('/module-build-service/1/module-builds/', data=json.dumps( {'branch': 'master', 'scmurl': 'git://pkgs.stg.fedoraproject.org/modules/' 'testmodule.git?#620ec77321b2ea7b0d67d82992dda3e1d67055b4'})) data = json.loads(rv.data) module_build_id = data['id'] def _stop_condition(message): # Stop the backend if the module batch is 2 (where we simulate the concurrent threshold # being met). For safety, also stop the backend if the module erroneously completes. module = db.session.query(models.ModuleBuild).get(module_build_id) return module.batch == 2 or module.state >= models.BUILD_STATES['done'] with patch('module_build_service.utils.batches.at_concurrent_component_threshold') as \ mock_acct: # Once we get to batch 2, then simulate the concurrent threshold being met def _at_concurrent_component_threshold(config, session): return db.session.query(models.ModuleBuild).get(module_build_id).batch == 2 mock_acct.side_effect = _at_concurrent_component_threshold module_build_service.scheduler.main([], _stop_condition) # Only module-build-macros should be built for build in db.session.query(models.ComponentBuild).filter_by( module_id=module_build_id).all(): if build.package == 'module-build-macros': assert build.state == koji.BUILD_STATES['COMPLETE'] else: assert build.state is None assert build.module_build.state == models.BUILD_STATES['build'] # Simulate a random repo regen message that MBS didn't expect cleanup_moksha() module = db.session.query(models.ModuleBuild).get(module_build_id) msgs = [module_build_service.messaging.KojiRepoChange( > msg_id='a faked internal message', repo_tag=module.koji_tag + '-build')] E TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' tests/test_build/test_build.py:1207: TypeError ---------------------------- Captured stderr setup ----------------------------- 2018-07-05 12:17:49,360 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ------------------------------ Captured log setup ------------------------------ general.py 301 INFO Module platform:f28:3:00000000 imported ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:17:49,362 - MainThread - module_build_service - DEBUG - Verifying modulemd 2018-07-05 12:17:49,370 - MainThread - module_build_service - INFO - Starting resolving with following input modules: ['platform:f28:3:00000000'] 2018-07-05 12:17:49,371 - MainThread - module_build_service - DEBUG - Testing testmodule:master:20180205135154:0-20180205135154.src with combination: (,) 2018-07-05 12:17:49,371 - MainThread - module_build_service - DEBUG - Jobs: 2018-07-05 12:17:49,371 - MainThread - module_build_service - DEBUG - - favor platform:f28:3:00000000-3.x86_64 2018-07-05 12:17:49,371 - MainThread - module_build_service - DEBUG - - install testmodule:master:20180205135154:0-20180205135154.src 2018-07-05 12:17:49,371 - MainThread - module_build_service - DEBUG - Transaction: 2018-07-05 12:17:49,371 - MainThread - module_build_service - DEBUG - - testmodule:master:20180205135154:0-20180205135154.src 2018-07-05 12:17:49,371 - MainThread - module_build_service - DEBUG - - platform:f28:3:00000000-3.x86_64 2018-07-05 12:17:49,371 - MainThread - module_build_service - INFO - Resolving done, possible requires: set([frozenset(['platform:f28:3:00000000:x86_64', 'testmodule:master:20180205135154:0:src'])]) 2018-07-05 12:17:49,379 - MainThread - module_build_service - DEBUG - Checking whether module build already exists: testmodule:master:20180205135154:9c690d0e. 2018-07-05 12:17:49,381 - MainThread - module_build_service - DEBUG - Creating new module build 2018-07-05 12:17:49,388 - MainThread - module_build_service - WARNING - Hub not initialized. Queueing on the side. 2018-07-05 12:17:49,390 - MainThread - module_build_service - INFO - Homer J. Simpson submitted build of testmodule, stream=master, version=20180205135154, context=9c690d0e 2018-07-05 12:17:49,399 - MainThread - moksha.hub - INFO - Loading the Moksha Hub 2018-07-05 12:17:49,399 - MainThread - moksha.hub - WARNING - No 'zmq_publish_endpoints' set. Are you sure? 2018-07-05 12:17:49,400 - MainThread - moksha.hub - INFO - Loading Consumers 2018-07-05 12:17:49,400 - MainThread - moksha.hub - DEBUG - Loading explicitly passed entry-points. 2018-07-05 12:17:49,400 - MainThread - module_build_service - DEBUG - Setting topics: * 2018-07-05 12:17:49,400 - MainThread - fedmsg.consumers - DEBUG - mbsconsumer is True 2018-07-05 12:17:49,400 - MainThread - fedmsg.consumers - INFO - enabled by config - module_build_service.scheduler.consumer:MBSConsumer 2018-07-05 12:17:49,400 - MainThread - moksha.hub - DEBUG - Subscribing to consumer topic * 2018-07-05 12:17:49,400 - MainThread - moksha.hub - DEBUG - Subscribing to on 'ZmqEndpoint(type='connect', address='ipc:///dev/null')' 2018-07-05 12:17:49,400 - MainThread - moksha.hub - DEBUG - Creating new txzmq factory. 2018-07-05 12:17:49,400 - MainThread - moksha.hub - INFO - Blocking mode false for . Messages to be queued and distributed to 1 threads. 2018-07-05 12:17:49,401 - MainThread - fedmsg.consumers - INFO - No backlog handling. status: None, url: None 2018-07-05 12:17:49,401 - MainThread - moksha.hub - INFO - Loading Producers 2018-07-05 12:17:49,401 - MainThread - moksha.hub - DEBUG - Loading explicitly passed entry-points. 2018-07-05 12:17:49,401 - MainThread - moksha.hub - INFO - Running the MokshaHub reactor 2018-07-05 12:17:49,401 - MainThread - moksha.hub - INFO - Suggesting threadpool size at 2 2018-07-05 12:17:49,401 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139846634084096 | Worker thread picking a message. 2018-07-05 12:17:49,402 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Received MBSModule('43', 2, 0) 2018-07-05 12:17:49,402 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Received a message with an ID of "43" and of type "MBSModule" 2018-07-05 12:17:49,405 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Calling init: MBSModule, 43 2018-07-05 12:17:49,416 - PoolThread-twisted.internet.reactor-1 - module_build_service - ERROR - unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' 2018-07-05 12:17:49,419 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - , state 0->4 2018-07-05 12:17:49,423 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Done with init: MBSModule, 43 2018-07-05 12:17:49,425 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Scheduling shutdown. 2018-07-05 12:17:49,425 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139846634084096 | Going back to waiting on the incoming queue. Message handled: True 2018-07-05 12:17:49,425 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139846634084096 | Worker thread picking a message. 2018-07-05 12:17:49,425 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Received MBSModule('44', 2, 4) 2018-07-05 12:17:49,425 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Received a message with an ID of "44" and of type "MBSModule" 2018-07-05 12:17:49,425 - MainThread - moksha.hub - DEBUG - Stopping the CentralMokshaHub 2018-07-05 12:17:49,427 - MainThread - moksha.hub - DEBUG - Stopping consumer 2018-07-05 12:17:49,427 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Calling failed: MBSModule, 44 2018-07-05 12:17:49,427 - MainThread - moksha.hub - DEBUG - Stopping the CentralMokshaHub 2018-07-05 12:17:49,435 - PoolThread-twisted.internet.reactor-1 - module_build_service - DEBUG - Done with failed: MBSModule, 44 2018-07-05 12:17:49,436 - PoolThread-twisted.internet.reactor-1 - module_build_service - INFO - Scheduling shutdown. 2018-07-05 12:17:49,436 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139846634084096 | Going back to waiting on the incoming queue. Message handled: True 2018-07-05 12:17:49,437 - PoolThread-twisted.internet.reactor-1 - moksha.hub - DEBUG - 'MBSConsumer' thread 139846634084096 | Worker thread exiting. 2018-07-05 12:17:49,437 - MainThread - moksha.hub - INFO - MokshaHub reactor stopped ------------------------------ Captured log call ------------------------------- submit.py 399 DEBUG Verifying modulemd mse.py 269 INFO Starting resolving with following input modules: ['platform:f28:3:00000000'] mmd_resolver.py 179 DEBUG Testing testmodule:master:20180205135154:0-20180205135154.src with combination: (,) mmd_resolver.py 188 DEBUG Jobs: mmd_resolver.py 190 DEBUG - favor platform:f28:3:00000000-3.x86_64 mmd_resolver.py 190 DEBUG - install testmodule:master:20180205135154:0-20180205135154.src mmd_resolver.py 196 DEBUG Transaction: mmd_resolver.py 198 DEBUG - testmodule:master:20180205135154:0-20180205135154.src mmd_resolver.py 198 DEBUG - platform:f28:3:00000000-3.x86_64 mse.py 274 INFO Resolving done, possible requires: set([frozenset(['platform:f28:3:00000000:x86_64', 'testmodule:master:20180205135154:0:src'])]) submit.py 335 DEBUG Checking whether module build already exists: testmodule:master:20180205135154:9c690d0e. submit.py 368 DEBUG Creating new module build messaging.py 295 WARNING Hub not initialized. Queueing on the side. submit.py 387 INFO Homer J. Simpson submitted build of testmodule, stream=master, version=20180205135154, context=9c690d0e hub.py 263 INFO Loading the Moksha Hub zeromq.py 133 WARNING No 'zmq_publish_endpoints' set. Are you sure? hub.py 391 INFO Loading Consumers hub.py 405 DEBUG Loading explicitly passed entry-points. consumer.py 75 DEBUG Setting topics: * __init__.py 102 DEBUG mbsconsumer is True __init__.py 109 INFO enabled by config - module_build_service.scheduler.consumer:MBSConsumer consumer.py 71 DEBUG Subscribing to consumer topic * zeromq.py 170 DEBUG Subscribing to on 'ZmqEndpoint(type='connect', address='ipc:///dev/null')' zeromq.py 175 DEBUG Creating new txzmq factory. consumer.py 92 INFO Blocking mode false for . Messages to be queued and distributed to 1 threads. __init__.py 159 INFO No backlog handling. status: None, url: None hub.py 432 INFO Loading Producers hub.py 449 DEBUG Loading explicitly passed entry-points. __init__.py 97 INFO Running the MokshaHub reactor __init__.py 106 INFO Suggesting threadpool size at 2 consumer.py 129 DEBUG 'MBSConsumer' thread 139846634084096 | Worker thread picking a message. consumer.py 148 DEBUG Received MBSModule('43', 2, 0) consumer.py 202 DEBUG Received a message with an ID of "43" and of type "MBSModule" consumer.py 237 INFO Calling init: MBSModule, 43 modules.py 162 ERROR unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' models.py 460 INFO , state 0->4 consumer.py 251 DEBUG Done with init: MBSModule, 43 consumer.py 132 INFO Scheduling shutdown. consumer.py 129 DEBUG 'MBSConsumer' thread 139846634084096 | Going back to waiting on the incoming queue. Message handled: True consumer.py 129 DEBUG 'MBSConsumer' thread 139846634084096 | Worker thread picking a message. consumer.py 148 DEBUG Received MBSModule('44', 2, 4) consumer.py 202 DEBUG Received a message with an ID of "44" and of type "MBSModule" hub.py 474 DEBUG Stopping the CentralMokshaHub hub.py 487 DEBUG Stopping consumer consumer.py 237 INFO Calling failed: MBSModule, 44 hub.py 474 DEBUG Stopping the CentralMokshaHub consumer.py 251 DEBUG Done with failed: MBSModule, 44 consumer.py 132 INFO Scheduling shutdown. consumer.py 129 DEBUG 'MBSConsumer' thread 139846634084096 | Going back to waiting on the incoming queue. Message handled: True consumer.py 129 DEBUG 'MBSConsumer' thread 139846634084096 | Worker thread exiting. __init__.py 110 INFO MokshaHub reactor stopped _________________ TestMBSModule.test_get_module_modulemds_nsvc _________________ self = mock_session = testmodule_mmd_9c690d0e = '---\ndocument: modulemd\nversion: 2\ndata:\n name: testmodule\n stream: master\n version: 20180205135154\n contex...\n cache: http://pkgs.fedoraproject.org/repo/pkgs/tangerine\n ref: master\n buildorder: 10\n...\n' @patch("requests.Session") def test_get_module_modulemds_nsvc(self, mock_session, testmodule_mmd_9c690d0e): """ Tests for querying a module from mbs """ mock_res = Mock() mock_res.ok.return_value = True mock_res.json.return_value = { "items": [ { "name": "testmodule", "stream": "master", "version": "20180205135154", "context": "9c690d0e", "modulemd": testmodule_mmd_9c690d0e } ], "next": None } mock_session().get.return_value = mock_res resolver = mbs_resolver.GenericResolver.create(tests.conf, backend='mbs') module_mmds = resolver.get_module_modulemds('testmodule', 'master', '20180205135154', > '9c690d0e') tests/test_resolver/test_mbs.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ module_build_service/resolver/MBSResolver.py:132: in get_module_modulemds modules = self._get_modules(name, stream, version, context, strict=strict) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'testmodule', stream = 'master', version = '20180205135154' context = '9c690d0e', state = 'ready', strict = False def _get_modules(self, name, stream, version=None, context=None, state="ready", strict=False): """ :param module_info: str, mmd or module dict :param strict: Normally this function returns None if no module can be found. If strict=True, then an UnprocessableEntity is raised. :return final list of module_info which pass repoclosure """ query = self._query_from_nsvc(name, stream, version, context, state) query["page"] = 1 query["per_page"] = 10 modules = [] while True: res = self.session.get(self.mbs_prod_url, params=query) if not res.ok: raise RuntimeError("Failed to query MBS with query %r returned HTTP status %s" % (query, res.status_code)) break data = res.json() modules_per_page = data["items"] modules += modules_per_page > if not data["meta"]["next"]: E KeyError: 'meta' module_build_service/resolver/MBSResolver.py:96: KeyError ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:17:54,971 - MainThread - requests.packages.urllib3.util.retry - DEBUG - Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None) ------------------------------ Captured log call ------------------------------- retry.py 155 DEBUG Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None) _______________ TestMBSModule.test_get_module_modulemds_partial ________________ self = mock_session = testmodule_mmd_9c690d0e = '---\ndocument: modulemd\nversion: 2\ndata:\n name: testmodule\n stream: master\n version: 20180205135154\n contex...\n cache: http://pkgs.fedoraproject.org/repo/pkgs/tangerine\n ref: master\n buildorder: 10\n...\n' testmodule_mmd_c2c572ed = '---\ndocument: modulemd\nversion: 2\ndata:\n name: testmodule\n stream: master\n version: 20180205135154\n contex...\n cache: http://pkgs.fedoraproject.org/repo/pkgs/tangerine\n ref: master\n buildorder: 10\n...\n' @patch("requests.Session") def test_get_module_modulemds_partial(self, mock_session, testmodule_mmd_9c690d0e, testmodule_mmd_c2c572ed): """ Test for querying MBS without the context of a module """ version = "20180205135154" mock_res = Mock() mock_res.ok.return_value = True mock_res.json.return_value = { "items": [ { "name": "testmodule", "stream": "master", "version": version, "context": "9c690d0e", "modulemd": testmodule_mmd_9c690d0e }, { "name": "testmodule", "stream": "master", "version": version, "context": "c2c572ed", "modulemd": testmodule_mmd_c2c572ed } ], "next": None } mock_session().get.return_value = mock_res resolver = mbs_resolver.GenericResolver.create(tests.conf, backend='mbs') > ret = resolver.get_module_modulemds('testmodule', 'master', version) tests/test_resolver/test_mbs.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ module_build_service/resolver/MBSResolver.py:132: in get_module_modulemds modules = self._get_modules(name, stream, version, context, strict=strict) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'testmodule', stream = 'master', version = '20180205135154' context = None, state = 'ready', strict = False def _get_modules(self, name, stream, version=None, context=None, state="ready", strict=False): """ :param module_info: str, mmd or module dict :param strict: Normally this function returns None if no module can be found. If strict=True, then an UnprocessableEntity is raised. :return final list of module_info which pass repoclosure """ query = self._query_from_nsvc(name, stream, version, context, state) query["page"] = 1 query["per_page"] = 10 modules = [] while True: res = self.session.get(self.mbs_prod_url, params=query) if not res.ok: raise RuntimeError("Failed to query MBS with query %r returned HTTP status %s" % (query, res.status_code)) break data = res.json() modules_per_page = data["items"] modules += modules_per_page > if not data["meta"]["next"]: E KeyError: 'meta' module_build_service/resolver/MBSResolver.py:96: KeyError ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:17:54,991 - MainThread - requests.packages.urllib3.util.retry - DEBUG - Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None) ------------------------------ Captured log call ------------------------------- retry.py 155 DEBUG Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None) _______________ TestMBSModule.test_get_module_build_dependencies _______________ self = mock_session = platform_mmd = '---\ndocument: modulemd\nversion: 2\ndata:\n name: platform\n stream: f28\n version: 3\n context: 00000000\n sum...n - gnupg2\n - redhat-rpm-config\n - rpm-build\n - shadow-utils\n buildopts:\n rpms: {}\n...\n' testmodule_mmd_9c690d0e = '---\ndocument: modulemd\nversion: 2\ndata:\n name: testmodule\n stream: master\n version: 20180205135154\n contex...\n cache: http://pkgs.fedoraproject.org/repo/pkgs/tangerine\n ref: master\n buildorder: 10\n...\n' @patch("requests.Session") def test_get_module_build_dependencies(self, mock_session, platform_mmd, testmodule_mmd_9c690d0e): """ Tests that we return just direct build-time dependencies of testmodule. """ mock_res = Mock() mock_res.ok.return_value = True mock_res.json.side_effect = [ { "items": [ { "name": "testmodule", "stream": "master", "version": "20180205135154", "context": "9c690d0e", "modulemd": testmodule_mmd_9c690d0e } ], "next": None }, { "items": [ { "name": "platform", "stream": "f28", "version": "3", "context": "00000000", "modulemd": platform_mmd, "koji_tag": "module-f28-build" } ], "next": None } ] mock_session().get.return_value = mock_res expected = set(['module-f28-build']) resolver = mbs_resolver.GenericResolver.create(tests.conf, backend='mbs') result = resolver.get_module_build_dependencies( > 'testmodule', 'master', '20180205135154', '9c690d0e').keys() tests/test_resolver/test_mbs.py:165: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ module_build_service/resolver/MBSResolver.py:227: in get_module_build_dependencies name, stream, version, context, strict=strict) module_build_service/resolver/MBSResolver.py:111: in _get_module return self._get_modules(name, stream, version, context, state, strict)[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'testmodule', stream = 'master', version = '20180205135154' context = '9c690d0e', state = 'ready', strict = False def _get_modules(self, name, stream, version=None, context=None, state="ready", strict=False): """ :param module_info: str, mmd or module dict :param strict: Normally this function returns None if no module can be found. If strict=True, then an UnprocessableEntity is raised. :return final list of module_info which pass repoclosure """ query = self._query_from_nsvc(name, stream, version, context, state) query["page"] = 1 query["per_page"] = 10 modules = [] while True: res = self.session.get(self.mbs_prod_url, params=query) if not res.ok: raise RuntimeError("Failed to query MBS with query %r returned HTTP status %s" % (query, res.status_code)) break data = res.json() modules_per_page = data["items"] modules += modules_per_page > if not data["meta"]["next"]: E KeyError: 'meta' module_build_service/resolver/MBSResolver.py:96: KeyError ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:17:55,012 - MainThread - requests.packages.urllib3.util.retry - DEBUG - Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None) 2018-07-05 12:17:55,013 - MainThread - root - DEBUG - get_module_build_dependencies(testmodule, master, 20180205135154, 9c690d0e, strict=False) ------------------------------ Captured log call ------------------------------- retry.py 155 DEBUG Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None) MBSResolver.py 218 DEBUG get_module_build_dependencies(testmodule, master, 20180205135154, 9c690d0e, strict=False) _____ TestMBSModule.test_get_module_build_dependencies_empty_buildrequires _____ self = mock_session = testmodule_mmd_9c690d0e = '---\ndocument: modulemd\nversion: 2\ndata:\n name: testmodule\n stream: master\n version: 20180205135154\n contex...\n cache: http://pkgs.fedoraproject.org/repo/pkgs/tangerine\n ref: master\n buildorder: 10\n...\n' @patch("requests.Session") def test_get_module_build_dependencies_empty_buildrequires(self, mock_session, testmodule_mmd_9c690d0e): mmd = Modulemd.Module().new_from_string(testmodule_mmd_9c690d0e) # Wipe out the dependencies mmd.set_dependencies() xmd = glib.from_variant_dict(mmd.get_xmd()) xmd['mbs']['buildrequires'] = {} mmd.set_xmd(glib.dict_values(xmd)) mock_res = Mock() mock_res.ok.return_value = True mock_res.json.side_effect = [ { "items": [ { "name": "testmodule", "stream": "master", "version": "20180205135154", "context": "9c690d0e", "modulemd": mmd.dumps(), "build_deps": [] } ], "next": None } ] mock_session().get.return_value = mock_res expected = set() resolver = mbs_resolver.GenericResolver.create(tests.conf, backend='mbs') result = resolver.get_module_build_dependencies( > 'testmodule', 'master', '20180205135154', '9c690d0e').keys() tests/test_resolver/test_mbs.py:231: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ module_build_service/resolver/MBSResolver.py:227: in get_module_build_dependencies name, stream, version, context, strict=strict) module_build_service/resolver/MBSResolver.py:111: in _get_module return self._get_modules(name, stream, version, context, state, strict)[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'testmodule', stream = 'master', version = '20180205135154' context = '9c690d0e', state = 'ready', strict = False def _get_modules(self, name, stream, version=None, context=None, state="ready", strict=False): """ :param module_info: str, mmd or module dict :param strict: Normally this function returns None if no module can be found. If strict=True, then an UnprocessableEntity is raised. :return final list of module_info which pass repoclosure """ query = self._query_from_nsvc(name, stream, version, context, state) query["page"] = 1 query["per_page"] = 10 modules = [] while True: res = self.session.get(self.mbs_prod_url, params=query) if not res.ok: raise RuntimeError("Failed to query MBS with query %r returned HTTP status %s" % (query, res.status_code)) break data = res.json() modules_per_page = data["items"] modules += modules_per_page > if not data["meta"]["next"]: E KeyError: 'meta' module_build_service/resolver/MBSResolver.py:96: KeyError ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:17:55,043 - MainThread - requests.packages.urllib3.util.retry - DEBUG - Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None) 2018-07-05 12:17:55,103 - MainThread - root - DEBUG - get_module_build_dependencies(testmodule, master, 20180205135154, 9c690d0e, strict=False) ------------------------------ Captured log call ------------------------------- retry.py 155 DEBUG Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None) MBSResolver.py 218 DEBUG get_module_build_dependencies(testmodule, master, 20180205135154, 9c690d0e, strict=False) _____________________ TestMBSModule.test_resolve_profiles ______________________ self = mock_session = formatted_testmodule_mmd = platform_mmd = '---\ndocument: modulemd\nversion: 2\ndata:\n name: platform\n stream: f28\n version: 3\n context: 00000000\n sum...n - gnupg2\n - redhat-rpm-config\n - rpm-build\n - shadow-utils\n buildopts:\n rpms: {}\n...\n' @patch("requests.Session") def test_resolve_profiles(self, mock_session, formatted_testmodule_mmd, platform_mmd): mock_res = Mock() mock_res.ok.return_value = True mock_res.json.return_value = { "items": [ { "name": "platform", "stream": "f28", "version": "3", "context": "00000000", "modulemd": platform_mmd } ], "next": None } mock_session().get.return_value = mock_res resolver = mbs_resolver.GenericResolver.create(tests.conf, backend='mbs') result = resolver.resolve_profiles(formatted_testmodule_mmd, > ('buildroot', 'srpm-buildroot')) tests/test_resolver/test_mbs.py:268: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ module_build_service/resolver/MBSResolver.py:185: in resolve_profiles module_info['context'], strict=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'platform', stream = 'f28', version = '3', context = '00000000' state = 'ready', strict = True def _get_modules(self, name, stream, version=None, context=None, state="ready", strict=False): """ :param module_info: str, mmd or module dict :param strict: Normally this function returns None if no module can be found. If strict=True, then an UnprocessableEntity is raised. :return final list of module_info which pass repoclosure """ query = self._query_from_nsvc(name, stream, version, context, state) query["page"] = 1 query["per_page"] = 10 modules = [] while True: res = self.session.get(self.mbs_prod_url, params=query) if not res.ok: raise RuntimeError("Failed to query MBS with query %r returned HTTP status %s" % (query, res.status_code)) break data = res.json() modules_per_page = data["items"] modules += modules_per_page > if not data["meta"]["next"]: E KeyError: 'meta' module_build_service/resolver/MBSResolver.py:96: KeyError ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:17:55,131 - MainThread - requests.packages.urllib3.util.retry - DEBUG - Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None) ------------------------------ Captured log call ------------------------------- retry.py 155 DEBUG Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None) ________________________ TestModuleInit.test_init_basic ________________________ self = mocked_scm = @patch('module_build_service.scm.SCM') def test_init_basic(self, mocked_scm): FakeSCM(mocked_scm, 'testmodule', 'testmodule.yaml', '620ec77321b2ea7b0d67d82992dda3e1d67055b4') msg = module_build_service.messaging.MBSModule( msg_id=None, module_build_id=2, module_build_state='init') with make_session(conf) as session: self.fn(config=conf, session=session, msg=msg) build = ModuleBuild.query.filter_by(id=2).one() # Make sure the module entered the wait state > assert build.state == 1, build.state E AssertionError: 4 E assert 4 == 1 E + where 4 = .state tests/test_scheduler/test_module_init.py:68: AssertionError ---------------------------- Captured stderr setup ----------------------------- 2018-07-05 12:17:55,201 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported 2018-07-05 12:17:55,206 - MainThread - module_build_service - WARNING - Hub not initialized. Queueing on the side. ------------------------------ Captured log setup ------------------------------ general.py 301 INFO Module platform:f28:3:00000000 imported messaging.py 295 WARNING Hub not initialized. Queueing on the side. ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:17:55,216 - MainThread - module_build_service - ERROR - unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' 2018-07-05 12:17:55,220 - MainThread - module_build_service - INFO - , state 0->4 2018-07-05 12:17:55,223 - MainThread - module_build_service - WARNING - Hub not initialized. Queueing on the side. ------------------------------ Captured log call ------------------------------- modules.py 162 ERROR unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' models.py 460 INFO , state 0->4 messaging.py 295 WARNING Hub not initialized. Queueing on the side. ___________________ TestModuleInit.test_init_includedmodule ____________________ self = mocked_scm = mocked_mod_allow_repo = @patch("module_build_service.config.Config.modules_allow_repository", new_callable=PropertyMock, return_value=True) @patch('module_build_service.scm.SCM') def test_init_includedmodule(self, mocked_scm, mocked_mod_allow_repo): FakeSCM(mocked_scm, "includedmodules", ['testmodule.yaml']) includedmodules_yml_path = os.path.join( self.staged_data_dir, 'includedmodules.yaml') with open(includedmodules_yml_path, 'r') as f: yaml = f.read() scmurl = 'git://pkgs.domain.local/modules/includedmodule?#da95886' with make_session(conf) as session: ModuleBuild.create( session, conf, 'includemodule', '1', 3, yaml, scmurl, 'mprahl') msg = module_build_service.messaging.MBSModule( msg_id=None, module_build_id=3, module_build_state='init') self.fn(config=conf, session=session, msg=msg) build = ModuleBuild.query.filter_by(id=3).one() > assert build.state == 1 E AssertionError: assert 4 == 1 E + where 4 = .state tests/test_scheduler/test_module_init.py:106: AssertionError ---------------------------- Captured stderr setup ----------------------------- 2018-07-05 12:17:55,285 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported 2018-07-05 12:17:55,290 - MainThread - module_build_service - WARNING - Hub not initialized. Queueing on the side. ------------------------------ Captured log setup ------------------------------ general.py 301 INFO Module platform:f28:3:00000000 imported messaging.py 295 WARNING Hub not initialized. Queueing on the side. ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:17:55,297 - MainThread - module_build_service - WARNING - Hub not initialized. Queueing on the side. 2018-07-05 12:17:55,305 - MainThread - module_build_service - ERROR - unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' 2018-07-05 12:17:55,309 - MainThread - module_build_service - INFO - , state 0->4 2018-07-05 12:17:55,312 - MainThread - module_build_service - WARNING - Hub not initialized. Queueing on the side. ------------------------------ Captured log call ------------------------------- messaging.py 295 WARNING Hub not initialized. Queueing on the side. modules.py 162 ERROR unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last): File "/src/module_build_service/scheduler/handlers/modules.py", line 153, in init record_component_builds(mmd, build, session=session) File "/src/module_build_service/utils/submit.py", line 241, in record_component_builds full_url = component.get_repository() + "?#" + component_ref TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' models.py 460 INFO , state 0->4 messaging.py 295 WARNING Hub not initialized. Queueing on the side. TestUtils.test_format_mmd[git://pkgs.stg.fedoraproject.org/modules/testmodule.git?#620ec77321b2ea7b0d67d82992dda3e1d67055b4] self = mocked_scm = scmurl = 'git://pkgs.stg.fedoraproject.org/modules/testmodule.git?#620ec77321b2ea7b0d67d82992dda3e1d67055b4' @pytest.mark.parametrize('scmurl', [ ('git://pkgs.stg.fedoraproject.org/modules/testmodule.git' '?#620ec77321b2ea7b0d67d82992dda3e1d67055b4'), None ]) @patch('module_build_service.scm.SCM') def test_format_mmd(self, mocked_scm, scmurl): mocked_scm.return_value.commit = \ '620ec77321b2ea7b0d67d82992dda3e1d67055b4' # For all the RPMs in testmodule, get_latest is called mocked_scm.return_value.get_latest.side_effect = [ '4ceea43add2366d8b8c5a622a2fb563b625b9abf', 'fbed359411a1baa08d4a88e0d12d426fbf8f602c'] hashes_returned = { 'master': 'fbed359411a1baa08d4a88e0d12d426fbf8f602c', 'f28': '4ceea43add2366d8b8c5a622a2fb563b625b9abf', 'f27': '5deef23acd2367d8b8d5a621a2fc568b695bc3bd'} def mocked_get_latest(ref="master"): return hashes_returned[ref] mocked_scm.return_value.get_latest = mocked_get_latest mmd = Modulemd.Module().new_from_file( path.join(BASE_DIR, '..', 'staged_data', 'testmodule.yaml')) mmd.upgrade() # Modify the component branches so we can identify them later on mmd.get_rpm_components()['perl-Tangerine'].set_ref('f28') mmd.get_rpm_components()['tangerine'].set_ref('f27') module_build_service.utils.format_mmd(mmd, scmurl) # Make sure that original refs are not changed. mmd_pkg_refs = [pkg.get_ref() for pkg in mmd.get_rpm_components().values()] > assert set(mmd_pkg_refs) == set(hashes_returned.keys()) E AssertionError: assert set(['master']) == set(['f27', 'f28', 'master']) E Extra items in the right set: E 'f27' E 'f28' E Full diff: E - set(['master']) E + set(['f27', 'f28', 'master']) tests/test_utils/test_utils.py:316: AssertionError ---------------------------- Captured stderr setup ----------------------------- 2018-07-05 12:17:58,367 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ------------------------------ Captured log setup ------------------------------ general.py 301 INFO Module platform:f28:3:00000000 imported --------------------------- Captured stderr teardown --------------------------- 2018-07-05 12:17:58,403 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ---------------------------- Captured log teardown ----------------------------- general.py 301 INFO Module platform:f28:3:00000000 imported _______________________ TestUtils.test_format_mmd[None] ________________________ self = mocked_scm = , scmurl = None @pytest.mark.parametrize('scmurl', [ ('git://pkgs.stg.fedoraproject.org/modules/testmodule.git' '?#620ec77321b2ea7b0d67d82992dda3e1d67055b4'), None ]) @patch('module_build_service.scm.SCM') def test_format_mmd(self, mocked_scm, scmurl): mocked_scm.return_value.commit = \ '620ec77321b2ea7b0d67d82992dda3e1d67055b4' # For all the RPMs in testmodule, get_latest is called mocked_scm.return_value.get_latest.side_effect = [ '4ceea43add2366d8b8c5a622a2fb563b625b9abf', 'fbed359411a1baa08d4a88e0d12d426fbf8f602c'] hashes_returned = { 'master': 'fbed359411a1baa08d4a88e0d12d426fbf8f602c', 'f28': '4ceea43add2366d8b8c5a622a2fb563b625b9abf', 'f27': '5deef23acd2367d8b8d5a621a2fc568b695bc3bd'} def mocked_get_latest(ref="master"): return hashes_returned[ref] mocked_scm.return_value.get_latest = mocked_get_latest mmd = Modulemd.Module().new_from_file( path.join(BASE_DIR, '..', 'staged_data', 'testmodule.yaml')) mmd.upgrade() # Modify the component branches so we can identify them later on mmd.get_rpm_components()['perl-Tangerine'].set_ref('f28') mmd.get_rpm_components()['tangerine'].set_ref('f27') module_build_service.utils.format_mmd(mmd, scmurl) # Make sure that original refs are not changed. mmd_pkg_refs = [pkg.get_ref() for pkg in mmd.get_rpm_components().values()] > assert set(mmd_pkg_refs) == set(hashes_returned.keys()) E AssertionError: assert set(['master']) == set(['f27', 'f28', 'master']) E Extra items in the right set: E 'f27' E 'f28' E Full diff: E - set(['master']) E + set(['f27', 'f28', 'master']) tests/test_utils/test_utils.py:316: AssertionError ---------------------------- Captured stderr setup ----------------------------- 2018-07-05 12:17:58,413 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ------------------------------ Captured log setup ------------------------------ general.py 301 INFO Module platform:f28:3:00000000 imported --------------------------- Captured stderr teardown --------------------------- 2018-07-05 12:17:58,453 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ---------------------------- Captured log teardown ----------------------------- general.py 301 INFO Module platform:f28:3:00000000 imported ______________ TestUtils.test_record_component_builds_set_weight _______________ self = mocked_scm = @patch('module_build_service.scm.SCM') def test_record_component_builds_set_weight(self, mocked_scm): with app.app_context(): clean_database() mocked_scm.return_value.commit = \ '620ec77321b2ea7b0d67d82992dda3e1d67055b4' mocked_scm.return_value.get_latest.side_effect = [ '4ceea43add2366d8b8c5a622a2fb563b625b9abf', 'fbed359411a1baa08d4a88e0d12d426fbf8f602c', 'dbed259411a1baa08d4a88e0d12d426fbf8f6037'] testmodule_mmd_path = path.join( BASE_DIR, '..', 'staged_data', 'testmodule.yaml') mmd = Modulemd.Module().new_from_file(testmodule_mmd_path) mmd.upgrade() module_build = module_build_service.models.ModuleBuild() module_build.name = 'testmodule' module_build.stream = 'master' module_build.version = 20170109091357 module_build.state = models.BUILD_STATES['init'] module_build.scmurl = \ 'git://pkgs.stg.fedoraproject.org/modules/testmodule.git?#ff1ea79' module_build.batch = 1 module_build.owner = 'Tom Brady' module_build.time_submitted = datetime(2017, 2, 15, 16, 8, 18) module_build.time_modified = datetime(2017, 2, 15, 16, 19, 35) module_build.rebuild_strategy = 'changed-and-after' module_build.modulemd = mmd.dumps() db.session.add(module_build) db.session.commit() > module_build_service.utils.record_component_builds(mmd, module_build) tests/test_utils/test_utils.py:531: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ mmd = module = initial_batch = 1, previous_buildorder = 0L main_mmd = session = def record_component_builds(mmd, module, initial_batch=1, previous_buildorder=None, main_mmd=None, session=None): # Imported here to allow import of utils in GenericBuilder. import module_build_service.builder if not session: session = db.session # Format the modulemd by putting in defaults and replacing streams that # are branches with commit hashes format_mmd(mmd, module.scmurl, session=session) # When main_mmd is set, merge the metadata from this mmd to main_mmd, # otherwise our current mmd is main_mmd. if main_mmd: # Check for components that are in both MMDs before merging since MBS # currently can't handle that situation. duplicate_components = [rpm for rpm in main_mmd.get_rpm_components().keys() if rpm in mmd.get_rpm_components()] if duplicate_components: error_msg = ( 'The included module "{0}" in "{1}" have the following ' 'conflicting components: {2}'.format( mmd.get_name(), main_mmd.get_name(), ', '.join(duplicate_components))) raise UnprocessableEntity(error_msg) merge_included_mmd(main_mmd, mmd) else: main_mmd = mmd # If the modulemd yaml specifies components, then submit them for build rpm_components = mmd.get_rpm_components().values() module_components = mmd.get_module_components().values() all_components = list(rpm_components) + list(module_components) if not all_components: return rpm_weights = module_build_service.builder.GenericBuilder.get_build_weights( [c.get_name() for c in rpm_components]) all_components.sort(key=lambda x: x.get_buildorder()) # We do not start with batch = 0 here, because the first batch is # reserved for module-build-macros. First real components must be # planned for batch 2 and following. batch = initial_batch for component in all_components: # Increment the batch number when buildorder increases. if previous_buildorder != component.get_buildorder(): previous_buildorder = component.get_buildorder() batch += 1 # If the component is another module, we fetch its modulemd file # and record its components recursively with the initial_batch # set to our current batch, so the components of this module # are built in the right global order. if isinstance(component, Modulemd.ComponentModule): full_url = component.get_repository() + "?#" + component.get_ref() # It is OK to whitelist all URLs here, because the validity # of every URL have been already checked in format_mmd(...). included_mmd = _fetch_mmd(full_url, whitelist_url=True)[0] batch = record_component_builds(included_mmd, module, batch, previous_buildorder, main_mmd, session=session) continue component_ref = mmd.get_xmd()['mbs']['rpms'][component.get_name()]['ref'] > full_url = component.get_repository() + "?#" + component_ref E TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' module_build_service/utils/submit.py:241: TypeError ---------------------------- Captured stderr setup ----------------------------- 2018-07-05 12:18:00,418 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ------------------------------ Captured log setup ------------------------------ general.py 301 INFO Module platform:f28:3:00000000 imported ----------------------------- Captured stderr call ----------------------------- 2018-07-05 12:18:00,428 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ------------------------------ Captured log call ------------------------------- general.py 301 INFO Module platform:f28:3:00000000 imported --------------------------- Captured stderr teardown --------------------------- 2018-07-05 12:18:00,486 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ---------------------------- Captured log teardown ----------------------------- general.py 301 INFO Module platform:f28:3:00000000 imported TestUtilsModuleStreamExpansion.test_generate_expanded_mmds_buildrequires[requires3-build_requires3-True-expected_xmd3-expected_buildrequires3] self = requires = {'foo': ['-2'], 'gtk': ['-2']} build_requires = {'foo': ['-2'], 'gtk': ['-2']}, stream_ambigous = True expected_xmd = set([frozenset(['foo:1:0:c2', 'gtk:1:0:c2', 'platform:f28:0:c10'])]) expected_buildrequires = set([frozenset(['foo:1', 'gtk:1'])]) @pytest.mark.parametrize( 'requires,build_requires,stream_ambigous,expected_xmd,expected_buildrequires', [ ({"gtk": ["1", "2"]}, {"gtk": ["1", "2"]}, True, set([ frozenset(['platform:f28:0:c10', 'gtk:2:0:c4']), frozenset(['platform:f28:0:c10', 'gtk:1:0:c2']) ]), set([ frozenset(['gtk:1']), frozenset(['gtk:2']), ])), ({"gtk": ["1"], "foo": ["1"]}, {"gtk": ["1"], "foo": ["1"]}, False, set([ frozenset(['foo:1:0:c2', 'gtk:1:0:c2', 'platform:f28:0:c10']) ]), set([ frozenset(['foo:1', 'gtk:1']) ])), ({"gtk": ["1"], "foo": ["1"]}, {"gtk": ["1"], "foo": ["1"], "platform": ["f28"]}, False, set([ frozenset(['foo:1:0:c2', 'gtk:1:0:c2', 'platform:f28:0:c10']) ]), set([ frozenset(['foo:1', 'gtk:1']) ])), ({"gtk": ["-2"], "foo": ["-2"]}, {"gtk": ["-2"], "foo": ["-2"]}, True, set([ frozenset(['foo:1:0:c2', 'gtk:1:0:c2', 'platform:f28:0:c10']) ]), set([ frozenset(['foo:1', 'gtk:1']) ])), ({"gtk": ["1"], "foo": ["1"]}, {"gtk": ["-1", "1"], "foo": ["-2", "1"]}, False, set([ frozenset(['foo:1:0:c2', 'gtk:1:0:c2', 'platform:f28:0:c10']) ]), set([ frozenset(['foo:1', 'gtk:1']) ])), ({"gtk": ["1"], "foo": ["1"]}, {"gtk": ["1"]}, False, set([ frozenset(['gtk:1:0:c2', 'platform:f28:0:c10']) ]), set([ frozenset(['gtk:1']) ])), ({"gtk": []}, {"gtk": ["1"]}, True, set([ frozenset(['gtk:1:0:c2', 'platform:f28:0:c10']) ]), set([ frozenset(['gtk:1']) ])), ({}, {"app": ["1"]}, False, set([ frozenset(['app:1:0:c6', 'platform:f29:0:c11']) ]), set([ frozenset([]) ])), ]) def test_generate_expanded_mmds_buildrequires( self, requires, build_requires, stream_ambigous, expected_xmd, expected_buildrequires): self._generate_default_modules() module_build = self._make_module("app:1:0:c1", requires, build_requires) # Check that generate_expanded_mmds raises an exception if stream is ambigous # and also that it does not raise an exception otherwise. if stream_ambigous: with pytest.raises(StreamAmbigous): module_build_service.utils.generate_expanded_mmds( db.session, module_build.mmd(), raise_if_stream_ambigous=True) else: module_build_service.utils.generate_expanded_mmds( db.session, module_build.mmd(), raise_if_stream_ambigous=True) # Check that if stream is ambigous and we define the stream, it does not raise # an exception. if stream_ambigous: default_streams = {} for ns in list(expected_buildrequires)[0]: name, stream = ns.split(":") default_streams[name] = stream module_build_service.utils.generate_expanded_mmds( db.session, module_build.mmd(), raise_if_stream_ambigous=True, > default_streams=default_streams) tests/test_utils/test_utils_mse.py:244: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ module_build_service/utils/mse.py:261: in generate_expanded_mmds session, current_mmd, default_streams, raise_if_stream_ambigous) module_build_service/utils/mse.py:207: in get_mmds_required_by_module_recursively raise_if_stream_ambigous) module_build_service/utils/mse.py:159: in _get_mmds_from_requires mmds[ns] = resolver.get_module_modulemds(name, stream, strict=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'foo', stream = '-2', version = None, context = None, strict = True def get_module_modulemds(self, name, stream, version=None, context=None, strict=False): """ Gets the module modulemds from the resolver. :param name: a string of the module's name :param stream: a string of the module's stream :param version: a string or int of the module's version. When None, latest version will be returned. :param context: a string of the module's context. When None, all contexts will be returned. :kwarg strict: Normally this function returns [] if no module can be found. If strict=True, then a UnprocessableEntity is raised. :return: List of Modulemd metadata instances matching the query """ with models.make_session(self.config) as session: if version and context: builds = [models.ModuleBuild.get_build_from_nsvc( session, name, stream, version, context)] elif not version and not context: builds = models.ModuleBuild.get_last_builds_in_stream( session, name, stream) else: raise NotImplemented( "This combination of name/stream/version/context is not implemented") if not builds and strict: raise UnprocessableEntity( > "Cannot find any module builds for %s:%s" % (name, stream)) E UnprocessableEntity: Cannot find any module builds for foo:-2 module_build_service/resolver/DBResolver.py:65: UnprocessableEntity --------------------------- Captured stderr teardown --------------------------- 2018-07-05 12:18:01,769 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ---------------------------- Captured log teardown ----------------------------- general.py 301 INFO Module platform:f28:3:00000000 imported TestUtilsModuleStreamExpansion.test_generate_expanded_mmds_buildrequires[requires4-build_requires4-False-expected_xmd4-expected_buildrequires4] self = requires = {'foo': ['1'], 'gtk': ['1']} build_requires = {'foo': ['-2', '1'], 'gtk': ['-1', '1']} stream_ambigous = False expected_xmd = set([frozenset(['foo:1:0:c2', 'gtk:1:0:c2', 'platform:f28:0:c10'])]) expected_buildrequires = set([frozenset(['foo:1', 'gtk:1'])]) @pytest.mark.parametrize( 'requires,build_requires,stream_ambigous,expected_xmd,expected_buildrequires', [ ({"gtk": ["1", "2"]}, {"gtk": ["1", "2"]}, True, set([ frozenset(['platform:f28:0:c10', 'gtk:2:0:c4']), frozenset(['platform:f28:0:c10', 'gtk:1:0:c2']) ]), set([ frozenset(['gtk:1']), frozenset(['gtk:2']), ])), ({"gtk": ["1"], "foo": ["1"]}, {"gtk": ["1"], "foo": ["1"]}, False, set([ frozenset(['foo:1:0:c2', 'gtk:1:0:c2', 'platform:f28:0:c10']) ]), set([ frozenset(['foo:1', 'gtk:1']) ])), ({"gtk": ["1"], "foo": ["1"]}, {"gtk": ["1"], "foo": ["1"], "platform": ["f28"]}, False, set([ frozenset(['foo:1:0:c2', 'gtk:1:0:c2', 'platform:f28:0:c10']) ]), set([ frozenset(['foo:1', 'gtk:1']) ])), ({"gtk": ["-2"], "foo": ["-2"]}, {"gtk": ["-2"], "foo": ["-2"]}, True, set([ frozenset(['foo:1:0:c2', 'gtk:1:0:c2', 'platform:f28:0:c10']) ]), set([ frozenset(['foo:1', 'gtk:1']) ])), ({"gtk": ["1"], "foo": ["1"]}, {"gtk": ["-1", "1"], "foo": ["-2", "1"]}, False, set([ frozenset(['foo:1:0:c2', 'gtk:1:0:c2', 'platform:f28:0:c10']) ]), set([ frozenset(['foo:1', 'gtk:1']) ])), ({"gtk": ["1"], "foo": ["1"]}, {"gtk": ["1"]}, False, set([ frozenset(['gtk:1:0:c2', 'platform:f28:0:c10']) ]), set([ frozenset(['gtk:1']) ])), ({"gtk": []}, {"gtk": ["1"]}, True, set([ frozenset(['gtk:1:0:c2', 'platform:f28:0:c10']) ]), set([ frozenset(['gtk:1']) ])), ({}, {"app": ["1"]}, False, set([ frozenset(['app:1:0:c6', 'platform:f29:0:c11']) ]), set([ frozenset([]) ])), ]) def test_generate_expanded_mmds_buildrequires( self, requires, build_requires, stream_ambigous, expected_xmd, expected_buildrequires): self._generate_default_modules() module_build = self._make_module("app:1:0:c1", requires, build_requires) # Check that generate_expanded_mmds raises an exception if stream is ambigous # and also that it does not raise an exception otherwise. if stream_ambigous: with pytest.raises(StreamAmbigous): module_build_service.utils.generate_expanded_mmds( db.session, module_build.mmd(), raise_if_stream_ambigous=True) else: module_build_service.utils.generate_expanded_mmds( > db.session, module_build.mmd(), raise_if_stream_ambigous=True) tests/test_utils/test_utils_mse.py:233: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ module_build_service/utils/mse.py:261: in generate_expanded_mmds session, current_mmd, default_streams, raise_if_stream_ambigous) module_build_service/utils/mse.py:207: in get_mmds_required_by_module_recursively raise_if_stream_ambigous) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ session = requires = {'foo': , 'gtk': } mmds = {}, recursive = False, default_streams = {} raise_if_stream_ambigous = True def _get_mmds_from_requires(session, requires, mmds, recursive=False, default_streams=None, raise_if_stream_ambigous=False): """ Helper method for get_mmds_required_by_module_recursively returning the list of module metadata objects defined by `requires` dict. :param session: SQLAlchemy DB session. :param requires: Modulemetadata requires or buildrequires. :param mmds: Dictionary with already handled name:streams as a keys and lists of resulting mmds as values. :param recursive: If True, the requires are checked recursively. :param dict default_streams: Dict in {module_name: module_stream, ...} format defining the default stream to choose for module in case when there are multiple streams to choose from. :param bool raise_if_stream_ambigous: When True, raises a StreamAmbigous exception in case there are multiple streams for some dependency of module and the module name is not defined in `default_streams`, so it is not clear which stream should be used. :return: Dict with name:stream as a key and list with mmds as value. """ default_streams = default_streams or {} # To be able to call itself recursively, we need to store list of mmds # we have added to global mmds list in this particular call. added_mmds = {} resolver = module_build_service.resolver.GenericResolver.create(conf) for name, streams in requires.items(): streams_to_try = streams.get() if name in default_streams: streams_to_try = [default_streams[name]] elif len(streams_to_try) > 1 and raise_if_stream_ambigous: raise StreamAmbigous("There are multiple streams %r to choose from for module %s." > % (streams_to_try, name)) E StreamAmbigous: There are multiple streams ['-2', '1'] to choose from for module foo. module_build_service/utils/mse.py:148: StreamAmbigous --------------------------- Captured stderr teardown --------------------------- 2018-07-05 12:18:01,834 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ---------------------------- Captured log teardown ----------------------------- general.py 301 INFO Module platform:f28:3:00000000 imported TestUtilsModuleStreamExpansion.test_generate_expanded_mmds_requires[requires3-build_requires3-expected3] self = requires = {'foo': ['-2'], 'gtk': ['-2']} build_requires = {'foo': ['-2'], 'gtk': ['-2']} expected = set([frozenset(['foo:1', 'gtk:1'])]) @pytest.mark.parametrize('requires,build_requires,expected', [ ({"gtk": ["1", "2"]}, {"gtk": ["1", "2"]}, set([ frozenset(['gtk:1']), frozenset(['gtk:2']), ])), ({"gtk": ["1", "2"]}, {"gtk": ["1"]}, set([ frozenset(['gtk:1', 'gtk:2']), ])), ({"gtk": ["1"], "foo": ["1"]}, {"gtk": ["1"], "foo": ["1"]}, set([ frozenset(['foo:1', 'gtk:1']), ])), ({"gtk": ["-2"], "foo": ["-2"]}, {"gtk": ["-2"], "foo": ["-2"]}, set([ frozenset(['foo:1', 'gtk:1']), ])), ({"gtk": ["-1", "1"], "foo": ["-2", "1"]}, {"gtk": ["-1", "1"], "foo": ["-2", "1"]}, set([ frozenset(['foo:1', 'gtk:1']), ])), ({"gtk": [], "foo": []}, {"gtk": ["1"], "foo": ["1"]}, set([ frozenset([]), ])), ]) def test_generate_expanded_mmds_requires(self, requires, build_requires, expected): self._generate_default_modules() module_build = self._make_module("app:1:0:c1", requires, build_requires) mmds = module_build_service.utils.generate_expanded_mmds( > db.session, module_build.mmd()) tests/test_utils/test_utils_mse.py:308: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ module_build_service/utils/mse.py:261: in generate_expanded_mmds session, current_mmd, default_streams, raise_if_stream_ambigous) module_build_service/utils/mse.py:207: in get_mmds_required_by_module_recursively raise_if_stream_ambigous) module_build_service/utils/mse.py:159: in _get_mmds_from_requires mmds[ns] = resolver.get_module_modulemds(name, stream, strict=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'foo', stream = '-2', version = None, context = None, strict = True def get_module_modulemds(self, name, stream, version=None, context=None, strict=False): """ Gets the module modulemds from the resolver. :param name: a string of the module's name :param stream: a string of the module's stream :param version: a string or int of the module's version. When None, latest version will be returned. :param context: a string of the module's context. When None, all contexts will be returned. :kwarg strict: Normally this function returns [] if no module can be found. If strict=True, then a UnprocessableEntity is raised. :return: List of Modulemd metadata instances matching the query """ with models.make_session(self.config) as session: if version and context: builds = [models.ModuleBuild.get_build_from_nsvc( session, name, stream, version, context)] elif not version and not context: builds = models.ModuleBuild.get_last_builds_in_stream( session, name, stream) else: raise NotImplemented( "This combination of name/stream/version/context is not implemented") if not builds and strict: raise UnprocessableEntity( > "Cannot find any module builds for %s:%s" % (name, stream)) E UnprocessableEntity: Cannot find any module builds for foo:-2 module_build_service/resolver/DBResolver.py:65: UnprocessableEntity --------------------------- Captured stderr teardown --------------------------- 2018-07-05 12:18:02,408 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ---------------------------- Captured log teardown ----------------------------- general.py 301 INFO Module platform:f28:3:00000000 imported TestUtilsModuleStreamExpansion.test_generate_expanded_mmds_requires[requires4-build_requires4-expected4] self = requires = {'foo': ['-2', '1'], 'gtk': ['-1', '1']} build_requires = {'foo': ['-2', '1'], 'gtk': ['-1', '1']} expected = set([frozenset(['foo:1', 'gtk:1'])]) @pytest.mark.parametrize('requires,build_requires,expected', [ ({"gtk": ["1", "2"]}, {"gtk": ["1", "2"]}, set([ frozenset(['gtk:1']), frozenset(['gtk:2']), ])), ({"gtk": ["1", "2"]}, {"gtk": ["1"]}, set([ frozenset(['gtk:1', 'gtk:2']), ])), ({"gtk": ["1"], "foo": ["1"]}, {"gtk": ["1"], "foo": ["1"]}, set([ frozenset(['foo:1', 'gtk:1']), ])), ({"gtk": ["-2"], "foo": ["-2"]}, {"gtk": ["-2"], "foo": ["-2"]}, set([ frozenset(['foo:1', 'gtk:1']), ])), ({"gtk": ["-1", "1"], "foo": ["-2", "1"]}, {"gtk": ["-1", "1"], "foo": ["-2", "1"]}, set([ frozenset(['foo:1', 'gtk:1']), ])), ({"gtk": [], "foo": []}, {"gtk": ["1"], "foo": ["1"]}, set([ frozenset([]), ])), ]) def test_generate_expanded_mmds_requires(self, requires, build_requires, expected): self._generate_default_modules() module_build = self._make_module("app:1:0:c1", requires, build_requires) mmds = module_build_service.utils.generate_expanded_mmds( > db.session, module_build.mmd()) tests/test_utils/test_utils_mse.py:308: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ module_build_service/utils/mse.py:261: in generate_expanded_mmds session, current_mmd, default_streams, raise_if_stream_ambigous) module_build_service/utils/mse.py:207: in get_mmds_required_by_module_recursively raise_if_stream_ambigous) module_build_service/utils/mse.py:159: in _get_mmds_from_requires mmds[ns] = resolver.get_module_modulemds(name, stream, strict=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'foo', stream = '-2', version = None, context = None, strict = True def get_module_modulemds(self, name, stream, version=None, context=None, strict=False): """ Gets the module modulemds from the resolver. :param name: a string of the module's name :param stream: a string of the module's stream :param version: a string or int of the module's version. When None, latest version will be returned. :param context: a string of the module's context. When None, all contexts will be returned. :kwarg strict: Normally this function returns [] if no module can be found. If strict=True, then a UnprocessableEntity is raised. :return: List of Modulemd metadata instances matching the query """ with models.make_session(self.config) as session: if version and context: builds = [models.ModuleBuild.get_build_from_nsvc( session, name, stream, version, context)] elif not version and not context: builds = models.ModuleBuild.get_last_builds_in_stream( session, name, stream) else: raise NotImplemented( "This combination of name/stream/version/context is not implemented") if not builds and strict: raise UnprocessableEntity( > "Cannot find any module builds for %s:%s" % (name, stream)) E UnprocessableEntity: Cannot find any module builds for foo:-2 module_build_service/resolver/DBResolver.py:65: UnprocessableEntity --------------------------- Captured stderr teardown --------------------------- 2018-07-05 12:18:02,482 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ---------------------------- Captured log teardown ----------------------------- general.py 301 INFO Module platform:f28:3:00000000 imported TestUtilsModuleStreamExpansion.test_get_required_modules_simple[requires4-build_requires4-expected4] self = requires = {}, build_requires = {'foo': ['-2'], 'gtk': ['-2']} expected = ['foo:1:0:c2', 'foo:1:0:c3', 'platform:f29:0:c11', 'platform:f28:0:c10', 'gtk:1:0:c2', 'gtk:1:0:c3'] @pytest.mark.parametrize('requires,build_requires,expected', [ ({}, {"gtk": ["1", "2"]}, ['platform:f29:0:c11', 'gtk:2:0:c4', 'gtk:2:0:c5', 'platform:f28:0:c10', 'gtk:1:0:c2', 'gtk:1:0:c3']), ({}, {"gtk": ["1"], "foo": ["1"]}, ['platform:f28:0:c10', 'gtk:1:0:c2', 'gtk:1:0:c3', 'foo:1:0:c2', 'foo:1:0:c3', 'platform:f29:0:c11']), ({}, {"gtk": ["1"], "foo": ["1"], "platform": ["f28"]}, ['platform:f28:0:c10', 'gtk:1:0:c2', 'gtk:1:0:c3', 'foo:1:0:c2', 'foo:1:0:c3', 'platform:f29:0:c11']), ([{}, {}], [{"gtk": ["1"], "foo": ["1"]}, {"gtk": ["2"], "foo": ["2"]}], ['foo:1:0:c2', 'foo:1:0:c3', 'foo:2:0:c4', 'foo:2:0:c5', 'platform:f28:0:c10', 'platform:f29:0:c11', 'gtk:1:0:c2', 'gtk:1:0:c3', 'gtk:2:0:c4', 'gtk:2:0:c5']), ({}, {"gtk": ["-2"], "foo": ["-2"]}, ['foo:1:0:c2', 'foo:1:0:c3', 'platform:f29:0:c11', 'platform:f28:0:c10', 'gtk:1:0:c2', 'gtk:1:0:c3']), ({}, {"gtk": ["-1", "1"], "foo": ["-2", "1"]}, ['foo:1:0:c2', 'foo:1:0:c3', 'platform:f29:0:c11', 'platform:f28:0:c10', 'gtk:1:0:c2', 'gtk:1:0:c3']), ]) def test_get_required_modules_simple(self, requires, build_requires, expected): module_build = self._make_module("app:1:0:c1", requires, build_requires) self._generate_default_modules() > nsvcs = self._get_mmds_required_by_module_recursively(module_build) tests/test_utils/test_utils_mse.py:351: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_utils/test_utils_mse.py:120: in _get_mmds_required_by_module_recursively db.session, mmd) module_build_service/utils/mse.py:207: in get_mmds_required_by_module_recursively raise_if_stream_ambigous) module_build_service/utils/mse.py:159: in _get_mmds_from_requires mmds[ns] = resolver.get_module_modulemds(name, stream, strict=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'foo', stream = '-2', version = None, context = None, strict = True def get_module_modulemds(self, name, stream, version=None, context=None, strict=False): """ Gets the module modulemds from the resolver. :param name: a string of the module's name :param stream: a string of the module's stream :param version: a string or int of the module's version. When None, latest version will be returned. :param context: a string of the module's context. When None, all contexts will be returned. :kwarg strict: Normally this function returns [] if no module can be found. If strict=True, then a UnprocessableEntity is raised. :return: List of Modulemd metadata instances matching the query """ with models.make_session(self.config) as session: if version and context: builds = [models.ModuleBuild.get_build_from_nsvc( session, name, stream, version, context)] elif not version and not context: builds = models.ModuleBuild.get_last_builds_in_stream( session, name, stream) else: raise NotImplemented( "This combination of name/stream/version/context is not implemented") if not builds and strict: raise UnprocessableEntity( > "Cannot find any module builds for %s:%s" % (name, stream)) E UnprocessableEntity: Cannot find any module builds for foo:-2 module_build_service/resolver/DBResolver.py:65: UnprocessableEntity --------------------------- Captured stderr teardown --------------------------- 2018-07-05 12:18:02,852 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ---------------------------- Captured log teardown ----------------------------- general.py 301 INFO Module platform:f28:3:00000000 imported TestUtilsModuleStreamExpansion.test_get_required_modules_simple[requires5-build_requires5-expected5] self = requires = {}, build_requires = {'foo': ['-2', '1'], 'gtk': ['-1', '1']} expected = ['foo:1:0:c2', 'foo:1:0:c3', 'platform:f29:0:c11', 'platform:f28:0:c10', 'gtk:1:0:c2', 'gtk:1:0:c3'] @pytest.mark.parametrize('requires,build_requires,expected', [ ({}, {"gtk": ["1", "2"]}, ['platform:f29:0:c11', 'gtk:2:0:c4', 'gtk:2:0:c5', 'platform:f28:0:c10', 'gtk:1:0:c2', 'gtk:1:0:c3']), ({}, {"gtk": ["1"], "foo": ["1"]}, ['platform:f28:0:c10', 'gtk:1:0:c2', 'gtk:1:0:c3', 'foo:1:0:c2', 'foo:1:0:c3', 'platform:f29:0:c11']), ({}, {"gtk": ["1"], "foo": ["1"], "platform": ["f28"]}, ['platform:f28:0:c10', 'gtk:1:0:c2', 'gtk:1:0:c3', 'foo:1:0:c2', 'foo:1:0:c3', 'platform:f29:0:c11']), ([{}, {}], [{"gtk": ["1"], "foo": ["1"]}, {"gtk": ["2"], "foo": ["2"]}], ['foo:1:0:c2', 'foo:1:0:c3', 'foo:2:0:c4', 'foo:2:0:c5', 'platform:f28:0:c10', 'platform:f29:0:c11', 'gtk:1:0:c2', 'gtk:1:0:c3', 'gtk:2:0:c4', 'gtk:2:0:c5']), ({}, {"gtk": ["-2"], "foo": ["-2"]}, ['foo:1:0:c2', 'foo:1:0:c3', 'platform:f29:0:c11', 'platform:f28:0:c10', 'gtk:1:0:c2', 'gtk:1:0:c3']), ({}, {"gtk": ["-1", "1"], "foo": ["-2", "1"]}, ['foo:1:0:c2', 'foo:1:0:c3', 'platform:f29:0:c11', 'platform:f28:0:c10', 'gtk:1:0:c2', 'gtk:1:0:c3']), ]) def test_get_required_modules_simple(self, requires, build_requires, expected): module_build = self._make_module("app:1:0:c1", requires, build_requires) self._generate_default_modules() > nsvcs = self._get_mmds_required_by_module_recursively(module_build) tests/test_utils/test_utils_mse.py:351: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_utils/test_utils_mse.py:120: in _get_mmds_required_by_module_recursively db.session, mmd) module_build_service/utils/mse.py:207: in get_mmds_required_by_module_recursively raise_if_stream_ambigous) module_build_service/utils/mse.py:159: in _get_mmds_from_requires mmds[ns] = resolver.get_module_modulemds(name, stream, strict=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'foo', stream = '-2', version = None, context = None, strict = True def get_module_modulemds(self, name, stream, version=None, context=None, strict=False): """ Gets the module modulemds from the resolver. :param name: a string of the module's name :param stream: a string of the module's stream :param version: a string or int of the module's version. When None, latest version will be returned. :param context: a string of the module's context. When None, all contexts will be returned. :kwarg strict: Normally this function returns [] if no module can be found. If strict=True, then a UnprocessableEntity is raised. :return: List of Modulemd metadata instances matching the query """ with models.make_session(self.config) as session: if version and context: builds = [models.ModuleBuild.get_build_from_nsvc( session, name, stream, version, context)] elif not version and not context: builds = models.ModuleBuild.get_last_builds_in_stream( session, name, stream) else: raise NotImplemented( "This combination of name/stream/version/context is not implemented") if not builds and strict: raise UnprocessableEntity( > "Cannot find any module builds for %s:%s" % (name, stream)) E UnprocessableEntity: Cannot find any module builds for foo:-2 module_build_service/resolver/DBResolver.py:65: UnprocessableEntity --------------------------- Captured stderr teardown --------------------------- 2018-07-05 12:18:02,926 - MainThread - module_build_service - INFO - Module platform:f28:3:00000000 imported ---------------------------- Captured log teardown ----------------------------- general.py 301 INFO Module platform:f28:3:00000000 imported =============================== warnings summary =============================== tests/test_build/test_build.py::TestBuild::()::test_submit_build[1] /usr/lib/python2.7/site-packages/flask/sessions.py:208: UserWarning: "localhost" is not a valid cookie domain, it must contain a ".". Add an entry to your hosts file, for example "localhost.localdomain", and use that instead. ' "{rv}.localdomain", and use that instead.'.format(rv=rv) -- Docs: http://doc.pytest.org/en/latest/warnings.html ============== 21 failed, 278 passed, 1 warnings in 24.37 seconds ============== ERROR: InvocationError for command '/usr/bin/py.test -v' (exited with code 1) ___________________________________ summary ____________________________________ flake8: commands succeeded ERROR: py27: commands failed