[copr] master: [backend] built pkgs - include subpackages (f5aa26b)
by asamalik@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit f5aa26bc8f8500764587ae781718623c894312cc
Author: Adam Samalik <asamalik(a)redhat.com>
Date: Tue Jul 8 09:13:21 2014 +0200
[backend] built pkgs - include subpackages
>---------------------------------------------------------------
backend/backend/dispatcher.py | 4 ++--
backend/backend/mockremote.py | 20 +++++++++-----------
2 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/backend/backend/dispatcher.py b/backend/backend/dispatcher.py
index 34fd385..28ce803 100644
--- a/backend/backend/dispatcher.py
+++ b/backend/backend/dispatcher.py
@@ -309,7 +309,7 @@ class Worker(multiprocessing.Process):
jobdata.copr_name = build["copr"]["name"]
jobdata.pkg_version = ""
- jobdata.pkg_name = ""
+ jobdata.built_packages = ""
return jobdata
@@ -355,7 +355,7 @@ class Worker(multiprocessing.Process):
"status": job.status,
"chroot": job.chroot,
"pkg_version": job.pkg_version,
- "pkg_name": job.pkg_name,
+ "built_packages": job.built_packages,
}
data = {"builds": [build]}
diff --git a/backend/backend/mockremote.py b/backend/backend/mockremote.py
index a136843..203a9fb 100755
--- a/backend/backend/mockremote.py
+++ b/backend/backend/mockremote.py
@@ -410,9 +410,7 @@ class Builder(object):
else:
dest = pkg
- # get the package information
- # TODO
- # version
+ # srpm version
self.conn.module_name = "shell"
self.conn.module_args = "rpm -qp --qf \"%{VERSION}\n\" "+pkg
self.mockremote.callback.log("Getting package information: version")
@@ -420,14 +418,6 @@ class Builder(object):
if "contacted" in results:
build_details["pkg_version"] = results["contacted"].itervalues().next()[u"stdout"]
- # name
- self.conn.module_name = "shell"
- self.conn.module_args = "rpm -qp --qf \"%{NAME}\n\" "+pkg
- self.mockremote.callback.log("Getting package information: name")
- results = self.conn.run()
- if "contacted" in results:
- build_details["pkg_name"] = results["contacted"].itervalues().next()[u"stdout"]
-
# construct the mockchain command
buildcmd = "{0} -r {1} -l {2} ".format(
mockchain, pipes.quote(self.chroot),
@@ -477,6 +467,14 @@ class Builder(object):
if not is_err:
success = True
+ self.mockremote.callback.log("Listing built binary packages")
+ self.conn.module_name = "shell"
+ self.conn.module_args = "cd {0} && for f in `ls *.rpm | grep -v \"src.rpm$\"`; do rpm -qp --qf \"%{{NAME}} %{{VERSION}}\n\" $f; done".format(self._get_remote_pkg_dir(pkg))
+ results = self.conn.run()
+ build_details["built_packages"] = results["contacted"].itervalues().next()[u"stdout"]
+ self.mockremote.callback.log("Packages:\n"+build_details["built_packages"])
+
+
return success, out, err, build_details
def download(self, pkg, destdir):
9 years, 10 months
[copr] master: deleting of failed builds fixed (2655997)
by asamalik@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 265599761af744fdc8e1ab5a70c956bcfe8a5086
Author: Adam Samalik <asamalik(a)redhat.com>
Date: Mon Jul 7 10:33:26 2014 +0200
deleting of failed builds fixed
Bug 1057415 - deleting a failed build also deleted rpms of successful build in the backend if filenames of src.rpm pkgs were same for both builds
>---------------------------------------------------------------
.../coprs_frontend/coprs/logic/builds_logic.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/logic/builds_logic.py b/frontend/coprs_frontend/coprs/logic/builds_logic.py
index 14bb10c..60b5bfb 100644
--- a/frontend/coprs_frontend/coprs/logic/builds_logic.py
+++ b/frontend/coprs_frontend/coprs/logic/builds_logic.py
@@ -164,7 +164,8 @@ class BuildsLogic(object):
raise exceptions.ActionInProgressException(
"You can not delete build which is running.", "Running build")
- action = models.Action(action_type=helpers.ActionTypeEnum("delete"),
+ if build.state != "failed":
+ action = models.Action(action_type=helpers.ActionTypeEnum("delete"),
object_type="build",
object_id=build.id,
old_value="{0}/{1}".format(build.copr.owner.name,
@@ -172,7 +173,7 @@ class BuildsLogic(object):
data=build.pkgs,
created_on=int(time.time()))
- db.session.add(action)
+ db.session.add(action)
for build_chroot in build.build_chroots:
db.session.delete(build_chroot)
db.session.delete(build)
9 years, 10 months
[copr] master: Automatic commit of package [copr-cli] release [1.35-1]. (c279d9b)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit c279d9bfd9d682a1b9d70c69c463640e968c73e2
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jul 4 15:57:15 2014 +0200
Automatic commit of package [copr-cli] release [1.35-1].
>---------------------------------------------------------------
cli/copr-cli.spec | 5 ++++-
rel-eng/packages/copr-cli | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/cli/copr-cli.spec b/cli/copr-cli.spec
index 4c0679b..55d2e08 100644
--- a/cli/copr-cli.spec
+++ b/cli/copr-cli.spec
@@ -4,7 +4,7 @@
%endif
Name: copr-cli
-Version: 1.34
+Version: 1.35
Release: 1%{?dist}
Summary: Command line interface for COPR
@@ -96,6 +96,9 @@ cp -a documentation/python-doc %{buildroot}%{_pkgdocdir}/
%endif
%changelog
+* Fri Jul 04 2014 Miroslav Suchý <msuchy(a)redhat.com> 1.35-1
+- [cli] stop waiting when the status is unknown
+
* Fri Jul 04 2014 Miroslav Suchý <msuchy(a)redhat.com> 1.34-1
- [cli] skipped state support
diff --git a/rel-eng/packages/copr-cli b/rel-eng/packages/copr-cli
index d14a46d..99cd6b3 100644
--- a/rel-eng/packages/copr-cli
+++ b/rel-eng/packages/copr-cli
@@ -1 +1 @@
-1.34-1 cli/
+1.35-1 cli/
9 years, 10 months
[copr] master: [cli] stop waiting when the status is unknown (8cd86c3)
by asamalik@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 8cd86c3405c0cae9ba910a7e95a593eca30c42a8
Author: Adam Samalik <asamalik(a)redhat.com>
Date: Fri Jul 4 15:39:30 2014 +0200
[cli] stop waiting when the status is unknown
>---------------------------------------------------------------
cli/copr_cli/subcommands.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/cli/copr_cli/subcommands.py b/cli/copr_cli/subcommands.py
index 2d017a6..6b03008 100644
--- a/cli/copr_cli/subcommands.py
+++ b/cli/copr_cli/subcommands.py
@@ -290,6 +290,10 @@ def build(copr, pkgs, memory, timeout, wait=True, result=None, chroots=None):
failed_ids.append(id)
output["ids"].remove(id)
+ if status == "unknown":
+ raise copr_exceptions.CoprCliBuildException(
+ "Unknown status.")
+
if not output["ids"]:
break
time.sleep(60)
9 years, 10 months
[copr] master: Automatic commit of package [copr-cli] release [1.34-1]. (f2325b6)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit f2325b69b367fb4f8a9992aba01668b6683e277d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jul 4 15:32:04 2014 +0200
Automatic commit of package [copr-cli] release [1.34-1].
>---------------------------------------------------------------
cli/copr-cli.spec | 5 ++++-
rel-eng/packages/copr-cli | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/cli/copr-cli.spec b/cli/copr-cli.spec
index 2f07a2a..4c0679b 100644
--- a/cli/copr-cli.spec
+++ b/cli/copr-cli.spec
@@ -4,7 +4,7 @@
%endif
Name: copr-cli
-Version: 1.33
+Version: 1.34
Release: 1%{?dist}
Summary: Command line interface for COPR
@@ -96,6 +96,9 @@ cp -a documentation/python-doc %{buildroot}%{_pkgdocdir}/
%endif
%changelog
+* Fri Jul 04 2014 Miroslav Suchý <msuchy(a)redhat.com> 1.34-1
+- [cli] skipped state support
+
* Thu Jun 19 2014 Miroslav Suchý <msuchy(a)redhat.com> 1.33-1
- cancel added to the man page
- exit code 4 for failed build and man pages updated
diff --git a/rel-eng/packages/copr-cli b/rel-eng/packages/copr-cli
index 11914ae..d14a46d 100644
--- a/rel-eng/packages/copr-cli
+++ b/rel-eng/packages/copr-cli
@@ -1 +1 @@
-1.33-1 cli/
+1.34-1 cli/
9 years, 10 months
[copr] master: [frontend] api build details extended (da8def7)
by asamalik@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit da8def785f27bf677c16365e9b00fbdbc205f01a
Author: Adam Samalik <asamalik(a)redhat.com>
Date: Fri Jul 4 12:38:13 2014 +0200
[frontend] api build details extended
>---------------------------------------------------------------
frontend/coprs_frontend/coprs/static/copr.css | 7 ++++-
frontend/coprs_frontend/coprs/templates/api.html | 32 ++++++++++++++++----
.../coprs/views/api_ns/api_general.py | 18 ++++++++++-
3 files changed, 48 insertions(+), 9 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/static/copr.css b/frontend/coprs_frontend/coprs/static/copr.css
index bb8cc40..87048df 100644
--- a/frontend/coprs_frontend/coprs/static/copr.css
+++ b/frontend/coprs_frontend/coprs/static/copr.css
@@ -28,7 +28,12 @@ h2.build-detail {
}
h3 {
- font-size: 1.1em;
+ font-size: 1.4em;
+ color: #1F4B89;
+}
+
+h4 {
+ margin-bottom: 0px;
}
#logo {
diff --git a/frontend/coprs_frontend/coprs/templates/api.html b/frontend/coprs_frontend/coprs/templates/api.html
index 8b9ef57..aefb175 100644
--- a/frontend/coprs_frontend/coprs/templates/api.html
+++ b/frontend/coprs_frontend/coprs/templates/api.html
@@ -259,6 +259,7 @@ copr_url = https://copr.fedoraproject.org
<h4>URL:</h4>
<pre style="font-size:120%">/api/coprs/build_detail/<build_id>/</pre>
+ <pre style="font-size:120%">/api/coprs/build/<build_id>/</pre>
<h4>URL parameters:</h4>
<ul>
@@ -273,22 +274,41 @@ copr_url = https://copr.fedoraproject.org
<li>running</li>
<li>failed</li>
<li>succeeded</li>
- <li>skipped</li>
+ <li>skipped (This package has already been built previously)</li>
<li>canceled</li>
</ul>
</li>
- <li><b>owner</b> – Name of the owner.
- </li>
- <li><b>project</b> – Name of the project.
- </li>
+ <li><b>project</b> – Name of the project.</li>
+ <li><b>owner</b> – Name of the owner.</li>
+ <li><b>results</b>– URL with the results.</li>
+ <li><b>pkg_name</b>– Name of the built package.</li>
+ <li><b>pkg_version</b>– Version of the built package.</li>
+ <li><b>chroots</b>– Chroots in which the package has been build and their build states.</li>
+ <li><b>submitted_on</b>– Datetime when the build was submitted. (in epoch format) </li>
+ <li><b>started_on</b>– Datetime when the build process started. (in epoch format)</li>
+ <li><b>ended_on</b>– Datetime when the build finished. (in epoch format)</li>
+ <li><b>src_pkg</b>– URL of the source rpm package.</li>
+ <li><b>submitted_by</b>– User who submitted the build.</li>
</ul>
<h4>Example result</h4>
<pre>
{
"status": "pending",
- "owner": "msuchy",
"project": "myproject",
+ "owner": "msuchy",
+ "results": "http://copr-be.cloud.fedoraproject.org/results/msuchy/myproject/",
+ "pkg_name": "hello",
+ "pkg_version": "2.8",
+ "chroots": {
+ "fedora-20-i386": "succeeded",
+ "fedora-20-x86_64": "succeeded"
+ },
+ "submitted_on": 1386695673,
+ "started_on": 1386695985,
+ "ended_on": 1386696854,
+ "src_pkg": "http://asamalik.fedorapeople.org/hello-2.8-1.fc20.src.rpm",
+ "submitted_by": "asamalik",
"output": "ok"
}
</pre>
diff --git a/frontend/coprs_frontend/coprs/views/api_ns/api_general.py b/frontend/coprs_frontend/coprs/views/api_ns/api_general.py
index fc7375a..fb20602 100644
--- a/frontend/coprs_frontend/coprs/views/api_ns/api_general.py
+++ b/frontend/coprs_frontend/coprs/views/api_ns/api_general.py
@@ -317,6 +317,7 @@ def build_status(build_id):
return jsonout
@api_ns.route("/coprs/build_detail/<build_id>/", methods=["GET"])
+(a)api_ns.route("/coprs/build/<build_id>/", methods=["GET"])
def build_detail(build_id):
if build_id.isdigit():
build = builds_logic.BuildsLogic.get(build_id).first()
@@ -325,10 +326,23 @@ def build_detail(build_id):
if build:
httpcode = 200
+ chroots = {}
+ for chroot in build.build_chroots:
+ chroots[chroot.name] = chroot.state
+
output = {"output": "ok",
- "owner": build.copr.owner.name,
+ "status": build.state,
"project": build.copr.name,
- "status": build.state}
+ "owner": build.copr.owner.name,
+ "results": build.results,
+ "pkg_name": build.pkg_name,
+ "pkg_version": build.pkg_version,
+ "chroots": chroots,
+ "submitted_on": build.submitted_on,
+ "started_on": build.started_on,
+ "ended_on": build.ended_on,
+ "src_pkg": build.pkgs,
+ "submitted_by": build.user.name}
else:
output = {"output": "notok", "error": "Invalid build"}
httpcode = 404
9 years, 10 months
[copr] master: pkg name on the build page (042b3b0)
by asamalik@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 042b3b0dc454d121df2701fc47acb6d8b7f07ae8
Author: Adam Samalik <asamalik(a)redhat.com>
Date: Fri Jul 4 10:58:20 2014 +0200
pkg name on the build page
>---------------------------------------------------------------
.../coprs/templates/coprs/detail/build.html | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
index bec6956..ad012de 100644
--- a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
+++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
@@ -40,7 +40,7 @@
{% if build.pkg_name %}
<dd>{{ build.pkg_name }}</dd>
{% else %}
- <dd>{{ build.pkgs|pkg_name }}</dd>
+ <dd> - </dd>
{% endif %}
9 years, 10 months
[copr] master: [frontend] pkg version on the Monitor page (421dca2)
by asamalik@fedoraproject.org
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 421dca2a8ab235601c818f172add71580deb1dad
Author: Adam Samalik <asamalik(a)redhat.com>
Date: Fri Jul 4 10:37:16 2014 +0200
[frontend] pkg version on the Monitor page
>---------------------------------------------------------------
.../coprs/templates/coprs/detail/monitor.html | 12 ++++++++++--
.../coprs/views/coprs_ns/coprs_general.py | 8 +++++---
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/monitor.html b/frontend/coprs_frontend/coprs/templates/coprs/detail/monitor.html
index d0bbac1..238e257 100644
--- a/frontend/coprs_frontend/coprs/templates/coprs/detail/monitor.html
+++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/monitor.html
@@ -11,7 +11,8 @@
<table class="status-table">
<tr></tr>
<tr>
- <th rowspan="2">Packages</th>
+ <th rowspan="2">Package</th>
+ <th rowspan="2">Version</th>
{% for i, chroot in oses %}
<th colspan="{{i}}">
{{ chroot|capitalize }}
@@ -25,9 +26,16 @@
</th>
{% endfor %}
</tr>
- {% for package, states in packages %}
+ {% for package, version, states in packages %}
<tr>
<td>{{ package }}</td>
+ <td>
+ {% if version: %}
+ {{ version }}
+ {% else %}
+ -
+ {% endif %}
+ </td>
{% for build_id, state in states %}
<td class="centered build-{{ state }}">
{% if state %}
diff --git a/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py b/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
index 556177f..01e14da 100644
--- a/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
+++ b/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
@@ -535,7 +535,7 @@ def copr_build_monitor(username, coprname):
# - it can"t determine build results if build contains
# more than one package as this data is not available
- out = {}
+ packages = []
build = None
chroots = set([chroot.name for chroot in copr.active_chroots])
oses = [chroot.os for chroot in copr.active_chroots]
@@ -549,6 +549,7 @@ def copr_build_monitor(username, coprname):
chroots = sorted(chroots)
+ out = []
for build in builds:
chroot_results = {chroot.name: chroot.state
for chroot in build.build_chroots}
@@ -567,11 +568,12 @@ def copr_build_monitor(username, coprname):
if pkg_name in out:
continue
- out[pkg_name] = build_results
+ packages.append((pkg_name, build.pkg_version, build_results))
+ out.append(pkg_name)
return flask.render_template("coprs/detail/monitor.html",
copr=copr,
build=latest_build,
chroots=chroots, oses=oses_grouped, archs=archs,
- packages=sorted(out.iteritems()),
+ packages=packages,
form=form)
9 years, 10 months