| |
@@ -226,26 +226,26 @@
|
| |
|
| |
for bug in query_results:
|
| |
if bug.assigned_to == old_poc and bug.assigned_to != new_poc:
|
| |
- if _log.isEnabledFor(logging.DEBUG):
|
| |
- temp_old_poc = bug.assigned_to
|
| |
- temp_new_poc = new_poc
|
| |
- if print_fas_names:
|
| |
- if temp_old_poc in fas_users_info:
|
| |
- temp_old_poc = fas_users_info[old_poc]
|
| |
- else:
|
| |
- temp_old_poc = old_poc.split("@", 1)[0] + "@..."
|
| |
- if temp_new_poc in fas_users_info:
|
| |
- temp_new_poc = fas_users_info[new_poc]
|
| |
- else:
|
| |
- temp_new_poc = new_poc.split("@", 1)[0] + "@..."
|
| |
- _log.debug(
|
| |
- "%s/%s reassigning bug #%s from %s to %s",
|
| |
- product,
|
| |
- package,
|
| |
- bug.bug_id,
|
| |
- temp_old_poc,
|
| |
- temp_new_poc,
|
| |
- )
|
| |
+
|
| |
+ temp_old_poc = bug.assigned_to
|
| |
+ temp_new_poc = new_poc
|
| |
+ if print_fas_names:
|
| |
+ if temp_old_poc in fas_users_info:
|
| |
+ temp_old_poc = fas_users_info[old_poc]
|
| |
+ else:
|
| |
+ temp_old_poc = old_poc.split("@", 1)[0] + "@..."
|
| |
+ if temp_new_poc in fas_users_info:
|
| |
+ temp_new_poc = fas_users_info[new_poc]
|
| |
+ else:
|
| |
+ temp_new_poc = new_poc.split("@", 1)[0] + "@..."
|
| |
+ _log.info(
|
| |
+ "%s/%s reassigning bug #%s from %s to %s",
|
| |
+ product,
|
| |
+ package,
|
| |
+ bug.bug_id,
|
| |
+ temp_old_poc,
|
| |
+ temp_new_poc,
|
| |
+ )
|
| |
|
| |
if not dry_run:
|
| |
try:
|
| |
@@ -304,7 +304,7 @@
|
| |
"""
|
| |
server = get_bz()
|
| |
if retired:
|
| |
- _log.debug("[NOADD] %s/%s is retired", product, package)
|
| |
+ _log.info("[NOADD] %s/%s is retired", product, package)
|
| |
return
|
| |
|
| |
data = {
|
| |
@@ -318,47 +318,44 @@
|
| |
if cc_list:
|
| |
data["initialcclist"] = cc_list
|
| |
|
| |
- if _log.isEnabledFor(logging.DEBUG):
|
| |
- for key in [
|
| |
+ for key in [
|
| |
+ "initialowner",
|
| |
+ "description",
|
| |
+ "initialqacontact",
|
| |
+ "initialcclist",
|
| |
+ "is_active",
|
| |
+ ]:
|
| |
+ if print_fas_names and key in [
|
| |
"initialowner",
|
| |
- "description",
|
| |
"initialqacontact",
|
| |
"initialcclist",
|
| |
- "is_active",
|
| |
]:
|
| |
- if print_fas_names and key in [
|
| |
- "initialowner",
|
| |
- "initialqacontact",
|
| |
- "initialcclist",
|
| |
- ]:
|
| |
- if key == "initialowner":
|
| |
- # Print bugzilla e-mail if FAS name is not found
|
| |
- # This shouldn't happen, but to be safe
|
| |
- value = fas_users_info.get(owner, owner)
|
| |
-
|
| |
- if key == "initialqacontact":
|
| |
- # Print bugzilla e-mail if FAS name is not found
|
| |
- # This shouldn't happen, but to be safe
|
| |
- value = fas_users_info.get(qa_contact, qa_contact)
|
| |
-
|
| |
- if key == "initialcclist":
|
| |
- # Print bugzilla e-mail if FAS name is not found
|
| |
- # This shouldn't happen, but to be safe
|
| |
- value = [
|
| |
- fas_users_info.get(cc_user, cc_user) for cc_user in cc_list
|
| |
- ]
|
| |
-
|
| |
- _log.debug(
|
| |
- "[ADDCOMP] %s/%s %s set to FAS name(s) `%s`",
|
| |
- product,
|
| |
- package,
|
| |
- key,
|
| |
- value,
|
| |
- )
|
| |
- else:
|
| |
- _log.debug(
|
| |
- "[ADDCOMP] %s/%s %s set to `%s`", product, package, key, data[key]
|
| |
- )
|
| |
+ if key == "initialowner":
|
| |
+ # Print bugzilla e-mail if FAS name is not found
|
| |
+ # This shouldn't happen, but to be safe
|
| |
+ value = fas_users_info.get(owner, owner)
|
| |
+
|
| |
+ if key == "initialqacontact":
|
| |
+ # Print bugzilla e-mail if FAS name is not found
|
| |
+ # This shouldn't happen, but to be safe
|
| |
+ value = fas_users_info.get(qa_contact, qa_contact)
|
| |
+
|
| |
+ if key == "initialcclist":
|
| |
+ # Print bugzilla e-mail if FAS name is not found
|
| |
+ # This shouldn't happen, but to be safe
|
| |
+ value = [fas_users_info.get(cc_user, cc_user) for cc_user in cc_list]
|
| |
+
|
| |
+ _log.info(
|
| |
+ "[ADDCOMP] %s/%s %s set to FAS name(s) `%s`",
|
| |
+ product,
|
| |
+ package,
|
| |
+ key,
|
| |
+ value,
|
| |
+ )
|
| |
+ else:
|
| |
+ _log.info(
|
| |
+ "[ADDCOMP] %s/%s %s set to `%s`", product, package, key, data[key]
|
| |
+ )
|
| |
|
| |
if not dry_run:
|
| |
try:
|
| |
@@ -449,68 +446,67 @@
|
| |
data["product"] = product
|
| |
data["component"] = package
|
| |
|
| |
- if _log.isEnabledFor(logging.DEBUG):
|
| |
- for key in [
|
| |
+ for key in [
|
| |
+ "initialowner",
|
| |
+ "description",
|
| |
+ "initialqacontact",
|
| |
+ "initialcclist",
|
| |
+ "is_active",
|
| |
+ ]:
|
| |
+ if data.get(key) is not None:
|
| |
+ old_value = component[key]
|
| |
+ if isinstance(old_value, list):
|
| |
+ old_value = sorted(old_value)
|
| |
+ new_value = data.get(key)
|
| |
+ if isinstance(new_value, list):
|
| |
+ new_value = sorted(new_value)
|
| |
+
|
| |
+ if print_fas_names and key in [
|
| |
"initialowner",
|
| |
- "description",
|
| |
"initialqacontact",
|
| |
"initialcclist",
|
| |
- "is_active",
|
| |
]:
|
| |
+ if key == "initialowner":
|
| |
+ # Print bugzilla e-mail if FAS name is not found
|
| |
+ # This shouldn't happen, but to be safe
|
| |
+ old_value = fas_users_info.get(component[key], component[key])
|
| |
+ new_value = fas_users_info.get(owner, owner)
|
| |
+
|
| |
+ if key == "initialqacontact":
|
| |
+ # Print bugzilla e-mail if FAS name is not found
|
| |
+ # This shouldn't happen, but to be safe
|
| |
+ old_value = fas_users_info.get(component[key], component[key])
|
| |
+ new_value = fas_users_info.get(qa_contact, qa_contact)
|
| |
+
|
| |
+ if key == "initialcclist":
|
| |
+ # Print bugzilla e-mail if FAS name is not found
|
| |
+ # This shouldn't happen, but to be safe
|
| |
+ old_value = [
|
| |
+ fas_users_info.get(cc_user, cc_user)
|
| |
+ for cc_user in component[key]
|
| |
+ ]
|
| |
+ new_value = [
|
| |
+ fas_users_info.get(cc_user, cc_user) for cc_user in cc_list
|
| |
+ ]
|
| |
+
|
| |
+ _log.info(
|
| |
+ "[EDITCOMP] %s/%s %s changed from `%s` to FAS name(s) `%s`",
|
| |
+ product,
|
| |
+ package,
|
| |
+ key,
|
| |
+ old_value,
|
| |
+ new_value,
|
| |
+ )
|
| |
+ else:
|
| |
if data.get(key) is not None:
|
| |
- old_value = component[key]
|
| |
- if isinstance(old_value, list):
|
| |
- old_value = sorted(old_value)
|
| |
- new_value = data.get(key)
|
| |
- if isinstance(new_value, list):
|
| |
- new_value = sorted(new_value)
|
| |
-
|
| |
- if print_fas_names and key in [
|
| |
- "initialowner",
|
| |
- "initialqacontact",
|
| |
- "initialcclist",
|
| |
- ]:
|
| |
- if key == "initialowner":
|
| |
- # Print bugzilla e-mail if FAS name is not found
|
| |
- # This shouldn't happen, but to be safe
|
| |
- old_value = fas_users_info.get(component[key], component[key])
|
| |
- new_value = fas_users_info.get(owner, owner)
|
| |
-
|
| |
- if key == "initialqacontact":
|
| |
- # Print bugzilla e-mail if FAS name is not found
|
| |
- # This shouldn't happen, but to be safe
|
| |
- old_value = fas_users_info.get(component[key], component[key])
|
| |
- new_value = fas_users_info.get(qa_contact, qa_contact)
|
| |
-
|
| |
- if key == "initialcclist":
|
| |
- # Print bugzilla e-mail if FAS name is not found
|
| |
- # This shouldn't happen, but to be safe
|
| |
- old_value = [
|
| |
- fas_users_info.get(cc_user, cc_user)
|
| |
- for cc_user in component[key]
|
| |
- ]
|
| |
- new_value = [
|
| |
- fas_users_info.get(cc_user, cc_user) for cc_user in cc_list
|
| |
- ]
|
| |
-
|
| |
- _log.debug(
|
| |
- "[EDITCOMP] %s/%s %s changed from `%s` to FAS name(s) `%s`",
|
| |
+ _log.info(
|
| |
+ "[EDITCOMP] %s/%s %s changed from `%s` to `%s`",
|
| |
product,
|
| |
package,
|
| |
key,
|
| |
old_value,
|
| |
new_value,
|
| |
)
|
| |
- else:
|
| |
- if data.get(key) is not None:
|
| |
- _log.debug(
|
| |
- "[EDITCOMP] %s/%s %s changed from `%s` to `%s`",
|
| |
- product,
|
| |
- package,
|
| |
- key,
|
| |
- old_value,
|
| |
- new_value,
|
| |
- )
|
| |
owner_changed = "initialowner" in data
|
| |
|
| |
# FIXME: initialowner has been made mandatory for some
|
| |
@@ -542,7 +538,7 @@
|
| |
|
| |
else:
|
| |
if print_no_change:
|
| |
- _log.debug("[NOCHANGE] %s/%s", product, package)
|
| |
+ _log.info("[NOCHANGE] %s/%s", product, package)
|
| |
|
| |
|
| |
def execute_bugzilla_call(
|
| |