[copr/copr] branch master updated: beaker-tests: increase timeout
for module test
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
frostyx pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new 8af7b31 beaker-tests: increase timeout for module test
8af7b31 is described below
commit 8af7b31503473491a1877280e37ae22d1366cade
Author: Dominik Turecek <dturecek(a)redhat.com>
AuthorDate: Thu Oct 24 14:28:37 2019 +0200
beaker-tests: increase timeout for module test
Fixes: #1046
Merges: #1085
---
beaker-tests/Sanity/copr-cli-basic-operations/runtest-modules.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 3269f65..29ad5a5 100755
--- a/beaker-tests/Sanity/copr-cli-basic-operations/runtest-modules.sh
+++ b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-modules.sh
@@ -113,7 +113,7 @@ rlJournalStart
# Test that module builds succeeded
PACKAGES=`mktemp`
- wait_for_finished_module "module-testmodule-beakertest-$DATE" 2 600 $PACKAGES
+ wait_for_finished_module "module-testmodule-beakertest-$DATE" 2 1000 $PACKAGES
test_successful_packages "ed mksh" $PACKAGES
# Test URL submit
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 5 months
[copr/copr] branch master updated: fronted: fixes broken build url
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
frostyx pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new 96599f6 fronted: fixes broken build url
96599f6 is described below
commit 96599f67580d204a5fded01523eaf159de8e8d45
Author: Tomas Hrnciar <thrnciar(a)redhat.com>
AuthorDate: Wed Oct 23 13:29:51 2019 +0200
fronted: fixes broken build url
Fixes: #1064
Merges: #1082
---
frontend/coprs_frontend/coprs/templates/coprs/detail/build.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
index a55b313..b799bff 100644
--- a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
+++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
@@ -20,7 +20,7 @@
{% if build.copr != copr %}
<h2 class="build-detail"> Build {{ build.id }} doesn't belong to this project. </h2>
-<p> You can go to <a href="{{url_for("coprs_ns.copr_build", username = build.copr.user.name, coprname = build.copr.name, build_id = build.id)}}">{{ copr_name(build.copr) }}/build/{{build.id}} </a>to see this build. </p>
+<p> You can go to <a href="{{ copr_url('coprs_ns.copr_build', build.copr, build_id=build.id) }}"> {{ copr_name(build.copr) }}/build/{{build.id}} </a>to see this build. </p>
{% else %}
{% if g.user and g.user.can_build_in(copr) and build.finished and not build.persistent %}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 5 months
[copr/copr] branch master updated (e7e661a -> 071ce2c)
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 e7e661a frontend: fix forking correct chroots and forked projects
add 071ce2c docker: make sure we enable chroots that have available mock configs
No new revisions were added by this update.
Summary of changes:
docker/frontend/Dockerfile | 1 +
docker/frontend/files/usr/bin/run.sh | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
--
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 forking correct
chroots and forked projects
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
frostyx pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new e7e661a frontend: fix forking correct chroots and forked projects
e7e661a is described below
commit e7e661a53661844cac0fd5e0f67013b27747576f
Author: Dominik Turecek <dturecek(a)redhat.com>
AuthorDate: Mon Oct 21 07:54:22 2019 +0200
frontend: fix forking correct chroots and forked projects
Fixes: #1010, #1012
Merges: PR#1079
---
.../coprs_frontend/coprs/logic/complex_logic.py | 37 +++++++++++--------
.../coprs_frontend/coprs/logic/packages_logic.py | 19 ++++++++++
frontend/coprs_frontend/tests/coprs_test_case.py | 43 ++++++++++++++++++++++
.../tests/test_logic/test_complex_logic.py | 14 +++++--
.../tests/test_logic/test_packages_logic.py | 13 +++++++
5 files changed, 107 insertions(+), 19 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/logic/complex_logic.py b/frontend/coprs_frontend/coprs/logic/complex_logic.py
index de40d2e..316cf97 100644
--- a/frontend/coprs_frontend/coprs/logic/complex_logic.py
+++ b/frontend/coprs_frontend/coprs/logic/complex_logic.py
@@ -88,25 +88,32 @@ class ComplexLogic(object):
raise exceptions.DuplicateException("Source project should not be same as destination")
builds_map = {}
- srpm_builds_src,srpm_builds_dst, chroots_src, chroots_dst = ([] for i in range(4))
+ srpm_builds_src = []
+ srpm_builds_dst = []
+
for package in copr.main_dir.packages:
fpackage = forking.fork_package(package, fcopr)
- build = package.last_build(successful=True)
- if not build:
+
+ builds = PackagesLogic.last_successful_build_chroots(package)
+ if not builds:
continue
- fbuild = forking.fork_build(build, fcopr, fpackage)
+ for build, build_chroots in builds.items():
+ fbuild = forking.fork_build(build, fcopr, fpackage, build_chroots)
+
+ if build.result_dir:
+ srpm_builds_src.append(build.result_dir)
+ srpm_builds_dst.append(fbuild.result_dir)
- if build.result_dir:
- srpm_builds_src.append(build.result_dir)
- srpm_builds_dst.append(fbuild.result_dir)
+ for chroot, fchroot in zip(build_chroots, fbuild.build_chroots):
+ if not chroot.result_dir:
+ continue
+ if chroot.name not in builds_map:
+ builds_map[chroot.name] = {chroot.result_dir: fchroot.result_dir}
+ else:
+ builds_map[chroot.name][chroot.result_dir] = fchroot.result_dir
- for chroot, fchroot in zip(build.build_chroots, fbuild.build_chroots):
- if chroot.result_dir:
- chroots_src.append(chroot.result_dir)
- chroots_dst.append(fchroot.result_dir)
- builds_map['srpm-builds'] = dict(zip(srpm_builds_src, srpm_builds_dst))
- builds_map[chroot.name] = dict(zip(chroots_src, chroots_dst))
+ builds_map['srpm-builds'] = dict(zip(srpm_builds_src, srpm_builds_dst))
db.session.commit()
ActionsLogic.send_fork_copr(copr, fcopr, builds_map)
@@ -294,7 +301,7 @@ class ProjectForking(object):
db.session.add(fpackage)
return fpackage
- def fork_build(self, build, fcopr, fpackage):
+ def fork_build(self, build, fcopr, fpackage, build_chroots):
fbuild = self.create_object(models.Build, build, exclude=["id", "copr_id", "copr_dir_id", "package_id", "result_dir"])
fbuild.copr = fcopr
fbuild.package = fpackage
@@ -303,7 +310,7 @@ class ProjectForking(object):
db.session.flush()
fbuild.result_dir = '{:08}'.format(fbuild.id)
- fbuild.build_chroots = [self.create_object(models.BuildChroot, c, exclude=["id", "build_id", "result_dir"]) for c in build.build_chroots]
+ fbuild.build_chroots = [self.create_object(models.BuildChroot, c, exclude=["id", "build_id", "result_dir"]) for c in build_chroots]
for chroot in fbuild.build_chroots:
chroot.result_dir = '{:08}-{}'.format(fbuild.id, fpackage.name)
chroot.status = StatusEnum("forked")
diff --git a/frontend/coprs_frontend/coprs/logic/packages_logic.py b/frontend/coprs_frontend/coprs/logic/packages_logic.py
index d54f50c..44cc3f9 100644
--- a/frontend/coprs_frontend/coprs/logic/packages_logic.py
+++ b/frontend/coprs_frontend/coprs/logic/packages_logic.py
@@ -12,6 +12,7 @@ from coprs import helpers
from coprs.logic import users_logic
from coprs.logic import builds_logic
+from copr_common.enums import StatusEnum
log = app.logger
@@ -314,3 +315,21 @@ WHERE package.copr_dir_id = :copr_dir_id;
if counter > 0:
db.session.commit()
+
+ @classmethod
+ def last_successful_build_chroots(cls, package):
+ builds = {}
+ for chroot in package.chroots:
+ for build in reversed(package.builds):
+ try:
+ build_chroot = build.chroots_dict_by_name[chroot.name]
+ except KeyError:
+ continue
+ if build_chroot.status not in [StatusEnum("succeeded"), StatusEnum("forked")]:
+ continue
+ if build not in builds:
+ builds[build] = [build_chroot]
+ else:
+ builds[build].append(build_chroot)
+ break
+ return builds
diff --git a/frontend/coprs_frontend/tests/coprs_test_case.py b/frontend/coprs_frontend/tests/coprs_test_case.py
index 289e657..e7a60bb 100644
--- a/frontend/coprs_frontend/tests/coprs_test_case.py
+++ b/frontend/coprs_frontend/tests/coprs_test_case.py
@@ -328,6 +328,49 @@ class CoprsTestCase(object):
self.db.session.add(buildchroot)
self.db.session.add_all([self.b5, self.b6, self.b7, self.b8])
+ self.p5 = models.Package(
+ copr=self.c2, copr_dir=self.c2_dir, name="new-package", source_type=0)
+ self.b9 = models.Build(
+ copr=self.c2, copr_dir=self.c2_dir, package=self.p5,
+ user=self.u1, submitted_on=100, srpm_url="http://somesrpm",
+ source_status=StatusEnum("succeeded"), result_dir='00000009-new-package')
+ self.b10 = models.Build(
+ copr=self.c2, copr_dir=self.c2_dir, package=self.p5,
+ user=self.u1, submitted_on=100, srpm_url="http://somesrpm",
+ source_status=StatusEnum("failed"), result_dir='00000010-new-package')
+ self.b11 = models.Build(
+ copr=self.c2, copr_dir=self.c2_dir, package=self.p5,
+ user=self.u1, submitted_on=100, srpm_url="http://somesrpm",
+ source_status=StatusEnum("failed"), result_dir='00000011-new-package')
+
+ self.b9_bc = []
+ self.b10_bc = []
+ self.b11_bc = []
+ self.db.session.flush()
+
+ bc_status = {self.b9: {self.mc2: StatusEnum("succeeded"),
+ self.mc3: StatusEnum("succeeded")},
+ self.b10: {self.mc2: StatusEnum("forked"),
+ self.mc3: StatusEnum("failed")},
+ self.b11: {self.mc2: StatusEnum("failed"),
+ self.mc3: StatusEnum("succeeded")}}
+
+ for build, build_chroots in zip(
+ [self.b9, self.b10, self.b11],
+ [self.b9_bc, self.b10_bc, self.b11_bc]):
+
+ for chroot in build.copr.active_chroots:
+ buildchroot = models.BuildChroot(
+ build=build,
+ mock_chroot=chroot,
+ status=bc_status[build][chroot],
+ git_hash="12345",
+ result_dir="{}-{}".format(build.id, build.package.name),
+ )
+ build_chroots.append(buildchroot)
+ self.db.session.add(buildchroot)
+ self.db.session.add_all([self.b9, self.b10, self.b11])
+
@pytest.fixture
def f_hook_package(self, f_users, f_coprs, f_mock_chroots, f_builds):
self.c1.webhook_secret = str(uuid.uuid4())
diff --git a/frontend/coprs_frontend/tests/test_logic/test_complex_logic.py b/frontend/coprs_frontend/tests/test_logic/test_complex_logic.py
index b71b53e..2d367ab 100644
--- a/frontend/coprs_frontend/tests/test_logic/test_complex_logic.py
+++ b/frontend/coprs_frontend/tests/test_logic/test_complex_logic.py
@@ -36,9 +36,15 @@ class TestComplexLogic(CoprsTestCase):
data = json.loads(actions[0].data)
assert data["user"] == self.u2.name
assert data["copr"] == "dstname"
- assert data["builds_map"] == {'srpm-builds': {'00000008-whatsupthere-world': '00000009', '00000005-hello-world': '00000010'},
- 'fedora-17-x86_64': {'8-whatsupthere-world': '00000009-whatsupthere-world', '5-hello-world': '00000010-hello-world'},
- 'fedora-17-i386': {'8-whatsupthere-world': '00000009-whatsupthere-world', '5-hello-world': '00000010-hello-world'}}
+ assert data["builds_map"] == {
+ 'srpm-builds': {'00000008-whatsupthere-world': '00000012', '00000006-hello-world': '00000013',
+ '00000010-new-package': '00000014', '00000011-new-package': '00000015'},
+ 'fedora-17-x86_64': {'8-whatsupthere-world': '00000012-whatsupthere-world',
+ '6-hello-world': '00000013-hello-world',
+ '10-new-package': '00000014-new-package'},
+ 'fedora-17-i386': {'8-whatsupthere-world': '00000012-whatsupthere-world',
+ '6-hello-world': '00000013-hello-world',
+ '11-new-package': '00000015-new-package'}}
def test_delete_expired_coprs(self, f_users, f_mock_chroots, f_coprs, f_builds, f_db):
query = self.db.session.query(models.Copr)
@@ -93,7 +99,7 @@ class TestProjectForking(CoprsTestCase):
def test_fork_build(self, f_users, f_coprs, f_mock_chroots, f_builds, f_db):
forking = ProjectForking(self.u1)
- fb1 = forking.fork_build(self.b1, self.c2, self.p2)
+ fb1 = forking.fork_build(self.b1, self.c2, self.p2, self.b1.build_chroots)
assert fb1.id != self.b1.id
assert fb1.state == 'forked'
diff --git a/frontend/coprs_frontend/tests/test_logic/test_packages_logic.py b/frontend/coprs_frontend/tests/test_logic/test_packages_logic.py
new file mode 100644
index 0000000..12c641a
--- /dev/null
+++ b/frontend/coprs_frontend/tests/test_logic/test_packages_logic.py
@@ -0,0 +1,13 @@
+from coprs.logic.packages_logic import PackagesLogic
+
+from tests.coprs_test_case import CoprsTestCase
+
+
+class TestPackagesLogic(CoprsTestCase):
+
+ def test_last_successful_build_chroots(self, f_users, f_fork_prepare, f_build_few_chroots):
+ builds_p4 = PackagesLogic.last_successful_build_chroots(self.p4)
+ builds_p5 = PackagesLogic.last_successful_build_chroots(self.p5)
+ assert builds_p4 == {self.b6: self.b6_bc}
+ assert builds_p5 == {self.b10: [self.b10_bc[0]],
+ self.b11: [self.b11_bc[1]]}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 5 months
[copr/copr] branch master updated (8bde905 -> 9dccf5b)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
thrnciar pushed a change to branch master
in repository copr/copr.
from 8bde905 frontend: python3-flask-script-removal - chroot commands
add 9dccf5b frontend: python3-flask-script-removal - user & whooshee comands
No new revisions were added by this update.
Summary of changes:
frontend/coprs_frontend/commands/add_user.py | 48 ++++++++--------
frontend/coprs_frontend/commands/alter_user.py | 66 ++++++----------------
frontend/coprs_frontend/commands/dump_user.py | 25 ++++----
frontend/coprs_frontend/commands/update_indexes.py | 34 ++++++-----
.../commands/update_indexes_quick.py | 26 ++++-----
.../commands/update_indexes_required.py | 14 ++---
frontend/coprs_frontend/manage.py | 29 +++++-----
7 files changed, 101 insertions(+), 141 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 5 months
[copr/copr] branch master updated (b27eda4 -> 8bde905)
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 b27eda4 docker: delete unnecessary ansible configs from /root and /etc
add 8bde905 frontend: python3-flask-script-removal - chroot commands
No new revisions were added by this update.
Summary of changes:
frontend/coprs_frontend/commands/alter_chroot.py | 68 ++++----
frontend/coprs_frontend/commands/branch_fedora.py | 56 +++----
frontend/coprs_frontend/commands/comment_chroot.py | 33 ++--
frontend/coprs_frontend/commands/create_chroot.py | 103 ++++++------
.../coprs_frontend/commands/display_chroots.py | 31 ++--
frontend/coprs_frontend/commands/drop_chroot.py | 33 ++--
.../coprs_frontend/commands/rawhide_to_release.py | 183 +++++++++++----------
frontend/coprs_frontend/manage.py | 55 +++++--
8 files changed, 290 insertions(+), 272 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 6 months
[copr/copr] branch master updated (2aad29c -> b27eda4)
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 2aad29c cli, python: nicer mock-config command output
add 7ec5ac7 backend: use the expected ssh config
add d5c75a5 backend: fix logger arguments
add 64b261b docker: run copr-backend services as copr:copr
add b27eda4 docker: delete unnecessary ansible configs from /root and /etc
No new revisions were added by this update.
Summary of changes:
backend/backend/ans_utils.py | 4 +-
backend/backend/vm_manage/check.py | 2 +-
docker/backend/Dockerfile | 13 ++-
docker/backend/files/etc/ansible/ansible.cfg | 93 ---------------------
docker/backend/files/etc/ansible/hosts | 1 -
docker/backend/files/etc/copr/copr-be.conf | 6 +-
docker/backend/files/etc/supervisord.conf | 36 ++++----
docker/backend/files/home/copr/.ansible.cfg | 4 +-
.../files/{root => home/copr}/.ssh/builder_config | 0
.../backend/files/{root => home/copr}/.ssh/id_rsa | 0
.../files/{root => home/copr}/.ssh/id_rsa.pub | 0
.../files/{root => home/copr}/provision/inventory | 0
.../{root => home/copr}/provision/spawn_local.yml | 0
.../copr}/provision/terminate_local.yml | 0
docker/backend/files/root/.ansible.cfg | 95 ----------------------
docker/builder/Dockerfile | 2 +-
16 files changed, 37 insertions(+), 219 deletions(-)
delete mode 100644 docker/backend/files/etc/ansible/ansible.cfg
delete mode 100644 docker/backend/files/etc/ansible/hosts
rename docker/backend/files/{root => home/copr}/.ssh/builder_config (100%)
rename docker/backend/files/{root => home/copr}/.ssh/id_rsa (100%)
rename docker/backend/files/{root => home/copr}/.ssh/id_rsa.pub (100%)
rename docker/backend/files/{root => home/copr}/provision/inventory (100%)
rename docker/backend/files/{root => home/copr}/provision/spawn_local.yml (100%)
rename docker/backend/files/{root => home/copr}/provision/terminate_local.yml (100%)
delete mode 100644 docker/backend/files/root/.ansible.cfg
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 6 months
[copr/copr] branch master updated (4a604e8 -> 2aad29c)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
thrnciar pushed a change to branch master
in repository copr/copr.
from 4a604e8 docker: set backend URL to a hostname known by other containers
new 823912f Revert "[cli] put backend the deprecation warnings"
new 2aad29c cli, python: nicer mock-config command output
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:
cli/copr_cli/build_config.py | 18 +--
cli/copr_cli/main.py | 5 +-
cli/man/copr-cli.1.asciidoc | 5 +-
cli/tests/cli_tests_lib.py | 23 +++
cli/tests/test_cli.py | 18 +--
cli/tests/test_mock_config.py | 179 +++++++++++++++++++++++
python/copr/test/resources/build_config.200.json | 13 ++
python/copr/test/test_client.py | 15 ++
8 files changed, 243 insertions(+), 33 deletions(-)
create mode 100644 cli/tests/cli_tests_lib.py
create mode 100644 cli/tests/test_mock_config.py
create mode 100644 python/copr/test/resources/build_config.200.json
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 6 months
[copr/copr] branch master updated: docker: set backend URL to a
hostname known by other containers
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
thrnciar pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new 4a604e8 docker: set backend URL to a hostname known by other containers
4a604e8 is described below
commit 4a604e8d4cf2c787848aaf68ca01a5435033d2a6
Author: Jakub Kadlcik <frostyx(a)email.cz>
AuthorDate: Sun Oct 20 22:56:25 2019 +0200
docker: set backend URL to a hostname known by other containers
The problem is following - http://localhost:5002 is approachable
from the host system and backend results are served there. This URL
needs to be used e.g. when rendering links pointing to logs on
the backend. However, at the same time, this URL is not available
within the containers so builds fail when using it for `copr_base`
repository with `skip_if_unavailable=False`.
I don't know how to get both features working other than having
two distinct config options for `BACKEND_BASE_URL` (e.g. adding
`BACKEND_BASE_URL_PRIVATE`). And I am not a big fan of this solution.
---
docker/frontend/files/etc/copr/copr.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docker/frontend/files/etc/copr/copr.conf b/docker/frontend/files/etc/copr/copr.conf
index 6b12f21..fab8167 100644
--- a/docker/frontend/files/etc/copr/copr.conf
+++ b/docker/frontend/files/etc/copr/copr.conf
@@ -83,7 +83,7 @@ SEND_EMAILS = False
PUBLIC_COPR_HOSTNAME = 'localhost:5000'
PUBLIC_COPR_BASE_URL = 'http://frontend:5000'
-BACKEND_BASE_URL = 'http://localhost:5002'
+BACKEND_BASE_URL = 'http://backend_httpd:5002'
DIST_GIT_CLONE_URL = 'http://distgit/git/'
DIST_GIT_URL = 'http://localhost:5001/cgit'
COPR_DIST_GIT_LOGS_URL = 'http://localhost:5001/per-task-logs'
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 6 months
[copr/copr] branch master updated (43d115f -> 8b89686)
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 43d115f frontend, backend: send `uses_devel_repo' as a part of task info
add 8b89686 frontend: python3-flask-removal - database commands
No new revisions were added by this update.
Summary of changes:
frontend/coprs_frontend/commands/create_db.py | 53 ++++++++++------------
.../coprs_frontend/commands/create_sqlite_file.py | 28 ++++++------
frontend/coprs_frontend/commands/drop_db.py | 15 +++---
frontend/coprs_frontend/manage.py | 16 ++++---
4 files changed, 54 insertions(+), 58 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 6 months