[copr/copr] branch master updated: backend: build reattaching:
avoid doubled fc.update() call
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 6810dac backend: build reattaching: avoid doubled fc.update() call
6810dac is described below
commit 6810dacac53eed8bb291b030b6633ba5ec7977de
Author: Pavel Raiskup <praiskup(a)redhat.com>
AuthorDate: Thu Nov 21 14:50:22 2019 +0100
backend: build reattaching: avoid doubled fc.update() call
For each reattached build we called mark_running twice, this both caused
doubled 'starting build: %s' log info message and calls to frontend via
fc.update() (the second one was just wasting of traffic).
Move the 'self.reattach' condition to _announce_start so it is easier to
understand and always call _announce_start() ASAP in Worker.run() (no
matter we reattach or not).
While we are on it, rename mark_running to internal _mark_running.
Merges: #1116
---
backend/backend/daemons/build_dispatcher.py | 1 -
backend/backend/daemons/worker.py | 13 +++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/backend/backend/daemons/build_dispatcher.py b/backend/backend/daemons/build_dispatcher.py
index 38c3eab..ccfe823 100644
--- a/backend/backend/daemons/build_dispatcher.py
+++ b/backend/backend/daemons/build_dispatcher.py
@@ -166,7 +166,6 @@ class BuildDispatcher(multiprocessing.Process):
if vm and vm.state == 'in_use':
self.log.info("Reattaching to VM: "+str(vm))
worker = self.start_worker(vm, job, reattach=True)
- worker.mark_running(job)
vm.store_field(self.vm_manager.rc, "used_by_worker", worker.worker_id)
self.log.info("Reattached new worker %s for job %s",
worker.worker_id, worker.job.task_id)
diff --git a/backend/backend/daemons/worker.py b/backend/backend/daemons/worker.py
index cd42a98..f679a1a 100644
--- a/backend/backend/daemons/worker.py
+++ b/backend/backend/daemons/worker.py
@@ -67,7 +67,11 @@ class Worker(multiprocessing.Process):
"""
Announce everywhere that a build process started now.
"""
- self.mark_running(job)
+ self._mark_running(job)
+
+ # the message has been sent before, stop now
+ if self.reattach:
+ return
for topic in ['build.start', 'chroot.start']:
self._announce(topic, job)
@@ -82,7 +86,7 @@ class Worker(multiprocessing.Process):
self.log.info("worker finished build: %s", self.vm.vm_ip)
self._announce('build.end', job)
- def mark_running(self, job):
+ def _mark_running(self, job):
"""
Send data about started build to the frontend
"""
@@ -159,10 +163,7 @@ class Worker(multiprocessing.Process):
self.update_process_title(suffix="Task: {} chroot: {} build running"
.format(job.build_id, job.chroot))
- if not self.reattach:
- self._announce_start(job)
- else:
- self.mark_running(job)
+ self._announce_start(job)
# setup our target dir locally
if not os.path.exists(job.chroot_dir):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 4 months
[copr/copr] branch master updated: doc: fixup reference to
copr-builder-image-prepare-cloud.sh
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 7c52a91 doc: fixup reference to copr-builder-image-prepare-cloud.sh
7c52a91 is described below
commit 7c52a913391ad96f051d5be3670dd34248c8d22f
Author: Pavel Raiskup <praiskup(a)redhat.com>
AuthorDate: Wed Nov 20 15:39:41 2019 +0100
doc: fixup reference to copr-builder-image-prepare-cloud.sh
That script now prepares both OpenStack and AWS images.
Merges: #1111
---
doc/how_to_upgrade_builders.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/how_to_upgrade_builders.rst b/doc/how_to_upgrade_builders.rst
index 26de914..04d0ba6 100644
--- a/doc/how_to_upgrade_builders.rst
+++ b/doc/how_to_upgrade_builders.rst
@@ -83,7 +83,7 @@ Prepare VM for snapshot
Open a ssh connection to ``copr-be-dev.cloud.fedoraproject.org`` and run::
# su - copr
- $ copr-builder-image-prepare-os.sh x86_64 # or ppc64le
+ $ copr-builder-image-prepare-cloud.sh os:x86_64 # or ppc64le
... snip ...
TASK [disable offloading] *****************************************************
Wednesday 14 August 2019 13:31:27 +0000 (0:00:05.603) 0:03:47.402 ******
@@ -101,7 +101,7 @@ where the problem is - fix the following playbook files::
Repeat the fixing of playbooks till the script finishes properly::
- $ copr-builder-image-prepare-os.sh x86_64
+ $ copr-builder-image-prepare-cloud.sh os:x86_64
... see the output instructions ...
TASK [disable offloading] *****************************************************
Wednesday 14 August 2019 13:31:27 +0000 (0:00:05.603) 0:03:47.402 ******
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 4 months
[copr/copr] branch master updated (6300d24 -> 4b3077f)
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 6300d24 rpmbuild: add qemu-user-static for building armhfp
add 4b3077f backend: fixup systemd unit ordering
No new revisions were added by this update.
Summary of changes:
backend/units/copr-backend-action.service | 1 -
backend/units/copr-backend-build.service | 1 -
backend/units/copr-backend-log.service | 4 +++-
backend/units/copr-backend-vmm.service | 1 -
backend/units/copr-backend.service | 3 +++
5 files changed, 6 insertions(+), 4 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 4 months
[copr/copr] branch master updated: rpmbuild: add qemu-user-static
for building armhfp
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 6300d24 rpmbuild: add qemu-user-static for building armhfp
6300d24 is described below
commit 6300d2426af867eb6e2afc0539eafa617c34995e
Author: Dominik Turecek <dturecek(a)redhat.com>
AuthorDate: Mon Nov 18 15:00:24 2019 +0100
rpmbuild: add qemu-user-static for building armhfp
Merges: #1109
---
beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh | 5 +++++
rpmbuild/copr-rpmbuild.spec | 1 +
2 files changed, 6 insertions(+)
diff --git a/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh b/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh
index 6419cd4..6314708 100755
--- a/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh
+++ b/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh
@@ -536,6 +536,10 @@ rlJournalStart
# delete - wrong project name
rlRun "copr-cli delete ${NAME_PREFIX}wrong-name" 1
+
+ # test building for armhfp
+ rlRun "copr-cli create --chroot fedora-$FEDORA_VERSION-armhfp ${NAME_PREFIX}ArmhfpBuild"
+ rlRun "copr-cli build ${NAME_PREFIX}ArmhfpBuild $HELLO"
rlPhaseEnd
rlPhaseStartCleanup
@@ -565,6 +569,7 @@ rlJournalStart
cleanProject "${NAME_PREFIX}TestBug1444804"
cleanProject "${NAME_PREFIX}BootstrapProject"
cleanProject "${NAME_PREFIX}CoprDirTest"
+ cleanProject "${NAME_PREFIX}ArmhfpBuild"
# and make sure we haven't left any mess
rlRun "copr-cli list | grep $NAME_PREFIX" 1
diff --git a/rpmbuild/copr-rpmbuild.spec b/rpmbuild/copr-rpmbuild.spec
index 48d8119..cd1be4f 100644
--- a/rpmbuild/copr-rpmbuild.spec
+++ b/rpmbuild/copr-rpmbuild.spec
@@ -61,6 +61,7 @@ Requires: git
Requires: git-svn
# for the /bin/unbuffer binary
Requires: expect
+Requires: qemu-user-static
%if 0%{?fedora} || 0%{?rhel} > 7
Recommends: rpkg
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 5 months
[copr/copr] branch master updated: frontend: add manage.py 'shell'
command and 'run'
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 3f91fbf frontend: add manage.py 'shell' command and 'run'
3f91fbf is described below
commit 3f91fbf96835a117ed3a49fb1286e7de3b58057b
Author: Pavel Raiskup <praiskup(a)redhat.com>
AuthorDate: Wed Nov 13 08:18:18 2019 +0100
frontend: add manage.py 'shell' command and 'run'
But still keep the 'runserver' backward compatibility command, it is
mentioned in docs and blog posts.
Merges: #1107
Relates: #1100
---
frontend/coprs_frontend/commands/flask3_wrapper.py | 33 ++++++++++++++++++++++
frontend/coprs_frontend/commands/runserver.py | 25 ----------------
frontend/coprs_frontend/manage.py | 7 +++--
3 files changed, 38 insertions(+), 27 deletions(-)
diff --git a/frontend/coprs_frontend/commands/flask3_wrapper.py b/frontend/coprs_frontend/commands/flask3_wrapper.py
new file mode 100644
index 0000000..2127e1a
--- /dev/null
+++ b/frontend/coprs_frontend/commands/flask3_wrapper.py
@@ -0,0 +1,33 @@
+import click
+import os
+import subprocess
+import sys
+
+# keep backward compat with old flask's manage.py API
+map_flask_commands = {'runserver': 'run'}
+
+def function(ctx, args):
+ cmd = ctx.info_name
+ arguments = ['flask-3', map_flask_commands.get(cmd, cmd)]
+ arguments.extend(list(args))
+ if 'PYTHONPATH' in os.environ:
+ os.environ['PYTHONPATH'] += ":/usr/share/copr/coprs_frontend/"
+ else:
+ os.environ['PYTHONPATH'] = "/usr/share/copr/coprs_frontend/"
+ os.environ['FLASK_APP'] = "coprs:app"
+ sys.exit(subprocess.call(arguments))
+
+def get_flask_wrapper_command(name):
+ argument = click.Argument(['args'], nargs=-1, type=click.UNPROCESSED)
+ command = click.Command(
+ name,
+ context_settings=dict(ignore_unknown_options=True, help_option_names=[]),
+ callback=click.pass_context(function),
+ params=[argument],
+ help='Wrapper around "/bin/flask-3 {}" command'.format(
+ map_flask_commands.get(name, name)),
+ )
+ if hasattr(command, 'hidden'):
+ # available on f30+ only (click v7.0)
+ command.hidden = name in map_flask_commands
+ return command
diff --git a/frontend/coprs_frontend/commands/runserver.py b/frontend/coprs_frontend/commands/runserver.py
deleted file mode 100644
index d80c4bb..0000000
--- a/frontend/coprs_frontend/commands/runserver.py
+++ /dev/null
@@ -1,25 +0,0 @@
-import click
-import os
-import subprocess
-import sys
-
-"""
-Runs local server
-"""
-(a)click.command(context_settings=dict(
- ignore_unknown_options=True,
-))
-(a)click.argument(
- 'args',
- nargs=-1,
- type=click.UNPROCESSED
-)
-def runserver(args):
- arguments = ['flask-3', 'run']
- arguments.extend(list(args))
- if 'PYTHONPATH' in os.environ:
- os.environ['PYTHONPATH'] += ":/usr/share/copr/coprs_frontend/"
- else:
- os.environ['PYTHONPATH'] = "/usr/share/copr/coprs_frontend/"
- os.environ['FLASK_APP'] = "coprs:app"
- subprocess.check_call(arguments)
diff --git a/frontend/coprs_frontend/manage.py b/frontend/coprs_frontend/manage.py
index 921b2ac..ce075c3 100755
--- a/frontend/coprs_frontend/manage.py
+++ b/frontend/coprs_frontend/manage.py
@@ -6,7 +6,7 @@ import sys
import pipes
import importlib
import click
-import commands.runserver
+from commands.flask3_wrapper import get_flask_wrapper_command
import commands.test
import commands.create_sqlite_file
import commands.create_db
@@ -45,7 +45,6 @@ if os.getuid() == 0:
commands_list = [
# General commands
- "runserver",
"test",
# Database commands
@@ -88,5 +87,9 @@ for command in commands_list:
command_func = getattr(getattr(commands, command), command)
app.cli.add_command(command_func)
+app.cli.add_command(get_flask_wrapper_command('runserver'))
+app.cli.add_command(get_flask_wrapper_command('run'))
+app.cli.add_command(get_flask_wrapper_command('shell'))
+
if __name__ == "__main__":
app.cli()
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 5 months
[copr/copr] branch master updated (559db8c -> 1ede6ea)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
frostyx pushed a change to branch master
in repository copr/copr.
from 559db8c frontend: fix broken branch-fedora command
add 150a2ab frontend: move `generate_build_config' from helpers to complex_logic
add 6acd8be frontend, rpmbuild: allow marking a project as module_hotfixes
add 4cc6b12 cli: module_hotfixes support for copr mock-config command
add cbd5da5 frontend, cli, python: add APIv3 support for module_hotfixes
add 1ede6ea beaker-tests-sanity: add tests for module_hotfixes setting
No new revisions were added by this update.
Summary of changes:
.../runtest-module-hotfixes.sh | 82 ++++++++++++++++++++++
cli/copr_cli/build_config.py | 3 +
cli/copr_cli/main.py | 8 +++
cli/tests/test_cli.py | 2 +
...4df3bbb_add_module_hotfixes_column_for_copr_.py | 20 ++++++
frontend/coprs_frontend/coprs/forms.py | 8 +++
frontend/coprs_frontend/coprs/helpers.py | 71 ++++---------------
.../coprs_frontend/coprs/logic/complex_logic.py | 77 ++++++++++++++++++++
frontend/coprs_frontend/coprs/models.py | 1 +
.../coprs/templates/coprs/_coprs_forms.html | 1 +
.../coprs/templates/coprs/copr_dir.repo | 3 +
.../coprs/views/api_ns/api_general.py | 6 +-
.../coprs/views/apiv3_ns/apiv3_build_chroots.py | 6 +-
.../coprs/views/apiv3_ns/apiv3_project_chroots.py | 7 +-
.../coprs/views/apiv3_ns/apiv3_projects.py | 2 +
.../coprs/views/backend_ns/backend_general.py | 4 +-
.../coprs/views/coprs_ns/coprs_general.py | 1 +
python/copr/v3/proxies/project.py | 10 ++-
rpmbuild/mock.cfg.j2 | 6 ++
19 files changed, 245 insertions(+), 73 deletions(-)
create mode 100755 beaker-tests/Sanity/copr-cli-basic-operations/runtest-module-hotfixes.sh
create mode 100644 frontend/coprs_frontend/alembic/schema/versions/4ed794df3bbb_add_module_hotfixes_column_for_copr_.py
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 5 months
[copr/copr] branch master updated: frontend: fix broken
branch-fedora command
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 559db8c frontend: fix broken branch-fedora command
559db8c is described below
commit 559db8c169e8dfd8a3888d1b277860f2d80c99a0
Author: Tomas Hrnciar <thrnciar(a)redhat.com>
AuthorDate: Tue Nov 12 09:30:27 2019 +0100
frontend: fix broken branch-fedora command
Merges: #1105
Fixes: #1101
---
frontend/coprs_frontend/commands/branch_fedora.py | 8 ++++----
frontend/coprs_frontend/commands/rawhide_to_release.py | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/frontend/coprs_frontend/commands/branch_fedora.py b/frontend/coprs_frontend/commands/branch_fedora.py
index 3d11b0f..31da536 100644
--- a/frontend/coprs_frontend/commands/branch_fedora.py
+++ b/frontend/coprs_frontend/commands/branch_fedora.py
@@ -1,8 +1,8 @@
import click
from coprs.logic import coprs_logic
-from commands.create_chroot import create_chroot
-from commands.rawhide_to_release import rawhide_to_release
+from commands.create_chroot import create_chroot_function
+from commands.rawhide_to_release import rawhide_to_release_function
@click.command()
@@ -30,7 +30,7 @@ def branch_fedora(fedora_version, branch=None):
for rch in rawhide_chroots
}
- create_chroot(chroot_pairs.keys(), branch, True)
+ create_chroot_function(chroot_pairs.keys(), branch, True)
for new_chroot, rawhide_chroot in chroot_pairs.items():
- rawhide_to_release(rawhide_chroot, new_chroot)
+ rawhide_to_release_function(rawhide_chroot, new_chroot)
diff --git a/frontend/coprs_frontend/commands/rawhide_to_release.py b/frontend/coprs_frontend/commands/rawhide_to_release.py
index a5ca187..87e2bb5 100644
--- a/frontend/coprs_frontend/commands/rawhide_to_release.py
+++ b/frontend/coprs_frontend/commands/rawhide_to_release.py
@@ -22,6 +22,9 @@ def rawhide_to_release(rawhide_chroot, dest_chroot):
"""
Branching
"""
+ return rawhide_to_release_function(rawhide_chroot, dest_chroot)
+
+def rawhide_to_release_function(rawhide_chroot, dest_chroot):
mock_chroot = coprs_logic.MockChrootsLogic.get_from_name(dest_chroot).first()
if not mock_chroot:
print("Given chroot does not exist. Please run:")
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 5 months
[copr/copr] branch master updated: frontend: adds missing help for
some commands
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 36e2ac6 frontend: adds missing help for some commands
36e2ac6 is described below
commit 36e2ac6eb5645768ec24b58829d2349c065ae656
Author: Tomas Hrnciar <thrnciar(a)redhat.com>
AuthorDate: Wed Nov 13 09:11:52 2019 +0100
frontend: adds missing help for some commands
Fixes: #1100
Merges: #1106
---
frontend/coprs_frontend/commands/alter_user.py | 3 +++
frontend/coprs_frontend/commands/create_db.py | 6 +++---
frontend/coprs_frontend/commands/create_sqlite_file.py | 9 ++++-----
frontend/coprs_frontend/commands/drop_db.py | 7 +++----
frontend/coprs_frontend/commands/dump_user.py | 3 +++
frontend/coprs_frontend/commands/get_admins.py | 3 +++
frontend/coprs_frontend/commands/rawhide_to_release.py | 3 +++
frontend/coprs_frontend/commands/test.py | 3 +++
8 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/frontend/coprs_frontend/commands/alter_user.py b/frontend/coprs_frontend/commands/alter_user.py
index 870d498..da4e404 100644
--- a/frontend/coprs_frontend/commands/alter_user.py
+++ b/frontend/coprs_frontend/commands/alter_user.py
@@ -8,6 +8,9 @@ from coprs import models
@click.option('--proven/--no-proven', default=False)
@click.option('--proxy/--no-proxy', default=False)
def alter_user(name, admin, proven, proxy):
+ """
+ Alter user data
+ """
user = models.User.query.filter(
models.User.username == name).first()
if not user:
diff --git a/frontend/coprs_frontend/commands/create_db.py b/frontend/coprs_frontend/commands/create_db.py
index 36c101e..f0f929c 100644
--- a/frontend/coprs_frontend/commands/create_db.py
+++ b/frontend/coprs_frontend/commands/create_db.py
@@ -4,9 +4,6 @@ from commands.create_sqlite_file import create_sqlite_file_function
import click
-"""
-Create the DB schema
-"""
@click.command()
@click.option(
"--alembic", "-f", "alembic_ini",
@@ -14,6 +11,9 @@ Create the DB schema
required=True
)
def create_db(alembic_ini):
+ """
+ Create the DB schema
+ """
create_sqlite_file_function()
db.create_all()
# load the Alembic configuration and generate the
diff --git a/frontend/coprs_frontend/commands/create_sqlite_file.py b/frontend/coprs_frontend/commands/create_sqlite_file.py
index 6485c0b..1df0887 100644
--- a/frontend/coprs_frontend/commands/create_sqlite_file.py
+++ b/frontend/coprs_frontend/commands/create_sqlite_file.py
@@ -3,11 +3,6 @@ import flask
import click
-"""
-Create the sqlite DB file (not the tables).
-Used for alembic, "create-db" does this automatically.
-"""
-
def create_sqlite_file_function():
if flask.current_app.config["SQLALCHEMY_DATABASE_URI"].startswith("sqlite"):
# strip sqlite:///
@@ -18,4 +13,8 @@ def create_sqlite_file_function():
@click.command()
def create_sqlite_file():
+ """
+ Create the sqlite DB file (not the tables).
+ Used for alembic, "create-db" does this automatically.
+ """
return create_sqlite_file()
diff --git a/frontend/coprs_frontend/commands/drop_db.py b/frontend/coprs_frontend/commands/drop_db.py
index 62b82ac..a54a660 100644
--- a/frontend/coprs_frontend/commands/drop_db.py
+++ b/frontend/coprs_frontend/commands/drop_db.py
@@ -2,10 +2,9 @@ from coprs import db
import click
-"""
-Delete DB
-"""
-
@click.command()
def drop_db():
+ """
+ Delete DB
+ """
db.drop_all()
diff --git a/frontend/coprs_frontend/commands/dump_user.py b/frontend/coprs_frontend/commands/dump_user.py
index dc8e2bd..167549a 100644
--- a/frontend/coprs_frontend/commands/dump_user.py
+++ b/frontend/coprs_frontend/commands/dump_user.py
@@ -5,6 +5,9 @@ from coprs.logic import users_logic
@click.command()
@click.argument("username")
def dump_user(username):
+ """
+ Dump user
+ """
user = models.User.query.filter(models.User.username == username).first()
if not user:
print("There is no user named {0}.".format(username))
diff --git a/frontend/coprs_frontend/commands/get_admins.py b/frontend/coprs_frontend/commands/get_admins.py
index f54708a..03647bb 100644
--- a/frontend/coprs_frontend/commands/get_admins.py
+++ b/frontend/coprs_frontend/commands/get_admins.py
@@ -3,5 +3,8 @@ from coprs import models
@click.command()
def get_admins():
+ """
+ Display list of admins
+ """
for u in models.User.query.filter(models.User.admin == True).all():
print(u.username)
diff --git a/frontend/coprs_frontend/commands/rawhide_to_release.py b/frontend/coprs_frontend/commands/rawhide_to_release.py
index a650f54..a5ca187 100644
--- a/frontend/coprs_frontend/commands/rawhide_to_release.py
+++ b/frontend/coprs_frontend/commands/rawhide_to_release.py
@@ -19,6 +19,9 @@ from coprs.logic import coprs_logic, actions_logic, builds_logic, packages_logic
required=True
)
def rawhide_to_release(rawhide_chroot, dest_chroot):
+ """
+ Branching
+ """
mock_chroot = coprs_logic.MockChrootsLogic.get_from_name(dest_chroot).first()
if not mock_chroot:
print("Given chroot does not exist. Please run:")
diff --git a/frontend/coprs_frontend/commands/test.py b/frontend/coprs_frontend/commands/test.py
index 5d5fed4..e5600b8 100644
--- a/frontend/coprs_frontend/commands/test.py
+++ b/frontend/coprs_frontend/commands/test.py
@@ -12,6 +12,9 @@ import click
)
def test(coverage, arguments):
+ """
+ Runs tests
+ """
os.environ["COPRS_ENVIRON_UNITTEST"] = "1"
if not (("COPR_CONFIG" in os.environ) and os.environ["COPR_CONFIG"]):
os.environ["COPR_CONFIG"] = "/etc/copr/copr_unit_test.conf"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 5 months
[copr/copr] branch master updated: frontend: non-working SRPM
builder-live.log.gz link
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 6af1e7f frontend: non-working SRPM builder-live.log.gz link
6af1e7f is described below
commit 6af1e7f6896ce8cfa89e316b12f7fac6727f6553
Author: Silvie Chlupova <sisi.chlupova(a)gmail.com>
AuthorDate: Wed Oct 23 16:45:24 2019 +0200
frontend: non-working SRPM builder-live.log.gz link
Fixes: #1011
Merges: #1084
---
.../745250baedaf_new_column_resubmitted_from_id.py | 20 ++++++++++++++++++
.../coprs_frontend/coprs/logic/builds_logic.py | 2 ++
frontend/coprs_frontend/coprs/models.py | 13 ++++++++++++
.../coprs/templates/coprs/detail/build.html | 24 +++++++++++++++-------
4 files changed, 52 insertions(+), 7 deletions(-)
diff --git a/frontend/coprs_frontend/alembic/schema/versions/745250baedaf_new_column_resubmitted_from_id.py b/frontend/coprs_frontend/alembic/schema/versions/745250baedaf_new_column_resubmitted_from_id.py
new file mode 100644
index 0000000..4f834c3
--- /dev/null
+++ b/frontend/coprs_frontend/alembic/schema/versions/745250baedaf_new_column_resubmitted_from_id.py
@@ -0,0 +1,20 @@
+"""
+new column resubmitted_from_id
+
+Revision ID: 745250baedaf
+Revises: 0dbdd06fb850
+Create Date: 2019-11-11 11:15:05.399008
+"""
+
+import sqlalchemy as sa
+from alembic import op
+
+
+revision = '745250baedaf'
+down_revision = '0dbdd06fb850'
+
+def upgrade():
+ op.add_column('build', sa.Column('resubmitted_from_id', sa.Integer(), nullable=True))
+
+def downgrade():
+ op.drop_column('build', 'resubmitted_from_id')
diff --git a/frontend/coprs_frontend/coprs/logic/builds_logic.py b/frontend/coprs_frontend/coprs/logic/builds_logic.py
index e88eede..2830610 100644
--- a/frontend/coprs_frontend/coprs/logic/builds_logic.py
+++ b/frontend/coprs_frontend/coprs/logic/builds_logic.py
@@ -521,6 +521,8 @@ ORDER BY
srpm_url=source_build.srpm_url, copr_dirname=source_build.copr_dir.name, **build_options)
build.package_id = source_build.package_id
build.pkg_version = source_build.pkg_version
+ build.resubmitted_from_id = source_build.id
+
return build
@classmethod
diff --git a/frontend/coprs_frontend/coprs/models.py b/frontend/coprs_frontend/coprs/models.py
index 12d3884..2a0a2ae 100644
--- a/frontend/coprs_frontend/coprs/models.py
+++ b/frontend/coprs_frontend/coprs/models.py
@@ -874,6 +874,11 @@ class Build(db.Model, helpers.Serializer):
# used by webhook builds; e.g. github.com:praiskup, or pagure.io:jdoe
submitted_by = db.Column(db.Text)
+ # if a build was resubmitted from another build, this column will contain the original build id
+ # the original build id is not here as a foreign key because the original build can be deleted so we can lost
+ # the info that the build was resubmitted
+ resubmitted_from_id = db.Column(db.Integer)
+
@property
def user_name(self):
return self.user.name
@@ -1159,6 +1164,14 @@ class Build(db.Model, helpers.Serializer):
return '{0}--{1}'.format(self.copr.full_name, submitter)
+ @property
+ def resubmitted_from(self):
+ return Build.query.filter(Build.id == self.resubmitted_from_id).first()
+
+ @property
+ def source_is_uploaded(self):
+ return self.source_type == helpers.BuildSourceEnum('upload')
+
class DistGitBranch(db.Model, helpers.Serializer):
"""
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
index b799bff..d9ca866 100644
--- a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
+++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
@@ -164,16 +164,26 @@
<dl class="dl-horizontal">
{{ describe_failure(build) }}
<dt>SRPM build log:</dt>
- {% if build.source_status | state_from_num in ['pending', 'starting'] %}
- <dd> Build has not started yet </dd>
+ {% if build.source_status | state_from_num in ['pending', 'starting'] %}
+ <dd> Build has not started yet</dd>
+ {% else %}
+ {% if build.resubmitted_from and build.source_is_uploaded %}
+ <dd>Build resubmitted from build
+ {% if build.resubmitted_from %}
+ <a href="{{ copr_url('coprs_ns.copr_build', build.copr, build_id=build.resubmitted_from.id) }}">#{{ build.resubmitted_from.id }}</a>
+ {% else %}
+ #{{ build.resubmitted_from_id }}
+ {% endif %}
+ </dd>
{% else %}
- {% for url in build.get_import_log_urls(g.user.admin) %}
- <dd>
- <a href="{{ url }}">{{ url | basename }}</a>
+ {% for url in build.get_import_log_urls(g.user.admin) %}
+ <dd>
+ <a href="{{ url }}">{{ url | basename }}</a>
{{ "," if not loop.last }}
- </dd>
- {% endfor %}
+ </dd>
+ {% endfor %}
{% endif %}
+ {% endif %}
<dt> Built Packages:</dt>
{% if build.built_packages %}
{% for pkg in build.built_packages.split("\n"): %}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 5 months
[copr/copr] branch master updated (aef7d30 -> 1975d7e)
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 aef7d30 backend: run playbooks with timeout
add 1975d7e documentation update WRT underscore to dash change in arguments
No new revisions were added by this update.
Summary of changes:
beaker-tests/Regression/frontend/setup.sh | 2 +-
copr-setup.txt | 16 +++++++--------
doc/how_to_delete_outdated_chroots.rst | 18 ++++++++--------
doc/how_to_manage_chroots.rst | 24 +++++++++++-----------
docker/frontend/files/usr/bin/run.sh | 4 ++--
frontend/conf/cron.daily/copr-frontend | 6 +++---
frontend/conf/cron.daily/copr-frontend-optional | 4 ++--
frontend/conf/cron.hourly/copr-frontend | 4 ++--
frontend/coprs_frontend/commands/branch_fedora.py | 2 +-
frontend/coprs_frontend/commands/create_chroot.py | 2 +-
.../coprs_frontend/commands/create_sqlite_file.py | 2 +-
.../coprs_frontend/commands/rawhide_to_release.py | 2 +-
.../coprs/views/coprs_ns/coprs_general.py | 2 +-
frontend/coprs_frontend/run/copr-gdpr-sar.sh | 2 +-
14 files changed, 45 insertions(+), 45 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 5 months