Hello again, following up here on this patch:
https://lists.fedoraproject.org/pipermail/buildsys/2015-January/004470.html https://lists.fedoraproject.org/pipermail/buildsys/2014-August/004344.html https://bugzilla.redhat.com/show_bug.cgi?id=1084583
Should I make some changes? Is the patch generally unacceptable?
On Tue, 17 Feb 2015 12:40:52 -0500 Ralph Bean rbean@redhat.com wrote:
Hello again, following up here on this patch:
https://lists.fedoraproject.org/pipermail/buildsys/2015-January/004470.html https://lists.fedoraproject.org/pipermail/buildsys/2014-August/004344.html https://bugzilla.redhat.com/show_bug.cgi?id=1084583
Should I make some changes? Is the patch generally unacceptable?
I do not know that we want to approach things in that manner. I would much rather put automated qa and testing in place post build and pre release and just ship things known to be not broken. though there could always be cases that slip through.
Dennis
On Tue, 17 Feb 2015 13:40:10 -0600 Dennis Gilmore dennis@ausil.us wrote:
On Tue, 17 Feb 2015 12:40:52 -0500 Ralph Bean rbean@redhat.com wrote:
Hello again, following up here on this patch:
https://lists.fedoraproject.org/pipermail/buildsys/2015-January/004470.html https://lists.fedoraproject.org/pipermail/buildsys/2014-August/004344.html https://bugzilla.redhat.com/show_bug.cgi?id=1084583
Should I make some changes? Is the patch generally unacceptable?
I do not know that we want to approach things in that manner. I would much rather put automated qa and testing in place post build and pre release and just ship things known to be not broken. though there could always be cases that slip through.
I wonder if we could do the same thing we are doing with deltas now.
ie, ship 2 versions of every package (current and previous) and then over time remove the previous ones only keeping more recent ones.
So, say you have foo-1.0-1.fc23 and a foo-2.0-1.fc23 is pushed. Keep both for a week, then remove foo-1.0-1.fc23, with the idea being that if there is some horrible problem with the package people are likely to notice in a week or two and immediately downgrade, but after a few weeks the likelyhood is that the new version is ok.
Just a thought.
kevin
On Tue, Feb 17, 2015 at 01:03:53PM -0700, Kevin Fenzi wrote:
On Tue, 17 Feb 2015 13:40:10 -0600 Dennis Gilmore dennis@ausil.us wrote:
On Tue, 17 Feb 2015 12:40:52 -0500 Ralph Bean rbean@redhat.com wrote:
Hello again, following up here on this patch:
https://lists.fedoraproject.org/pipermail/buildsys/2015-January/004470.html https://lists.fedoraproject.org/pipermail/buildsys/2014-August/004344.html https://bugzilla.redhat.com/show_bug.cgi?id=1084583
Should I make some changes? Is the patch generally unacceptable?
I do not know that we want to approach things in that manner. I would much rather put automated qa and testing in place post build and pre release and just ship things known to be not broken. though there could always be cases that slip through.
I wonder if we could do the same thing we are doing with deltas now.
ie, ship 2 versions of every package (current and previous) and then over time remove the previous ones only keeping more recent ones.
So, say you have foo-1.0-1.fc23 and a foo-2.0-1.fc23 is pushed. Keep both for a week, then remove foo-1.0-1.fc23, with the idea being that if there is some horrible problem with the package people are likely to notice in a week or two and immediately downgrade, but after a few weeks the likelyhood is that the new version is ok.
For this we could just pass latest=2 to koji. Either way, it makes the koji api more flexible.
On 02/17/2015 12:40 PM, Ralph Bean wrote:
Hello again, following up here on this patch:
https://lists.fedoraproject.org/pipermail/buildsys/2015-January/004470.html https://lists.fedoraproject.org/pipermail/buildsys/2014-August/004344.html https://bugzilla.redhat.com/show_bug.cgi?id=1084583
Should I make some changes? Is the patch generally unacceptable?
Sorry for my lack of response on this.
The desired behavior is fine. I'd rather avoid using collections.defaultdict though, as I'm not /quite/ ready to break running kojihub on rhel5. Easy enough to just use a regular dict and .setdefault(0).
This should preserve the pre-existing behavior, where if latest is set to True, only the latest builds in a tag are returned, and if latest is set to False, all the builds in a tag are returned.
The new behavior is a kind of middleground, where you can set latest=3, and only the latest three builds for each package in a tag are returned.
We want this ultimately for mashing rawhide so we can create a downgrade path for people if new builds break them. https://bugzilla.redhat.com/show_bug.cgi?id=1082830
Discussed and revised: https://lists.fedoraproject.org/pipermail/buildsys/2015-February/004541.html --- hub/kojihub.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hub/kojihub.py b/hub/kojihub.py index f794d5d..62c6b95 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -1125,6 +1125,7 @@ def readTaggedBuilds(tag,event=None,inherit=False,latest=False,package=None,owne set inherit=True to follow inheritance set event to query at a time in the past set latest=True to get only the latest build per package + set latest=N to get only the N latest tagged RPMs
If type is not None, restrict the list to builds of the given type. Currently the supported types are 'maven', 'win', and 'image'. @@ -1206,10 +1207,10 @@ def readTaggedBuilds(tag,event=None,inherit=False,latest=False,package=None,owne # list should take priority continue if latest: - if seen.has_key(pkgid): + if (latest is True and seen.has_key(pkgid)) or seen.get(pkgid, 0) >= latest: #only take the first (note ordering in query above) continue - seen[pkgid] = 1 + seen[pkgid] = seen.get(pkgid, 0) + 1 builds.append(build)
return builds @@ -1220,6 +1221,7 @@ def readTaggedRPMS(tag, package=None, arch=None, event=None,inherit=False,latest set inherit=True to follow inheritance set event to query at a time in the past set latest=False to get all tagged RPMS (not just from the latest builds) + set latest=N to get only the N latest tagged RPMs
If type is not None, restrict the list to rpms from builds of the given type. Currently the supported types are 'maven' and 'win'. @@ -1309,6 +1311,7 @@ def readTaggedArchives(tag, package=None, event=None, inherit=False, latest=True set inherit=True to follow inheritance set event to query at a time in the past set latest=False to get all tagged archives (not just from the latest builds) + set latest=N to get only the N latest tagged RPMs
If type is not None, restrict the listing to archives of the given type. Currently the supported types are 'maven' and 'win'.
--- hub/kojihub.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hub/kojihub.py b/hub/kojihub.py index bb7d72a..a6360af 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -1133,6 +1133,9 @@ def readTaggedBuilds(tag,event=None,inherit=False,latest=False,package=None,owne # build - id pkg_id version release epoch # tag_listing - id build_id tag_id
+ if not isinstance(latest, (int, long, float)): + latest = bool(latest) + taglist = [tag] if inherit: taglist += [link['parent_id'] for link in readFullInheritance(tag, event)] @@ -1208,7 +1211,8 @@ def readTaggedBuilds(tag,event=None,inherit=False,latest=False,package=None,owne continue if latest: if (latest is True and seen.has_key(pkgid)) or seen.get(pkgid, 0) >= latest: - #only take the first (note ordering in query above) + # only take the first N entries + # (note ordering in query above) continue seen[pkgid] = seen.get(pkgid, 0) + 1 builds.append(build)
--- cli/koji | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/cli/koji b/cli/koji index f0f5f51..9f5c5b1 100755 --- a/cli/koji +++ b/cli/koji @@ -2578,6 +2578,7 @@ def anon_handle_list_tagged(options, session, args): parser.add_option("--rpms", action="store_true", help=_("Show rpms instead of builds")) parser.add_option("--inherit", action="store_true", help=_("Follow inheritance")) parser.add_option("--latest", action="store_true", help=_("Only show the latest builds/rpms")) + parser.add_option("--latest-n", type='int', metavar="N", help=_("Only show the latest N builds/rpms")) parser.add_option("--quiet", action="store_true", help=_("Do not print the header information"), default=options.quiet) parser.add_option("--paths", action="store_true", help=_("Show the file paths")) parser.add_option("--sigs", action="store_true", help=_("Show signatures")) @@ -2601,6 +2602,8 @@ def anon_handle_list_tagged(options, session, args): opts = {} for key in ('latest','inherit'): opts[key] = getattr(options, key) + if options.latest_n is not None: + opts['latest'] = options.latest_n if package: opts['package'] = package if options.arch:
On Fri, Feb 20, 2015 at 12:23:12PM -0500, Mike McLean wrote:
cli/koji | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/cli/koji b/cli/koji index f0f5f51..9f5c5b1 100755 --- a/cli/koji +++ b/cli/koji @@ -2578,6 +2578,7 @@ def anon_handle_list_tagged(options, session, args): parser.add_option("--rpms", action="store_true", help=_("Show rpms instead of builds")) parser.add_option("--inherit", action="store_true", help=_("Follow inheritance")) parser.add_option("--latest", action="store_true", help=_("Only show the latest builds/rpms"))
- parser.add_option("--latest-n", type='int', metavar="N", help=_("Only show the latest N builds/rpms")) parser.add_option("--quiet", action="store_true", help=_("Do not print the header information"), default=options.quiet) parser.add_option("--paths", action="store_true", help=_("Show the file paths")) parser.add_option("--sigs", action="store_true", help=_("Show signatures"))
@@ -2601,6 +2602,8 @@ def anon_handle_list_tagged(options, session, args): opts = {} for key in ('latest','inherit'): opts[key] = getattr(options, key)
- if options.latest_n is not None:
if package: opts['package'] = package if options.arch:opts['latest'] = options.latest_n
-- 1.9.3
-- buildsys mailing list buildsys@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/buildsys
Looks good!
On Fri, Feb 20, 2015 at 12:23:12PM -0500, Mike McLean wrote:
cli/koji | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/cli/koji b/cli/koji index f0f5f51..9f5c5b1 100755 --- a/cli/koji +++ b/cli/koji @@ -2578,6 +2578,7 @@ def anon_handle_list_tagged(options, session, args): parser.add_option("--rpms", action="store_true", help=_("Show rpms instead of builds")) parser.add_option("--inherit", action="store_true", help=_("Follow inheritance")) parser.add_option("--latest", action="store_true", help=_("Only show the latest builds/rpms"))
- parser.add_option("--latest-n", type='int', metavar="N", help=_("Only show the latest N builds/rpms")) parser.add_option("--quiet", action="store_true", help=_("Do not print the header information"), default=options.quiet) parser.add_option("--paths", action="store_true", help=_("Show the file paths")) parser.add_option("--sigs", action="store_true", help=_("Show signatures"))
@@ -2601,6 +2602,8 @@ def anon_handle_list_tagged(options, session, args): opts = {} for key in ('latest','inherit'): opts[key] = getattr(options, key)
- if options.latest_n is not None:
if package: opts['package'] = package if options.arch:opts['latest'] = options.latest_n
-- 1.9.3
Following up to see if this stuff actually got merged or is stuck blocking on something somewhere. I did't see it in the git history on fedorahosted when I checked this morning: https://git.fedorahosted.org/cgit/koji/
On 03/04/2015 09:07 AM, Ralph Bean wrote:
On Fri, Feb 20, 2015 at 12:23:12PM -0500, Mike McLean wrote:
cli/koji | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/cli/koji b/cli/koji index f0f5f51..9f5c5b1 100755 --- a/cli/koji +++ b/cli/koji @@ -2578,6 +2578,7 @@ def anon_handle_list_tagged(options, session, args): parser.add_option("--rpms", action="store_true", help=_("Show rpms instead of builds")) parser.add_option("--inherit", action="store_true", help=_("Follow inheritance")) parser.add_option("--latest", action="store_true", help=_("Only show the latest builds/rpms"))
- parser.add_option("--latest-n", type='int', metavar="N", help=_("Only show the latest N builds/rpms")) parser.add_option("--quiet", action="store_true", help=_("Do not print the header information"), default=options.quiet) parser.add_option("--paths", action="store_true", help=_("Show the file paths")) parser.add_option("--sigs", action="store_true", help=_("Show signatures"))
@@ -2601,6 +2602,8 @@ def anon_handle_list_tagged(options, session, args): opts = {} for key in ('latest','inherit'): opts[key] = getattr(options, key)
- if options.latest_n is not None:
opts['latest'] = options.latest_n if package: opts['package'] = package if options.arch:
-- 1.9.3
Following up to see if this stuff actually got merged or is stuck blocking on something somewhere. I did't see it in the git history on fedorahosted when I checked this morning: https://git.fedorahosted.org/cgit/koji/
Pushed now. sorry for the delay
-- buildsys mailing list buildsys@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/buildsys
On 02/20/2015 10:55 AM, Ralph Bean wrote:
This should preserve the pre-existing behavior, where if latest is set to True, only the latest builds in a tag are returned, and if latest is set to False, all the builds in a tag are returned.
The new behavior is a kind of middleground, where you can set latest=3, and only the latest three builds for each package in a tag are returned.
We want this ultimately for mashing rawhide so we can create a downgrade path for people if new builds break them. https://bugzilla.redhat.com/show_bug.cgi?id=1082830
Discussed and revised: https://lists.fedoraproject.org/pipermail/buildsys/2015-February/004541.html
Thanks for the updates. Working fine over here. Just a few followup tweaks.
hub/kojihub.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hub/kojihub.py b/hub/kojihub.py index f794d5d..62c6b95 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -1125,6 +1125,7 @@ def readTaggedBuilds(tag,event=None,inherit=False,latest=False,package=None,owne set inherit=True to follow inheritance set event to query at a time in the past set latest=True to get only the latest build per package
set latest=N to get only the N latest tagged RPMs
If type is not None, restrict the list to builds of the given type. Currently the supported types are 'maven', 'win', and 'image'.
@@ -1206,10 +1207,10 @@ def readTaggedBuilds(tag,event=None,inherit=False,latest=False,package=None,owne # list should take priority continue if latest:
if seen.has_key(pkgid):
if (latest is True and seen.has_key(pkgid)) or seen.get(pkgid, 0) >= latest: #only take the first (note ordering in query above) continue
seen[pkgid] = 1
seen[pkgid] = seen.get(pkgid, 0) + 1 builds.append(build) return builds
@@ -1220,6 +1221,7 @@ def readTaggedRPMS(tag, package=None, arch=None, event=None,inherit=False,latest set inherit=True to follow inheritance set event to query at a time in the past set latest=False to get all tagged RPMS (not just from the latest builds)
set latest=N to get only the N latest tagged RPMs
If type is not None, restrict the list to rpms from builds of the given type. Currently the supported types are 'maven' and 'win'.
@@ -1309,6 +1311,7 @@ def readTaggedArchives(tag, package=None, event=None, inherit=False, latest=True set inherit=True to follow inheritance set event to query at a time in the past set latest=False to get all tagged archives (not just from the latest builds)
set latest=N to get only the N latest tagged RPMs
If type is not None, restrict the listing to archives of the given type. Currently the supported types are 'maven' and 'win'.
buildsys@lists.fedoraproject.org