Disable notifications from clone-tag by default
The tagBuildBypass and untagBuildBypass invocations in the clone-tag CLI were not setting the notify option, leaving it at the default of True. This means in some cases many hundreds of notification events would be triggered from a clone-tag call. Change the default behavior of clone-tag to explicitly disable notifications Add a new --notify option to clone-tag to re-enable notifications for tagging and untagging of builds. Fixes: #1890
This commit is contained in:
parent
e4062ea1ea
commit
ff1996564c
2 changed files with 31 additions and 14 deletions
|
|
@ -3272,6 +3272,8 @@ def handle_clone_tag(goptions, session, args):
|
|||
help=_('Clone tag at a specific repo event'))
|
||||
parser.add_option("-v", "--verbose", action="store_true",
|
||||
help=_("show changes"))
|
||||
parser.add_option("--notify", action="store_true", default=False,
|
||||
help=_('Send tagging/untagging notifications'))
|
||||
parser.add_option("-f", "--force", action="store_true",
|
||||
help=_("override tag locks if necessary"))
|
||||
parser.add_option("-n", "--test", action="store_true", help=_("test mode"))
|
||||
|
|
@ -3371,7 +3373,8 @@ def handle_clone_tag(goptions, session, args):
|
|||
if not options.test:
|
||||
session.tagBuildBypass(newtag['name'],
|
||||
build,
|
||||
force=options.force)
|
||||
force=options.force,
|
||||
notify=options.notify)
|
||||
if not options.test:
|
||||
session.multiCall(batch=options.batch)
|
||||
if options.groups:
|
||||
|
|
@ -3546,7 +3549,8 @@ def handle_clone_tag(goptions, session, args):
|
|||
if not options.test:
|
||||
session.untagBuildBypass(dsttag['name'],
|
||||
build,
|
||||
force=options.force)
|
||||
force=options.force,
|
||||
notify=options.notify)
|
||||
if not options.test:
|
||||
session.multiCall(batch=options.batch)
|
||||
# ADD builds.
|
||||
|
|
@ -3565,7 +3569,8 @@ def handle_clone_tag(goptions, session, args):
|
|||
if not options.test:
|
||||
session.tagBuildBypass(dsttag['name'],
|
||||
build,
|
||||
force=options.force)
|
||||
force=options.force,
|
||||
notify=options.notify)
|
||||
if not options.test:
|
||||
session.multiCall(batch=options.batch)
|
||||
# ADD groups.
|
||||
|
|
@ -3631,7 +3636,8 @@ def handle_clone_tag(goptions, session, args):
|
|||
if not options.test:
|
||||
session.untagBuildBypass(dsttag['name'],
|
||||
build,
|
||||
force=options.force)
|
||||
force=options.force,
|
||||
notify=options.notify)
|
||||
# now safe to remove package itself since we resolved its builds.
|
||||
chgpkglist.append(('[del]',
|
||||
pkg['package_name'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue