Skip to content

Commit 70a1e31

Browse files
committed
Clarify rhbz support for Bug.update alias
1 parent 1c6f67b commit 70a1e31

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

bugzilla/rhbugzilla.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,22 @@ def get_sub_component():
104104
val = {component[0]: val}
105105
adddict["sub_components"] = val
106106

107+
def get_alias():
108+
# RHBZ has a custom extension to allow a bug to have multiple
109+
# aliases, so the format of aliases is
110+
# {"add": [...], "remove": [...]}
111+
# But that means in order to approximate upstream, behavior
112+
# which just overwrites the existing alias, we need to read
113+
# the bug's state first to know what string to remove. Which
114+
# we can't do, since we don't know the bug numbers at this point.
115+
# So fail for now.
116+
#
117+
# The API should provide {"set": [...]}
118+
# https://bugzilla.redhat.com/show_bug.cgi?id=1173114
119+
if "alias" in kwargs:
120+
raise RuntimeError("modify 'alias' not supported for "
121+
"RHBZ")
122+
107123
pop("fixed_in", "cf_fixed_in")
108124
pop("qa_whiteboard", "cf_qa_whiteboard")
109125
pop("devel_whiteboard", "cf_devel_whiteboard")

tests/rw_functional.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,9 @@ def test4NewBugAllFields(self):
174174

175175
# Close the bug
176176

177-
# modify alias is busted on the bugzilla side
178-
# https://bugzilla.redhat.com/show_bug.cgi?id=1172855
177+
# RHBZ makes it difficult to provide consistent semantics for
178+
# 'alias' update:
179+
# https://bugzilla.redhat.com/show_bug.cgi?id=1173114
179180
# alias += "-closed"
180181
tests.clicomm("bugzilla modify "
181182
"--close WONTFIX %s " %

0 commit comments

Comments
 (0)