Skip to content

[Diagram Editor] Generate simpler operation IDs that express the operation #220

Description

@mxgrey

Currently we automatically generate a unique ID for each operation using a full UUID. While this has the positive property of virtually guaranteeing uniqueness for all time, that's not the most useful property that we could have.

In practice, the operation ID is often used in error messages that a user might want to read and make sense of. In particular, it's used in help messages that give the user hints about what connections are valid.

Right now seeing the full auto-generated UUID in the help message is

  • taking up too much space
  • making it harder to read the help message
  • making it hard to know which operation is being referred to in the message

There will never be so many operations in a diagram that we would need a full 128 bit UUID to ensure uniqueness. Instead we should generate shorter IDs that say something about the underlying operation in it. We can append a randomly generated 6-character alphanumeric key afterwards. For example:

  • Fork Clone operation -> clone_F7ABXC
  • Fork result operation -> result_BCV89D
  • Node with an add builder -> node_add_WD87DA
  • Script running an execute function -> script_execute_JI85ER

Indicating the type of operation gives instant context to the user, and using a 6-character code will be much easier for the user to recognize and track down the operation of interest.

In some cases an operation or choice of node builder may change, which would require us to update this ID to keep it consistent. Whenever a relevant operation property changes (e.g. the choice of node builder) we should automatically update the ID.

If a user manually types in an ID, then we should stop automatically generating the ID and stick with the one set by the user. If the user deletes their manually generated ID and leaves the ID field blank then we should go back to automatically generating them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions