Add more info to merge mode selection errors
It can be confusing to know what merge modes are considered valid for a project when Zuul tells you: "Merge mode foo is not supported by project bar." Update this error message to include the list of merge modes that Zuul considers to be valid for the project to reduce confusion. Change-Id: If0d5cf1b06a93f3da507fba43077a5a9e327ca5e
This commit is contained in:
parent
b01446e8a8
commit
1d8ce7737e
|
@ -2697,8 +2697,11 @@ class TenantParser(object):
|
|||
if project_metadata.merge_mode not in tpc.merge_modes:
|
||||
mode = model.get_merge_mode_name(
|
||||
project_metadata.merge_mode)
|
||||
allowed_modes = list(map(model.get_merge_mode_name,
|
||||
tpc.merge_modes))
|
||||
raise Exception(f'Merge mode {mode} not supported '
|
||||
f'by project {project_name}')
|
||||
f'by project {project_name}. '
|
||||
f'Supported modes: {allowed_modes}.')
|
||||
|
||||
def _parseLayout(self, tenant, data, loading_errors, layout_uuid=None):
|
||||
# Don't call this method from dynamic reconfiguration because
|
||||
|
|
Loading…
Reference in New Issue