[copr/copr] branch master updated (fcb4330 -> 31f1fee)
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 fcb4330 Automatic commit of package [copr-rpmbuild] release [0.34-1].
add 31f1fee rpmbuild: catch FileExistsError in python2 compatible manner
No new revisions were added by this update.
Summary of changes:
rpmbuild/copr_rpmbuild/providers/base.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 2 months
[copr/copr] annotated tag copr-rpmbuild-0.34-1 created (now fcdb545)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to annotated tag copr-rpmbuild-0.34-1
in repository copr/copr.
at fcdb545 (tag)
tagging fcb4330459acfcb17ca6c72ba6c27b0e0e0f05f6 (commit)
replaces copr-backend-1.132-1
by Pavel Raiskup
on Wed Feb 5 11:11:36 2020 +0100
- Log -----------------------------------------------------------------
Tagging package [copr-rpmbuild] version [copr-rpmbuild-0.34-1] in directory [rpmbuild/].
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new fcb4330 Automatic commit of package [copr-rpmbuild] release [0.34-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, 2 months
[copr/copr] branch master updated: Automatic commit of package
[copr-rpmbuild] release [0.34-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 fcb4330 Automatic commit of package [copr-rpmbuild] release [0.34-1].
fcb4330 is described below
commit fcb4330459acfcb17ca6c72ba6c27b0e0e0f05f6
Author: Pavel Raiskup <praiskup(a)redhat.com>
AuthorDate: Wed Feb 5 11:11:36 2020 +0100
Automatic commit of package [copr-rpmbuild] release [0.34-1].
Created by command:
/usr/bin/tito tag
---
.tito/packages/copr-rpmbuild | 2 +-
rpmbuild/copr-rpmbuild.spec | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/.tito/packages/copr-rpmbuild b/.tito/packages/copr-rpmbuild
index d290e25..f40fb72 100644
--- a/.tito/packages/copr-rpmbuild
+++ b/.tito/packages/copr-rpmbuild
@@ -1 +1 @@
-0.33-1 rpmbuild/
+0.34-1 rpmbuild/
diff --git a/rpmbuild/copr-rpmbuild.spec b/rpmbuild/copr-rpmbuild.spec
index b6a80d9..f3834bb 100644
--- a/rpmbuild/copr-rpmbuild.spec
+++ b/rpmbuild/copr-rpmbuild.spec
@@ -18,7 +18,7 @@ Requires: %1 \
%{expand: %%global latest_requires_packages %1 %%{?latest_requires_packages}}
Name: copr-rpmbuild
-Version: 0.33
+Version: 0.34
Summary: Run COPR build tasks
Release: 1%{?dist}
URL: https://pagure.io/copr/copr
@@ -208,6 +208,12 @@ install -p -m 755 copr-update-builder %buildroot%_bindir
%changelog
+* Wed Feb 05 2020 Pavel Raiskup <praiskup(a)redhat.com> 0.34-1
+- don't create unnecessary tmp directory
+- prefix the name of all copr-rpmbuild temporary directory
+- properly cleanup after obtaining sources, and build failure
+- add support for mock's module_enable
+
* Fri Dec 06 2019 Pavel Raiskup <praiskup(a)redhat.com> 0.33-1
- rpmbuild: skip_if_unavailable=1 for non-ACR projects
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 2 months
[copr/copr] branch master updated (2e9d73a -> 6916cc1)
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 2e9d73a Automatic commit of package [copr-backend] release [1.132-1].
new ad5422e rpmbuild: properly clean tmp directories even on build failure
new bbca271 rpmbuild: properly cleanup after obtaining sources
new b0af0c7 rpmbuild: prefix the name of all copr-rpmbuild temporary directories
new 8aae847 rpmbuild: don't create unnecessary tmp directory
new 6916cc1 rpmbuild: fix failing tests
The 5 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:
rpmbuild/copr_rpmbuild/providers/base.py | 15 ++++------
rpmbuild/main.py | 49 ++++++++++++++++++--------------
rpmbuild/tests/test_base.py | 3 +-
rpmbuild/tests/test_helpers.py | 2 +-
rpmbuild/tests/test_pypi.py | 7 +++--
rpmbuild/tests/test_rubygems.py | 10 +++++--
rpmbuild/tests/test_scm.py | 31 ++++++++++++++------
rpmbuild/tests/test_spec.py | 12 +++++---
8 files changed, 77 insertions(+), 52 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 2 months
[copr/copr] annotated tag python-copr-1.101-1 created (now ab26384)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to annotated tag python-copr-1.101-1
in repository copr/copr.
at ab26384 (tag)
tagging 159e3685605fb453c051d0696afda4604ace3c1c (commit)
replaces copr-frontend-1.161-1
by Pavel Raiskup
on Wed Feb 5 10:44:09 2020 +0100
- Log -----------------------------------------------------------------
Tagging package [python-copr] version [python-copr-1.101-1] in directory [python/].
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new 159e368 Automatic commit of package [python-copr] release [1.101-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, 2 months
[copr/copr] annotated tag copr-keygen-1.77-1 created (now 272bd0b)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to annotated tag copr-keygen-1.77-1
in repository copr/copr.
at 272bd0b (tag)
tagging 14ce03dbcc553f5d7799846d4c508501a5c87b06 (commit)
replaces copr-cli-1.85-1
by Pavel Raiskup
on Wed Feb 5 10:46:25 2020 +0100
- Log -----------------------------------------------------------------
Tagging package [copr-keygen] version [copr-keygen-1.77-1] in directory [keygen/].
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new 159e368 Automatic commit of package [python-copr] release [1.101-1].
new b31ae49 Automatic commit of package [copr-cli] release [1.85-1].
new 14ce03d Automatic commit of package [copr-keygen] release [1.77-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.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 2 months
[copr/copr] annotated tag copr-cli-1.85-1 created (now 4941341)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to annotated tag copr-cli-1.85-1
in repository copr/copr.
at 4941341 (tag)
tagging b31ae491cc8b2b01e415c4fa7137d485fd84687a (commit)
replaces python-copr-1.101-1
by Pavel Raiskup
on Wed Feb 5 10:45:32 2020 +0100
- Log -----------------------------------------------------------------
Tagging package [copr-cli] version [copr-cli-1.85-1] in directory [cli/].
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new 159e368 Automatic commit of package [python-copr] release [1.101-1].
new b31ae49 Automatic commit of package [copr-cli] release [1.85-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.
4 years, 2 months
[copr/copr] annotated tag copr-backend-1.132-1 created (now 5743a2c)
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.132-1
in repository copr/copr.
at 5743a2c (tag)
tagging 2e9d73a7f7a468a7a694af5bce0508760527713e (commit)
replaces copr-keygen-1.77-1
by Pavel Raiskup
on Wed Feb 5 10:48:40 2020 +0100
- Log -----------------------------------------------------------------
Tagging package [copr-backend] version [copr-backend-1.132-1] in directory [backend/].
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new 159e368 Automatic commit of package [python-copr] release [1.101-1].
new b31ae49 Automatic commit of package [copr-cli] release [1.85-1].
new 14ce03d Automatic commit of package [copr-keygen] release [1.77-1].
new 2e9d73a Automatic commit of package [copr-backend] release [1.132-1].
The 4 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, 2 months
[copr/copr] branch master updated (79e7d79 -> 2e9d73a)
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 79e7d79 Revert "frontend: more tests for pagure_events"
new 159e368 Automatic commit of package [python-copr] release [1.101-1].
new b31ae49 Automatic commit of package [copr-cli] release [1.85-1].
new 14ce03d Automatic commit of package [copr-keygen] release [1.77-1].
new 2e9d73a Automatic commit of package [copr-backend] release [1.132-1].
The 4 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/copr-cli | 2 +-
.tito/packages/copr-keygen | 2 +-
.tito/packages/python-copr | 2 +-
backend/copr-backend.spec | 10 +++++++++-
cli/copr-cli.spec | 6 +++++-
cli/setup.py | 2 +-
keygen/copr-keygen.spec | 5 ++++-
keygen/setup.py | 2 +-
python/python-copr.spec | 6 +++++-
python/setup.py | 2 +-
11 files changed, 30 insertions(+), 11 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 2 months
[copr/copr] branch master updated: Revert "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 79e7d79 Revert "frontend: more tests for pagure_events"
79e7d79 is described below
commit 79e7d7959707b77442546590f14d950cc634a81d
Author: Pavel Raiskup <praiskup(a)redhat.com>
AuthorDate: Wed Feb 5 08:27:51 2020 +0100
Revert "frontend: more tests for pagure_events"
This reverts commit 79baf273758960241dc74398776c440dd9f0fe12.
Merged too soon, there are leftovers to be resolved/discussed.
---
frontend/coprs_frontend/config/copr_unit_test.conf | 1 -
frontend/coprs_frontend/pagure_events.py | 28 +++++++----
.../coprs_frontend/tests/test_pagure_events.py | 55 +---------------------
3 files changed, 21 insertions(+), 63 deletions(-)
diff --git a/frontend/coprs_frontend/config/copr_unit_test.conf b/frontend/coprs_frontend/config/copr_unit_test.conf
index b311733..02baa96 100644
--- a/frontend/coprs_frontend/config/copr_unit_test.conf
+++ b/frontend/coprs_frontend/config/copr_unit_test.conf
@@ -68,5 +68,4 @@ 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 41ee438..f88a00a 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.id)
+ self.package = ComplexLogic.get_package_by_id_safe(db_row.package_id)
self.copr = self.package.copr
def build(self, source_dict_update, copr_dir, update_callback,
@@ -68,21 +68,33 @@ class ScmPackage(object):
else:
package = self.package
+ 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):
- rows = models.Package.query \
- .join(models.CoprDir, models.CoprDir.id == models.Package.copr_dir_id) \
- .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 + '%'))
-
+ 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+'%'
+ )
return [ScmPackage(row) for row in rows]
+
def is_dir_in_commit(self, changed_files):
if not changed_files:
return False
diff --git a/frontend/coprs_frontend/tests/test_pagure_events.py b/frontend/coprs_frontend/tests/test_pagure_events.py
index aa47043..fd7f4a5 100644
--- a/frontend/coprs_frontend/tests/test_pagure_events.py
+++ b/frontend/coprs_frontend/tests/test_pagure_events.py
@@ -1,14 +1,5 @@
-from pagure_events import (event_info_from_pr_comment, event_info_from_push, event_info_from_pr, ScmPackage,
- build_on_fedmsg_loop)
+from pagure_events import event_info_from_pr_comment, event_info_from_push, event_info_from_pr
from tests.coprs_test_case import CoprsTestCase
-import pytest
-from unittest import mock
-
-
-class Message:
- def __init__(self, topic, body):
- self.topic = topic
- self.body = body
class TestPagureEvents(CoprsTestCase):
@@ -40,28 +31,6 @@ class TestPagureEvents(CoprsTestCase):
event_info = event_info_from_pr_comment(self.data, self.base_url)
assert not event_info
- @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_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)
@@ -81,25 +50,3 @@ 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'
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 2 months