You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The koji_tag module calls a validate_repos() method to ensure that the playbook author has specified valid inputs for external_repos. The playbook author must specify a unique name string and priority integer for each external repository. This method will raise DuplicateNameError or DuplicatePriorityError if the user specifies invalid inputs.
We should do the same validation check for the tag inheritance values.
This will help us catch errors earlier when we apply tag inheritance in check mode. This is important when a playbook might assemble the final tag inheritance value from a couple different variables, and the final impact is not immediately clear when a user changes one variable without looking at all the others.
Note: thankfully the Koji Hub will raise GenericError: Inheritance priorities must be unique or GenericError: Changes should not contain duplicated parent_id if the user specifies invalid inputs live, so this is already solved for "live" mode on the server-side. We just need to implement the validation client-side to improve the check mode UX.
The
koji_tag
module calls avalidate_repos()
method to ensure that the playbook author has specified valid inputs forexternal_repos
. The playbook author must specify a uniquename
string andpriority
integer for each external repository. This method will raiseDuplicateNameError
orDuplicatePriorityError
if the user specifies invalid inputs.We should do the same validation check for the tag
inheritance
values.This will help us catch errors earlier when we apply tag inheritance in check mode. This is important when a playbook might assemble the final tag inheritance value from a couple different variables, and the final impact is not immediately clear when a user changes one variable without looking at all the others.
Note: thankfully the Koji Hub will raise
GenericError: Inheritance priorities must be unique
orGenericError: Changes should not contain duplicated parent_id
if the user specifies invalid inputs live, so this is already solved for "live" mode on the server-side. We just need to implement the validation client-side to improve the check mode UX.Second note: I've updated the server-side message text to be clearer, at https://pagure.io/koji/pull-request/3208, and discussed adding
DuplicatePriorityError
in https://pagure.io/koji/pull-request/3152The text was updated successfully, but these errors were encountered: