• 
      

    Add SCMTool.lookup_name, and use it instead of name for registration.

    Review Request #13475 — Created Jan. 1, 2024 and submitted

    Information

    Review Board
    release-6.x

    Reviewers

    We'll soon be in a position where one of our bundled SCMTools will need
    its name changed. Doing so would result in Tool DB entry conflicts and
    registry lookup issues, impacting the API and repositories.

    To prepare for this, a new attribute is being introduced to provide a
    stable name for lookup purposes: SCMTool.lookup_name.

    This defaults to SCMTool.name (by way of an overridable
    classproperty). Subclasses can override this to specify an explicit
    name when they're going to change their name property.

    lookup_name is used for registration, lookup, conflict resolution, and
    Tool object creation. This ensures that, behind the scenes, nothing
    changes for any tools. We simply need to make sure we set lookup_name
    on any SCMTool when we're ready to change name.

    Unit tests pass.

    Tested this with the upcoming Plastic work, ensuring that the tool and
    all registry-related operations worked when changing name and setting
    lookup_name.

    Summary ID
    Add SCMTool.lookup_name, and use it instead of name for registration.
    We'll soon be in a position where one of our bundled SCMTools will need its name changed. Doing so would result in `Tool` DB entry conflicts and registry lookup issues, impacting the API and repositories. To prepare for this, a new attribute is being introduced to provide a stable name for lookup purposes: `SCMTool.lookup_name`. This defaults to `SCMTool.name` (by way of an overridable `classproperty`). Subclasses can override this to specify an explicit name when they're going to change their `name` property. `lookup_name` is used for registration, lookup, conflict resolution, and `Tool` object creation. This ensures that, behind the scenes, nothing changes for any tools. We simply need to make sure we set `lookup_name` on any `SCMTool` when we're ready to change `name`.
    a15f7a0c7b3094462f93187f2936c0d239fb827c
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-6.x (8584c37)