[copr/copr] branch master updated (263e882 -> 175ee7f)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to branch master
in repository copr/copr.
from 263e882 Automatic commit of package [copr-backend] release [1.133-1].
new 5c96693 Automatic commit of package [python-copr] release [1.102-1].
new 352b2b7 Automatic commit of package [copr-cli] release [1.87-1].
new 175ee7f Automatic commit of package [copr-frontend] release [1.165-1].
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.tito/packages/copr-cli | 2 +-
.tito/packages/copr-frontend | 2 +-
.tito/packages/python-copr | 2 +-
cli/copr-cli.spec | 5 ++++-
cli/setup.py | 2 +-
frontend/copr-frontend.spec | 33 ++++++++++++++++++++++++++++++++-
python/python-copr.spec | 6 +++++-
python/setup.py | 2 +-
8 files changed, 46 insertions(+), 8 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[copr/copr] annotated tag copr-backend-1.133-1 created (now db80157)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to annotated tag copr-backend-1.133-1
in repository copr/copr.
at db80157 (tag)
tagging 263e8820220c157dbc44fb37e5bc886c1801a261 (commit)
replaces python-copr-common-0.7-1
by Pavel Raiskup
on Tue Jun 9 14:51:28 2020 +0200
- Log -----------------------------------------------------------------
Tagging package [copr-backend] version [copr-backend-1.133-1] in directory [backend/].
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new bab80a2 Automatic commit of package [python-copr-common] release [0.8-1].
new 263e882 Automatic commit of package [copr-backend] release [1.133-1].
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[copr/copr] branch master updated (6f37360 -> 263e882)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to branch master
in repository copr/copr.
from 6f37360 Automatic commit of package [copr-rpmbuild] release [0.39-1].
new bab80a2 Automatic commit of package [python-copr-common] release [0.8-1].
new 263e882 Automatic commit of package [copr-backend] release [1.133-1].
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.tito/packages/copr-backend | 2 +-
.tito/packages/python-copr-common | 2 +-
backend/copr-backend.spec | 21 ++++++++++++++++++++-
backend/setup.py | 2 +-
common/python-copr-common.spec | 5 ++++-
common/setup.py | 2 +-
6 files changed, 28 insertions(+), 6 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[copr/copr] tag copr-rpmbuild-0.39-1 created (now 6f37360)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to tag copr-rpmbuild-0.39-1
in repository copr/copr.
at 6f37360 (commit)
No new revisions were added by this update.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[copr/copr] branch master updated (c3221a3 -> 6f37360)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to branch master
in repository copr/copr.
from c3221a3 frontend: return a user friendly error when modulemd is not ok
add 0eb6e0a backend: ignore exceptions in CancellableThreadTask
add 71541c8 common, backend: disable some PyLint warnings
add a3e3981 backend: don't modify logger record in handler
add c193000 backend: buggy error handler in pkg_name_evr()
add fd4cd2e backend: external blob tarball for unittests
add b7f71e1 backend: simplify and cover the build worker code
add 8cf376b backend, rpmbuild: delegate more work to builder
add 4e1245d frontend: more obvious links to live logs
add d81e71c backend: drop the VMM concept
add 571550f backend: drop cancel build action code
add 9b78bcb frontend: enable cov by default
add 0b3546a backend: fix SRPM/RPM detection from task json
add 5fd3ba4 backend: dump attempt to send message to backend.log
new 6f37360 Automatic commit of package [copr-rpmbuild] release [0.39-1].
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.gitignore | 4 +
.tito/library/builder.py | 36 +
.tito/packages/copr-rpmbuild | 2 +-
.tito/tito.props | 3 +-
backend/conf/copr-be.conf.example | 32 -
backend/copr-backend.spec | 11 +-
backend/copr_backend/actions.py | 55 +-
backend/copr_backend/background_worker.py | 9 +-
backend/copr_backend/background_worker_build.py | 751 ++++++++++++++++++
backend/copr_backend/cancellable_thread.py | 15 +-
backend/copr_backend/daemons/vm_master.py | 228 ------
backend/copr_backend/daemons/worker.py | 379 ---------
backend/copr_backend/exceptions.py | 17 +-
backend/copr_backend/helpers.py | 8 +-
backend/copr_backend/job.py | 27 +-
backend/copr_backend/mockremote/__init__.py | 330 --------
backend/copr_backend/mockremote/builder.py | 185 -----
backend/copr_backend/msgbus.py | 57 +-
backend/copr_backend/rpm_builds.py | 17 +-
backend/copr_backend/sshcmd.py | 107 ++-
backend/copr_backend/vm_manage/__init__.py | 39 -
backend/copr_backend/vm_manage/check.py | 65 --
backend/copr_backend/vm_manage/event_handle.py | 176 -----
backend/copr_backend/vm_manage/executor.py | 74 --
backend/copr_backend/vm_manage/manager.py | 458 -----------
backend/copr_backend/vm_manage/models.py | 76 --
backend/copr_backend/vm_manage/spawn.py | 142 ----
backend/copr_backend/vm_manage/terminate.py | 76 --
backend/docker/files/etc/supervisord.conf | 6 -
backend/run/cleanup_vm_nova.py | 159 ----
backend/run/copr-backend-process-build | 169 +---
backend/run/copr-repo | 15 +-
backend/run/copr_get_vm_info.py | 16 -
backend/run/copr_run_vmm.py | 56 --
backend/run_tests.sh | 18 +-
backend/tests/conftest.py | 3 +
backend/tests/daemons/test_dispatcher.py | 520 -------------
backend/tests/daemons/test_vm_master.py | 604 ---------------
backend/tests/fake-bin-sign | 5 +
backend/tests/mockremote/test_builder.py | 802 -------------------
backend/tests/mockremote/test_mockremote.py | 285 -------
backend/tests/test_background_worker_build.py | 860 +++++++++++++++++++++
backend/tests/test_helpers.py | 7 +-
backend/tests/testlib/__init__.py | 188 +++++
backend/tests/vm_manager/test_check.py | 176 -----
backend/tests/vm_manager/test_event_handle.py | 361 ---------
backend/tests/vm_manager/test_executor.py | 99 ---
backend/tests/vm_manager/test_manager.py | 442 -----------
backend/tests/vm_manager/test_spawn.py | 227 ------
backend/tests/vm_manager/test_terminate.py | 187 -----
backend/units/copr-backend-log.service | 4 +-
backend/units/copr-backend-vmm.service | 15 -
backend/units/copr-backend.target | 2 +-
common/copr_common/enums.py | 2 +
frontend/copr-frontend.spec | 1 +
frontend/coprs_frontend/coprs/models.py | 98 ++-
.../coprs/templates/coprs/detail/build.html | 21 +-
.../coprs/views/apiv3_ns/apiv3_builds.py | 2 +-
frontend/coprs_frontend/tests/test_models.py | 95 +++
frontend/run_tests.sh | 4 +-
rpmbuild/bin/copr-builder-cleanup | 42 +
rpmbuild/bin/copr-rpmbuild-cancel | 81 ++
rpmbuild/bin/copr-rpmbuild-log | 73 ++
rpmbuild/builder-hooks/cleanup/README | 2 +
rpmbuild/copr-rpmbuild.spec | 28 +-
65 files changed, 2524 insertions(+), 6530 deletions(-)
create mode 100644 .tito/library/builder.py
create mode 100644 backend/copr_backend/background_worker_build.py
delete mode 100644 backend/copr_backend/daemons/vm_master.py
delete mode 100644 backend/copr_backend/daemons/worker.py
delete mode 100644 backend/copr_backend/mockremote/__init__.py
delete mode 100644 backend/copr_backend/mockremote/builder.py
delete mode 100644 backend/copr_backend/vm_manage/__init__.py
delete mode 100644 backend/copr_backend/vm_manage/check.py
delete mode 100644 backend/copr_backend/vm_manage/event_handle.py
delete mode 100644 backend/copr_backend/vm_manage/executor.py
delete mode 100644 backend/copr_backend/vm_manage/manager.py
delete mode 100644 backend/copr_backend/vm_manage/models.py
delete mode 100644 backend/copr_backend/vm_manage/spawn.py
delete mode 100644 backend/copr_backend/vm_manage/terminate.py
delete mode 100755 backend/run/cleanup_vm_nova.py
delete mode 100755 backend/run/copr_get_vm_info.py
delete mode 100755 backend/run/copr_run_vmm.py
delete mode 100644 backend/tests/daemons/test_dispatcher.py
delete mode 100644 backend/tests/daemons/test_vm_master.py
create mode 100755 backend/tests/fake-bin-sign
delete mode 100644 backend/tests/mockremote/test_builder.py
delete mode 100644 backend/tests/mockremote/test_mockremote.py
create mode 100644 backend/tests/test_background_worker_build.py
delete mode 100644 backend/tests/vm_manager/test_check.py
delete mode 100644 backend/tests/vm_manager/test_event_handle.py
delete mode 100644 backend/tests/vm_manager/test_executor.py
delete mode 100644 backend/tests/vm_manager/test_manager.py
delete mode 100644 backend/tests/vm_manager/test_spawn.py
delete mode 100644 backend/tests/vm_manager/test_terminate.py
delete mode 100644 backend/units/copr-backend-vmm.service
create mode 100755 rpmbuild/bin/copr-builder-cleanup
create mode 100755 rpmbuild/bin/copr-rpmbuild-cancel
create mode 100755 rpmbuild/bin/copr-rpmbuild-log
create mode 100644 rpmbuild/builder-hooks/cleanup/README
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[copr/copr] branch master updated: frontend: return a user friendly
error when modulemd is not ok
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new c3221a3 frontend: return a user friendly error when modulemd is not ok
c3221a3 is described below
commit c3221a3f96ccd5f00023d495b0d0dd626c606285
Author: Jakub Kadlcik <frostyx(a)email.cz>
AuthorDate: Sun May 31 23:08:27 2020 +0200
frontend: return a user friendly error when modulemd is not ok
Fix #1382
Instead of a typical last-resort exception message
Error: Request wasn't successful, there is probably a bug in the API code
Print something more user-frinedly, e.g.
Error: Unsupported or malformed modulemd yaml - Missing required option
data.summary
Error: Invalid modulemd yaml - Provided YAML did not begin with
a module document
Error: Invalid modulemd yaml - Parser error
Merges: #1384
---
.../copr-cli-basic-operations/runtest-modules.sh | 6 ++++
.../coprs_frontend/coprs/logic/modules_logic.py | 23 ++++++++----
.../tests/test_logic/test_modules_logic.py | 42 ++++++++++++++++++++++
3 files changed, 64 insertions(+), 7 deletions(-)
diff --git a/beaker-tests/Sanity/copr-cli-basic-operations/runtest-modules.sh b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-modules.sh
index 4a987c0..77c0aa2 100755
--- a/beaker-tests/Sanity/copr-cli-basic-operations/runtest-modules.sh
+++ b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-modules.sh
@@ -102,6 +102,12 @@ rlJournalStart
sed -i "s/\$PLATFORM/$BRANCH/g" /tmp/testmodule.yaml
rlRun "copr-cli build-module --yaml /tmp/testmodule.yaml $PROJECT"
+ # Test submitting a wrong modulemd
+ OUTPUT=`mktemp`
+ touch "/tmp/emptyfile.yaml"
+ rlRun "copr-cli build-module --yaml /tmp/emptyfile.yaml $PROJECT &> $OUTPUT" 1
+ rlAssertEquals "Module in wrong format" `cat $OUTPUT | grep "Invalid modulemd yaml" |wc -l` 1
+
# Test module duplicity
# @FIXME the request sometimes hangs for some obscure reason
OUTPUT=`mktemp`
diff --git a/frontend/coprs_frontend/coprs/logic/modules_logic.py b/frontend/coprs_frontend/coprs/logic/modules_logic.py
index 5b95d72..2624b06 100644
--- a/frontend/coprs_frontend/coprs/logic/modules_logic.py
+++ b/frontend/coprs_frontend/coprs/logic/modules_logic.py
@@ -14,7 +14,7 @@ from wtforms import ValidationError
import gi
gi.require_version('Modulemd', '1.0')
-from gi.repository import Modulemd
+from gi.repository import Modulemd, GLib
class ModulesLogic(object):
@@ -51,15 +51,24 @@ class ModulesLogic(object):
@classmethod
def yaml2modulemd(cls, yaml):
- mmd = Modulemd.ModuleStream()
- mmd.import_from_string(yaml)
- return mmd
+ try:
+ mmd = Modulemd.ModuleStream()
+ mmd.import_from_string(yaml)
+ return mmd
+ except GLib.GError as ex:
+ # pylint: disable=no-member
+ raise exceptions.BadRequest("Invalid modulemd yaml - {0}" .format(ex.message))
@classmethod
def from_modulemd(cls, mmd):
- yaml_b64 = base64.b64encode(mmd.dumps().encode("utf-8")).decode("utf-8")
- return models.Module(name=mmd.get_name(), stream=mmd.get_stream(), version=mmd.get_version(),
- summary=mmd.get_summary(), description=mmd.get_description(), yaml_b64=yaml_b64)
+ try:
+ yaml_b64 = base64.b64encode(mmd.dumps().encode("utf-8")).decode("utf-8")
+ return models.Module(name=mmd.get_name(), stream=mmd.get_stream(),
+ version=mmd.get_version(), summary=mmd.get_summary(),
+ description=mmd.get_description(), yaml_b64=yaml_b64)
+ except GLib.GError as ex:
+ raise exceptions.BadRequest("Unsupported or malformed modulemd yaml - {0}"
+ .format(ex.message)) # pylint: disable=no-member
@classmethod
def validate(cls, mmd):
diff --git a/frontend/coprs_frontend/tests/test_logic/test_modules_logic.py b/frontend/coprs_frontend/tests/test_logic/test_modules_logic.py
index d5ecc63..7f386e7 100644
--- a/frontend/coprs_frontend/tests/test_logic/test_modules_logic.py
+++ b/frontend/coprs_frontend/tests/test_logic/test_modules_logic.py
@@ -66,6 +66,48 @@ class TestModulesLogic(CoprsTestCase):
ModulesLogic.get_by_nsv_str(self.c1, "notenough-dashes").one()
assert "not a valid NSV" in str(ex)
+ def test_yaml2modulemd(self):
+ # Test that valid yaml can be sucessfully converted to modulemd object
+ generator = ModulemdGenerator(name="testmodule", stream="master",
+ version=123, summary="some summary")
+ valid_yaml = generator.generate()
+ modulemd = ModulesLogic.yaml2modulemd(valid_yaml)
+ assert isinstance(modulemd, Modulemd.ModuleStream)
+
+ # Test a yaml with syntax error
+ invalid_yaml = valid_yaml.replace("name:", "name")
+ with pytest.raises(BadRequest) as ex:
+ ModulesLogic.yaml2modulemd(invalid_yaml)
+ assert "Invalid modulemd yaml - Parser error" in ex.value.message
+
+ # There is no validation in the yaml2modulemd method, therefore even yaml that
+ # doesn't contain all the necessary fields can be converted to the modulemd object
+ incomplete_yaml = valid_yaml.replace(" summary: some summary\n", "")
+ modulemd2 = ModulesLogic.yaml2modulemd(incomplete_yaml)
+ assert isinstance(modulemd2, Modulemd.ModuleStream)
+
+ # Test an empty string
+ with pytest.raises(BadRequest) as ex:
+ ModulesLogic.yaml2modulemd("")
+ assert ("Invalid modulemd yaml - "
+ "Provided YAML did not begin with a module document") in ex.value.message
+
+ def test_from_modulemd(self):
+ # Test that valid yaml can be sucessfully converted to modulemd object
+ generator = ModulemdGenerator(name="testmodule", stream="master",
+ version=123, summary="some summary")
+ valid_yaml = generator.generate()
+ modulemd = ModulesLogic.yaml2modulemd(valid_yaml)
+ mod1 = ModulesLogic.from_modulemd(modulemd)
+ assert isinstance(mod1, models.Module)
+
+ # Test a modulemd that is missing some required parameters
+ modulemd.set_summary(None)
+ with pytest.raises(BadRequest) as ex:
+ ModulesLogic.from_modulemd(modulemd)
+ assert ("Unsupported or malformed modulemd yaml - "
+ "Missing required option data.summary") in ex.value.message
+
class TestModuleBuildFacade(CoprsTestCase):
def test_get_build_batches(self):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[copr/copr] branch master updated (373a667 -> 4bc204d)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
msuchy pushed a change to branch master
in repository copr/copr.
from 373a667 doc: batcave moved to iad2
add 4bc204d cli: update man page regarding multi delete-build
No new revisions were added by this update.
Summary of changes:
cli/man/copr-cli.1.asciidoc | 7 +++++--
cli/man/copr-cli.cheat | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[copr/copr] branch master updated (b33b09c -> 373a667)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to branch master
in repository copr/copr.
from b33b09c docker: Remove symlink for python in backend
add 373a667 doc: batcave moved to iad2
No new revisions were added by this update.
Summary of changes:
doc/how_to_release_copr.rst | 4 ++--
doc/how_to_upgrade_builders.rst | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[copr/copr] branch master updated (e8f503c -> b33b09c)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to branch master
in repository copr/copr.
from e8f503c python: fix large recursion problem
add b33b09c docker: Remove symlink for python in backend
No new revisions were added by this update.
Summary of changes:
docker/backend/Dockerfile | 3 ---
1 file changed, 3 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months