Add helpful information for conflicting SCMTool/Tool entries.
Review Request #12391 — Created June 20, 2022 and submitted
If a
Toolentry has been changed on a server to point to a different
SCMToolclass, we'll crash with anIntegrityErrorwhen trying to
inject tools, due to a conflict in names.We now check for both
nameandclass_nameconflicts. If we try to
record aSCMToolas aTool, and either the name or class (but not
both) matches an existingTool, we'll log a warning and record the
conflicting tool.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
SCMTool
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.
| Summary | ID |
|---|---|
| 8ff9f8c92085a3927834d1aa37c02d3ca22ffc15 |