Add helpful information for conflicting SCMTool/Tool entries.
Review Request #12391 — Created June 20, 2022 and submitted
Toolentry has been changed on a server to point to a different
SCMToolclass, we'll crash with an
IntegrityErrorwhen trying to
inject tools, due to a conflict in names.
We now check for both
class_nameconflicts. If we try to
Tool, and either the name or class (but not
both) matches an existing
Tool, we'll log a warning and record the
The upgrade handler looks to see if we detected any conflicting tools,
and if so, provides warnings and guidance on the conflict.
This will hopefully help for companies that have forked some
for their own needs.
Hit this issue when temporarily modifying a class name for a tool to
trigger an entirely different error, and saw the crash during upgrade.
Verified that this no longer crashes, but rather displays a block of
information with the details on the conflict.
Unit tests pass.