[copr/copr] branch master updated (da16c64 -> 54e3813)
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 da16c64 frontend: fix pagure-events so it submits correct packages
add 54e3813 frontend: fix html generation for code blocks in project description
No new revisions were added by this update.
Summary of changes:
frontend/coprs_frontend/coprs/filters.py | 9 +++++++--
frontend/coprs_frontend/tests/coprs_test_case.py | 8 +++++++-
.../tests/test_views/test_coprs_ns/test_coprs_general.py | 13 +++++++++++++
3 files changed, 27 insertions(+), 3 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[copr/copr] branch master updated (c2559ea -> da16c64)
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 c2559ea doc: we are now running playbooks against AWS hostnames
add da16c64 frontend: fix pagure-events so it submits correct packages
No new revisions were added by this update.
Summary of changes:
frontend/coprs_frontend/pagure_events.py | 1 +
1 file changed, 1 insertion(+)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[copr/copr] branch master updated (8b12af4 -> c2559ea)
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 8b12af4 Automatic commit of package [copr-frontend] release [1.164-1].
add c2559ea doc: we are now running playbooks against AWS hostnames
No new revisions were added by this update.
Summary of changes:
doc/how_to_release_copr.rst | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[copr/copr] annotated tag copr-frontend-1.164-1 created (now
02cf7b0)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to annotated tag copr-frontend-1.164-1
in repository copr/copr.
at 02cf7b0 (tag)
tagging 8b12af4724f61e3c20f529ed5c8cf62c0e6fbb24 (commit)
replaces copr-rpmbuild-0.37-1
by Pavel Raiskup
on Mon Feb 24 13:58:42 2020 +0100
- Log -----------------------------------------------------------------
Tagging package [copr-frontend] version [copr-frontend-1.164-1] in directory [frontend/].
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new 8b12af4 Automatic commit of package [copr-frontend] release [1.164-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.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[copr/copr] branch master updated: Automatic commit of package
[copr-frontend] release [1.164-1].
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 8b12af4 Automatic commit of package [copr-frontend] release [1.164-1].
8b12af4 is described below
commit 8b12af4724f61e3c20f529ed5c8cf62c0e6fbb24
Author: Pavel Raiskup <praiskup(a)redhat.com>
AuthorDate: Mon Feb 24 13:58:42 2020 +0100
Automatic commit of package [copr-frontend] release [1.164-1].
Created by command:
/usr/bin/tito tag
---
.tito/packages/copr-frontend | 2 +-
frontend/copr-frontend.spec | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/.tito/packages/copr-frontend b/.tito/packages/copr-frontend
index d0ecfc7..2af6b56 100644
--- a/.tito/packages/copr-frontend
+++ b/.tito/packages/copr-frontend
@@ -1 +1 @@
-1.163-1 frontend/
+1.164-1 frontend/
diff --git a/frontend/copr-frontend.spec b/frontend/copr-frontend.spec
index cf8a11f..fab359c 100644
--- a/frontend/copr-frontend.spec
+++ b/frontend/copr-frontend.spec
@@ -43,7 +43,7 @@
}
Name: copr-frontend
-Version: 1.163
+Version: 1.164
Release: 1%{?dist}
Summary: Frontend for Copr
@@ -366,6 +366,13 @@ usermod -L copr-fe
%changelog
+* Mon Feb 24 2020 Pavel Raiskup <praiskup(a)redhat.com> 1.164-1
+- rawhide-to-release should create the chroots deactivated
+- new rawhide-to-release --retry-forked option
+- allow repeated run of 'rawhide-to-release'
+- bugfix rawihde to release
+- raise timeout limit for builds to 24h
+
* Wed Feb 05 2020 Pavel Raiskup <praiskup(a)redhat.com> 1.163-1
- don't generate 'modules' in build-job unnecessarily
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[copr/copr] branch master updated (8b011e5 -> 0a56851)
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 8b011e5 frontend: Raise timeout limit for builds to 24h
add 8bffc6a frontend: fix rawihde to release
add a332f1f backend: more verbose rawhide to release action processing
add db054c8 frontend: allow repeated run of 'rawhide-to-release'
add 1a34b7c frontend: rawhide-to-release --retry-forked option
add 0a56851 frontend: rawhide_to_release should create the chroots deactivated
No new revisions were added by this update.
Summary of changes:
backend/backend/actions.py | 4 +--
frontend/coprs_frontend/commands/branch_fedora.py | 14 ++++++--
.../coprs_frontend/commands/rawhide_to_release.py | 39 +++++++++++++++-------
3 files changed, 40 insertions(+), 17 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[copr/copr] branch master updated (495a347 -> 8b011e5)
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 495a347 doc: mark also aarch64 chroots as end of life
add 8b011e5 frontend: Raise timeout limit for builds to 24h
No new revisions were added by this update.
Summary of changes:
frontend/coprs_frontend/coprs/constants.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[copr/copr] branch master updated: doc: mark also aarch64 chroots
as end of life
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 495a347 doc: mark also aarch64 chroots as end of life
495a347 is described below
commit 495a3479f4fe0a47039cfe482f11cb8215a5078b
Author: Jakub Kadlcik <frostyx(a)email.cz>
AuthorDate: Mon Feb 17 00:10:38 2020 +0100
doc: mark also aarch64 chroots as end of life
Merges: #1271
---
doc/email_templates.rst | 2 ++
doc/how_to_manage_chroots.rst | 7 ++++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/doc/email_templates.rst b/doc/email_templates.rst
index d0dbf36..aa6bada 100644
--- a/doc/email_templates.rst
+++ b/doc/email_templates.rst
@@ -34,6 +34,8 @@ Disable chroots
- fedora-<VERSION>-x86_64
- fedora-<VERSION>-i386
- fedora-<VERSION>-ppc64le
+ - fedora-<VERSION>-aarch64
+ - fedora-<VERSION>-armhfp
Additionally, according to Outdated chroots removal policy [2], Copr is
going to preserve existing build results in those chroots for another
diff --git a/doc/how_to_manage_chroots.rst b/doc/how_to_manage_chroots.rst
index f357973..c5b384e 100644
--- a/doc/how_to_manage_chroots.rst
+++ b/doc/how_to_manage_chroots.rst
@@ -71,8 +71,8 @@ happened in the time window between ``rawhide-to-release`` and chroot enablement
will be missed in the branched chroot later (users will have to rebuild them
manually). So as soon as it is possible, do::
- copr-frontend alter-chroot --action activate \
- fedora-31-x86_64 fedora-31-i386 fedora-31-ppc64le fedora-31-aarch64
+ copr-frontend alter-chroot --action activate fedora-32-x86_64 fedora-32-i386 \
+ fedora-32-ppc64le fedora-32-aarch64 fedora-32-armhfp
When everything is done, `send an information email to a mailing list <#mailing-lists>`_.
@@ -88,7 +88,8 @@ comfortably deal with it. It can be done like this
::
- copr-frontend alter-chroot --action eol fedora-25-x86_64 fedora-25-i386 fedora-25-ppc64le
+ copr-frontend alter-chroot --action eol fedora-31-x86_64 fedora-31-i386 \
+ fedora-31-ppc64le fedora-31-aarch64 fedora-31-armhfp
After running such command, no data are going to be removed. All repositories for the chroot are preserved. It is just
disabled and users can't build new packages in it anymore.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[copr/copr] branch master updated: frontend: more tests for
pagure_events
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 55c3adb frontend: more tests for pagure_events
55c3adb is described below
commit 55c3adb44b19ddbe105a7c1f6ee82dc5a6c00d43
Author: Silvie Chlupova <sisi.chlupova(a)gmail.com>
AuthorDate: Mon Feb 10 18:03:07 2020 +0100
frontend: more tests for pagure_events
Fixes: #803
Merges: #1266
---
frontend/coprs_frontend/config/copr_unit_test.conf | 1 +
frontend/coprs_frontend/pagure_events.py | 29 ++---
.../coprs_frontend/tests/test_pagure_events.py | 142 ++++++++++++++++++++-
3 files changed, 152 insertions(+), 20 deletions(-)
diff --git a/frontend/coprs_frontend/config/copr_unit_test.conf b/frontend/coprs_frontend/config/copr_unit_test.conf
index 02baa96..b311733 100644
--- a/frontend/coprs_frontend/config/copr_unit_test.conf
+++ b/frontend/coprs_frontend/config/copr_unit_test.conf
@@ -68,4 +68,5 @@ PAGURE_EVENTS = {
'io.pagure.prod.pagure.git.receive' : 'https://pagure.io/',
'io.pagure.prod.pagure.pull-request.new' : 'https://pagure.io/',
'io.pagure.prod.pagure.pull-request.comment.added' : 'https://pagure.io/',
+ 'io.pagure.prod.pagure.pull-request.updated' : 'https://pagure.io/'
}
diff --git a/frontend/coprs_frontend/pagure_events.py b/frontend/coprs_frontend/pagure_events.py
index f88a00a..119e13e 100755
--- a/frontend/coprs_frontend/pagure_events.py
+++ b/frontend/coprs_frontend/pagure_events.py
@@ -57,7 +57,7 @@ class ScmPackage(object):
self.committish = self.source_json_dict.get('committish') or ''
self.subdirectory = self.source_json_dict.get('subdirectory') or ''
- self.package = ComplexLogic.get_package_by_id_safe(db_row.package_id)
+ self.package = ComplexLogic.get_package_by_id_safe(db_row.id)
self.copr = self.package.copr
def build(self, source_dict_update, copr_dir, update_callback,
@@ -68,30 +68,21 @@ class ScmPackage(object):
else:
package = self.package
- db.session.execute('LOCK TABLE build IN EXCLUSIVE MODE')
+ if db.engine.url.drivername != 'sqlite':
+ db.session.execute('LOCK TABLE build IN EXCLUSIVE MODE')
+
return BuildsLogic.rebuild_package(
package, source_dict_update, copr_dir, update_callback,
scm_object_type, scm_object_id, scm_object_url, submitted_by=agent_url)
@classmethod
def get_candidates_for_rebuild(cls, clone_url):
- if db.engine.url.drivername == 'sqlite':
- placeholder = '?'
- true = '1'
- else:
- placeholder = '%s'
- true = 'true'
-
- rows = db.engine.execute(
- """
- SELECT package.id AS package_id, package.source_json AS source_json, package.copr_id AS copr_id
- FROM package JOIN copr_dir ON package.copr_dir_id = copr_dir.id
- WHERE package.source_type = {0} AND
- package.webhook_rebuild = {1} AND
- copr_dir.main = {2} AND
- package.source_json ILIKE {placeholder}
- """.format(SCM_SOURCE_TYPE, true, true, placeholder=placeholder), '%'+clone_url+'%'
- )
+ rows = models.Package.query \
+ .filter(models.Package.source_type == SCM_SOURCE_TYPE) \
+ .filter(models.Package.webhook_rebuild) \
+ .filter(models.CoprDir.main) \
+ .filter(models.Package.source_json.ilike('%' + clone_url + '%'))
+
return [ScmPackage(row) for row in rows]
diff --git a/frontend/coprs_frontend/tests/test_pagure_events.py b/frontend/coprs_frontend/tests/test_pagure_events.py
index fd7f4a5..3e47039 100644
--- a/frontend/coprs_frontend/tests/test_pagure_events.py
+++ b/frontend/coprs_frontend/tests/test_pagure_events.py
@@ -1,5 +1,13 @@
-from pagure_events import event_info_from_pr_comment, event_info_from_push, event_info_from_pr
+from pagure_events import (event_info_from_pr_comment, event_info_from_push, event_info_from_pr, ScmPackage,
+ build_on_fedmsg_loop, ScmPackage)
from tests.coprs_test_case import CoprsTestCase
+from unittest import mock
+
+
+class Message:
+ def __init__(self, topic, body):
+ self.topic = topic
+ self.body = body
class TestPagureEvents(CoprsTestCase):
@@ -31,11 +39,95 @@ class TestPagureEvents(CoprsTestCase):
event_info = event_info_from_pr_comment(self.data, self.base_url)
assert not event_info
+ def test_negative_is_dir_in_commit(self, f_users, f_coprs):
+ self.p2 = self.models.Package(
+ copr=self.c1, copr_dir=self.c1_dir, name="hello-world", source_type=8, webhook_rebuild=True,
+ source_json='{"clone_url": "https://pagure.io/test"}'
+ )
+ candidates = ScmPackage.get_candidates_for_rebuild("https://pagure.io/test")
+ dir_in_commit = [pkg for pkg in candidates if pkg.is_dir_in_commit({''})]
+
+ assert len(dir_in_commit) == 0
+
+ def test_positive_is_dir_in_commit(self, f_users, f_coprs):
+ dir_in_commit = False
+ changed_files = {
+ 'tests/integration/conftest.py @@ -28,6 +28,16 @@ def test_env(): return env',
+ 'tests/integration/conftest.py b/tests/integration/conftest.py index '
+ '1747874..a2b81f6 100644 --- a/tests/integration/conftest.py +++'}
+ self.p2 = self.models.Package(
+ copr=self.c1, copr_dir=self.c1_dir, name="hello-world", source_type=8, webhook_rebuild=True,
+ source_json='{"clone_url": "https://pagure.io/test"}'
+ )
+ candidates = ScmPackage.get_candidates_for_rebuild("https://pagure.io/test")
+ for pkg in candidates:
+ dir_in_commit = pkg.is_dir_in_commit(changed_files)
+
+ assert dir_in_commit is True
+
+ @mock.patch('pagure_events.helpers.raw_commit_changes')
+ @mock.patch('pagure_events.get_repeatedly')
+ def test_positive_build_from_pr_update(self, f_get_repeatedly, f_raw_commit_changes, f_users, f_coprs):
+ f_raw_commit_changes.return_value = {
+ 'tests/integration/conftest.py @@ -28,6 +28,16 @@ def test_env(): return env',
+ 'tests/integration/conftest.py b/tests/integration/conftest.py index '
+ '1747874..a2b81f6 100644 --- a/tests/integration/conftest.py +++'}
+ self.p1 = self.models.Package(
+ copr=self.c1, copr_dir=self.c1_dir, name="hello-world", source_type=8, webhook_rebuild=True,
+ source_json='{"clone_url": "https://pagure.io/test/copr/copr"}'
+ )
+ build = build_on_fedmsg_loop()
+ message = Message(
+ 'io.pagure.prod.pagure.pull-request.updated',
+ self.data['msg']
+ )
+ build(message)
+ builds = self.models.Build.query.all()
+ assert len(builds) == 1
+ assert builds[0].scm_object_type == 'pull-request'
+
+ def test_negative_event_info_from_pr_comment_random_comment(self):
+ self.data['msg']['pullrequest']["comments"].append({"comment": "my testing comment"})
+ event_info = event_info_from_pr_comment(self.data, self.base_url)
+ assert event_info is False
+
def test_positive_event_info_from_pr_comment(self):
self.data['msg']['pullrequest']["comments"].append({"comment": "[copr-build]"})
event_info = event_info_from_pr_comment(self.data, self.base_url)
assert event_info.base_clone_url == "https://pagure.io/test/copr/copr"
+ @mock.patch('pagure_events.helpers.raw_commit_changes')
+ @mock.patch('pagure_events.get_repeatedly')
+ def test_negative_build_from_pr_comment(self, f_get_repeatedly, f_raw_commit_changes, f_users, f_coprs):
+ f_raw_commit_changes.return_value = {
+ 'tests/integration/conftest.py @@ -28,6 +28,16 @@ def test_env(): return env',
+ 'tests/integration/conftest.py b/tests/integration/conftest.py index '
+ '1747874..a2b81f6 100644 --- a/tests/integration/conftest.py +++'}
+ build = build_on_fedmsg_loop()
+ message = Message(
+ 'io.pagure.prod.pagure.pull-request.comment.added',
+ self.data['msg']
+ )
+ build(message)
+ builds = self.models.Build.query.all()
+ assert len(builds) == 0
+
+ def test_negative_event_info(self, f_users, f_coprs):
+ self.data['msg']['pullrequest']["status"] = "Closed"
+ build = build_on_fedmsg_loop()
+ message = Message(
+ 'io.pagure.prod.pagure.pull-request.comment.added',
+ self.data['msg']
+ )
+ build(message)
+ builds = self.models.Build.query.all()
+ assert len(builds) == 0
+
+ def test_negative_event_info_from_pr_comment_closed_pr(self):
+ self.data['msg']['pullrequest']["status"] = "Closed"
+ event_info = event_info_from_pr_comment(self.data, self.base_url)
+ assert event_info is False
+
def test_positive_event_info_from_pr(self):
event_info = event_info_from_pr(self.data, self.base_url)
assert event_info.base_clone_url == "https://pagure.io/test/copr/copr"
@@ -50,3 +142,51 @@ class TestPagureEvents(CoprsTestCase):
self.data['msg']['repo'] = {"fullname": "test", "url_path": "test"}
event_info = event_info_from_push(self.data, self.base_url)
assert event_info.base_clone_url == "https://pagure.io/test"
+
+ @mock.patch('pagure_events.helpers.raw_commit_changes')
+ @mock.patch('pagure_events.get_repeatedly')
+ def test_positive_build_from_push(self, f_get_repeatedly, f_raw_commit_changes, f_users, f_coprs):
+ f_raw_commit_changes.return_value = {
+ 'tests/integration/conftest.py @@ -28,6 +28,16 @@ def test_env(): return env',
+ 'tests/integration/conftest.py b/tests/integration/conftest.py index '
+ '1747874..a2b81f6 100644 --- a/tests/integration/conftest.py +++'}
+ self.p1 = self.models.Package(
+ copr=self.c1, copr_dir=self.c1_dir, name="hello-world", source_type=8, webhook_rebuild=True,
+ source_json='{"clone_url": "https://pagure.io/test"}'
+ )
+ build = build_on_fedmsg_loop()
+ message = Message(
+ 'io.pagure.prod.pagure.git.receive',
+ self.data['msg']
+ )
+ build(message)
+ builds = self.models.Build.query.all()
+ assert len(builds) == 1
+ assert builds[0].scm_object_type == 'commit'
+
+ @mock.patch('pagure_events.helpers.raw_commit_changes')
+ @mock.patch('pagure_events.get_repeatedly')
+ def test_negative_build_from_push(self, f_get_repeatedly, f_raw_commit_changes, f_users, f_coprs):
+ f_raw_commit_changes.return_value = {''}
+ self.p1 = self.models.Package(
+ copr=self.c1, copr_dir=self.c1_dir, name="hello-world", source_type=8, webhook_rebuild=True,
+ source_json='{"clone_url": "https://pagure.io/test"}',
+ )
+ build = build_on_fedmsg_loop()
+ message = Message(
+ 'io.pagure.prod.pagure.git.receive',
+ self.data['msg']
+ )
+ build(message)
+ builds = self.models.Build.query.all()
+ assert len(builds) == 0
+
+ def test_negative_unknown_topic(self):
+ build = build_on_fedmsg_loop()
+ message = Message(
+ 'io.pagure.prod.pagure.git.test',
+ self.data['msg']
+ )
+ build(message)
+ builds = self.models.Build.query.all()
+ assert len(builds) == 0
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[copr/copr] branch master updated (1d0b63c -> 7038842)
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 1d0b63c releng: add f32 to releasers
add 7038842 beaker-tests: expect 'bootstrap_chroot' config in child.cfg
No new revisions were added by this update.
Summary of changes:
beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month