[copr] master: [frontend] clearer links to results (RhBug:1221519) (8c3a9ec)
by frostyx@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 8c3a9ecda46fa2fe700f568c97b89cc9b4b92a60
Author: Jakub Kadlčík <jkadlcik(a)redhat.com>
Date: Tue Jun 16 10:45:16 2015 +0200
[frontend] clearer links to results (RhBug:1221519)
>---------------------------------------------------------------
.../coprs/templates/coprs/detail/build.html | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
index 4229b68..63cd4b4 100644
--- a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
+++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
@@ -28,14 +28,6 @@
<dl class="aligned" >
<div>
- <dt> Results:</dt>
- {% if build.results %}
- <dd><a href="{{ build.results }}">{{ build.results }}</a></dd>
- {% else %}
- <dd>No results yet</dd>
- {% endif %}
- </div>
- <div>
<dt> Built packages:</dt>
{% if build.built_packages %}
{% for pkg in build.built_packages.split("\n"): %}
@@ -46,7 +38,7 @@
{% endif %}
</div>
<div>
- <dt> Chroots:</dt>
+ <dt> Results:</dt>
{% for chroot in build.build_chroots %} <tr>
<dd>
{% if build.results %}
8 years, 10 months
[copr] master: note which modules still stops us from migrating to python3 (4c60285)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 4c6028521e84b60ef9c267cb9816d672e05d8177
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Jun 15 16:18:28 2015 +0200
note which modules still stops us from migrating to python3
this is merely notes for myself, so I do not need to check every 6 months
every requires if we can finally migrate.
>---------------------------------------------------------------
backend/copr-backend.spec | 4 +++-
frontend/copr-frontend.spec | 1 +
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/backend/copr-backend.spec b/backend/copr-backend.spec
index 3440570..5ed3582 100644
--- a/backend/copr-backend.spec
+++ b/backend/copr-backend.spec
@@ -34,14 +34,16 @@ BuildRequires: pytest
BuildRequires: python-pytest-cov
BuildRequires: python-mock
BuildRequires: python-six
+# missing python3 - migrate to python3-munch?
BuildRequires: python-bunch
+# missing python3
BuildRequires: python-daemon
BuildRequires: python-lockfile
BuildRequires: python-requests
BuildRequires: python-setproctitle
+# missing python3
BuildRequires: python-retask
BuildRequires: python-copr
-BuildRequires: python-six
BuildRequires: ansible >= 1.2
BuildRequires: python-IPy
BuildRequires: python-paramiko
diff --git a/frontend/copr-frontend.spec b/frontend/copr-frontend.spec
index 95c5c18..d63c7ce 100644
--- a/frontend/copr-frontend.spec
+++ b/frontend/copr-frontend.spec
@@ -38,6 +38,7 @@ Requires: mod_wsgi
Requires: passwd
Requires: python-alembic
Requires: python-flask
+# missing python3
Requires: python-flask-openid
Requires: python-flask-wtf
Requires: python-flask-sqlalchemy
8 years, 10 months
[copr] master: [cli] wrap requests exception (RhBug:1194522) (845cdb8)
by frostyx@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 845cdb838f095bf1a46910c01cd6c8ffa3398acb
Author: Jakub Kadlčík <jkadlcik(a)redhat.com>
Date: Mon Jun 15 14:10:15 2015 +0200
[cli] wrap requests exception (RhBug:1194522)
>---------------------------------------------------------------
python/copr/client/client.py | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/python/copr/client/client.py b/python/copr/client/client.py
index c71e190..ac853fa 100644
--- a/python/copr/client/client.py
+++ b/python/copr/client/client.py
@@ -170,12 +170,15 @@ class CoprClient(UnicodeMixin):
if method not in ["get", "post", "head", "delete", "put"]:
raise Exception("Method {0} not allowed".format(method))
- response = requests.request(
- method=method.upper(),
- url=url,
- **kwargs
- )
- log.debug("raw response: {0}".format(response.text))
+ try:
+ response = requests.request(
+ method=method.upper(),
+ url=url,
+ **kwargs
+ )
+ log.debug("raw response: {0}".format(response.text))
+ except requests.ConnectionError as e:
+ raise CoprRequestException(e)
if "<title>Sign in Copr</title>" in response.text:
raise CoprRequestException("Invalid API token\n")
8 years, 10 months
[copr] rhbug_1194522: [cli] wrap requests exception (RhBug:1194522) (a85bff4)
by frostyx@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : rhbug_1194522
>---------------------------------------------------------------
commit a85bff440e493940123bfd5319fbb730abd4cbe5
Author: Jakub Kadlčík <jkadlcik(a)redhat.com>
Date: Mon Jun 15 14:10:15 2015 +0200
[cli] wrap requests exception (RhBug:1194522)
>---------------------------------------------------------------
python/copr/client/client.py | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/python/copr/client/client.py b/python/copr/client/client.py
index e7f1cec..ca511ba 100644
--- a/python/copr/client/client.py
+++ b/python/copr/client/client.py
@@ -169,12 +169,15 @@ class CoprClient(object):
if method not in ["get", "post", "head", "delete", "put"]:
raise Exception("Method {0} not allowed".format(method))
- response = requests.request(
- method=method.upper(),
- url=url,
- **kwargs
- )
- log.debug("raw response: {0}".format(response.text))
+ try:
+ response = requests.request(
+ method=method.upper(),
+ url=url,
+ **kwargs
+ )
+ log.debug("raw response: {0}".format(response.text))
+ except requests.ConnectionError as e:
+ raise CoprRequestException(e)
if "<title>Sign in Copr</title>" in response.text:
raise CoprRequestException("Invalid API token\n")
8 years, 10 months
[copr] master: [backend] applying patch: ++test_clean_previous_build_results (18dae71)
by vgologuz@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 18dae71a7eacd0925acb6e6f16219cd56d63d079
Author: Valentin Gologuzov <vgologuz(a)redhat.com>
Date: Mon Jun 15 13:57:53 2015 +0200
[backend] applying patch: ++test_clean_previous_build_results
>---------------------------------------------------------------
backend/backend/daemons/dispatcher.py | 5 +++--
backend/tests/deamons/test_dispatcher.py | 16 ++++++++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/backend/backend/daemons/dispatcher.py b/backend/backend/daemons/dispatcher.py
index 5e3b0c3..e02fd01 100644
--- a/backend/backend/daemons/dispatcher.py
+++ b/backend/backend/daemons/dispatcher.py
@@ -366,7 +366,7 @@ class Worker(multiprocessing.Process):
"""
Create backup directory and move there results from previous build.
"""
- if not os.path.exists(job.results_dir) or os.listdir(job.results_dir) != []:
+ if not os.path.exists(job.results_dir) or os.listdir(job.results_dir) == []:
return
backup_dir_name = "prev_build_backup"
@@ -383,7 +383,8 @@ class Worker(multiprocessing.Process):
if os.path.isfile(file_path):
if file_path.endswith((".info", ".log", ".log.gz")):
os.rename(file_path, os.path.join(backup_dir, filename))
- else:
+
+ elif not file_path.endswith(".rpm"):
os.remove(file_path)
else:
shutil.rmtree(file_path)
diff --git a/backend/tests/deamons/test_dispatcher.py b/backend/tests/deamons/test_dispatcher.py
index 2f5221e..c635790 100644
--- a/backend/tests/deamons/test_dispatcher.py
+++ b/backend/tests/deamons/test_dispatcher.py
@@ -319,6 +319,22 @@ class TestDispatcher(object):
self.worker.do_job(self.job)
assert self.job.status == BuildStatus.FAILURE
+ def test_clean_previous_build_results(self, mc_mr_class, init_worker, reg_vm, mc_register_build_result):
+ os.makedirs(self.job.results_dir)
+
+ files = ["fail", "foo.rpm", "build.log.gz", "root.log.gz", "state.log.gz"]
+ for filename in files:
+ open(os.path.join(self.job.results_dir, filename), "w")
+
+ with open(os.path.join(self.job.results_dir, "build.info"), "w") as build_info:
+ build_info.writelines(["build_id=123\n", "builder_ip=<bar>"])
+
+ self.worker.clean_result_directory(self.job)
+ backup_dir = os.path.join(os.path.join(self.job.results_dir, "prev_build_backup"))
+ assert os.path.isdir(backup_dir)
+ assert set(os.listdir(backup_dir)) == set(files[2:] + ["build.info"])
+ assert "foo.rpm" in os.listdir(self.job.results_dir)
+
@mock.patch("backend.daemons.dispatcher.fedmsg")
def test_init_fedmsg(self, mc_fedmsg, init_worker):
self.worker.init_fedmsg()
8 years, 10 months
[copr] master: [frontend] logstash config ignore requests generated by search engine crawlers (453989d)
by vgologuz@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 453989d72fc9b8ac0cdfe0d0e84c31fefbe339e7
Author: Valentin Gologuzov <vgologuz(a)redhat.com>
Date: Mon Jun 15 13:35:06 2015 +0200
[frontend] logstash config ignore requests generated by search engine crawlers
>---------------------------------------------------------------
frontend/conf/logstash.conf | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/frontend/conf/logstash.conf b/frontend/conf/logstash.conf
index f061724..f4e960e 100644
--- a/frontend/conf/logstash.conf
+++ b/frontend/conf/logstash.conf
@@ -20,6 +20,16 @@ filter {
pattern => "%{COMBINEDAPACHELOG}"
}
+ # ignore requests generated by search engine crawlers
+ useragent {
+ source => "agent"
+ target => "ua_parsed"
+ }
+ if [ua_parsed][device] == "Spider" {
+ drop {}
+ }
+
+
if [request] =~ ".repo$" {
mutate { add_tag => "repo_dl" }
grok {
8 years, 10 months
[copr] master: Automatic commit of package [copr-backend] release [1.70-1]. (7c4e0b0)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 7c4e0b0c17043ff677ba5358373b76f725b15c17
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Jun 15 13:13:06 2015 +0200
Automatic commit of package [copr-backend] release [1.70-1].
>---------------------------------------------------------------
backend/copr-backend.spec | 18 +++++++++++++++++-
rel-eng/packages/copr-backend | 2 +-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/backend/copr-backend.spec b/backend/copr-backend.spec
index 175f4e2..3440570 100644
--- a/backend/copr-backend.spec
+++ b/backend/copr-backend.spec
@@ -3,7 +3,7 @@
%endif
Name: copr-backend
-Version: 1.69
+Version: 1.70
Release: 1%{?dist}
Summary: Backend for Copr
@@ -241,6 +241,22 @@ useradd -r -g copr -G lighttpd -s /bin/bash -c "COPR user" copr
%exclude %{_pkgdocdir}/playbooks
%changelog
+* Mon Jun 15 2015 Miroslav Suchý <msuchy(a)redhat.com> 1.70-1
+- alter vm_name= regexp
+- polishing Bug 1195867 - Move or delete logs when rebuilding failed
+ build.
+- backup only info and log files
+- have just one backup directory per results directory
+- clean results from previous build
+- alter IP= regexp
+- disabled appdata until fixed
+- unable appdata in createrepo
+- more safe VmMaster.check_one_vm_for_dead_builder function
+- adding support for AppData
+- new requirement form AppData support
+- createrepo_unsafe now returns only STDOUT and raise exception on
+ errors
+
* Mon Jun 01 2015 Valentin Gologuzov <vgologuz(a)redhat.com> 1.69-1
- removed creation of symlinks for log.gz
- catch exception during Worker.can_start_job
diff --git a/rel-eng/packages/copr-backend b/rel-eng/packages/copr-backend
index 97fed14..edf8954 100644
--- a/rel-eng/packages/copr-backend
+++ b/rel-eng/packages/copr-backend
@@ -1 +1 @@
-1.69-1 backend/
+1.70-1 backend/
8 years, 10 months
[copr] master: \n is repr() so it is literaly there (8b241d1)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 8b241d162b01520c1cd480cf21efd2740eb738e7
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Jun 11 11:12:03 2015 +0200
\n is repr() so it is literaly there
>---------------------------------------------------------------
backend/backend/vm_manage/spawn.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/backend/vm_manage/spawn.py b/backend/backend/vm_manage/spawn.py
index 3a797a4..00cbd7f 100644
--- a/backend/backend/vm_manage/spawn.py
+++ b/backend/backend/vm_manage/spawn.py
@@ -43,12 +43,12 @@ def spawn_instance(spawn_playbook, log):
if not result:
raise CoprSpawnFailError("No result, trying again")
- match = re.search(r'IP=([^\{\}"\n]+)', result, re.MULTILINE)
+ match = re.search(r'IP=([^\{\}"\n\\]+)', result, re.MULTILINE)
if not match:
raise CoprSpawnFailError("No ip in the result, trying again")
ipaddr = match.group(1)
- match = re.search(r'vm_name=([^\{\}"\n]+)', result, re.MULTILINE)
+ match = re.search(r'vm_name=([^\{\}"\n\\]+)', result, re.MULTILINE)
if match:
vm_name = match.group(1)
8 years, 10 months