-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate default client IDs using host and client start time #255
Conversation
Hmm, macOS terminal and Chrome both want to break on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but probably warrants a changelog entry ✌️
OOC, are you actually using macOS terminal? I would've thought most River devs on Mac would be using iTerm, which does allow double-click across hyphens. It's definitely very system/app dependent though. |
7c47bd0
to
cc2b765
Compare
Here, move away from ULIDs for generating client IDs, and over to a custom ID generator that uses a combination of host and client start time. This has two benefits: * Host/start time are more descriptive for humans. It should give an operator a rough idea as to where the name of a client originated from, and if it's a client that's likely long dead (if the timestamp is very old). * Lets us drop our ULID package dependency, which we don't use for anything else. Generated IDs look like this for example: miniml2_local_2024_03_07T04_39_12 I've tried to arrange them so that on most systems you'll be able to double click on an ID to select the whole thing, which might be helpful while copying information or debugging a production problem. Characters like colons (`:`) are less friendly for double-click-to-select, so I've avoided them. Hyphens and dots aren't universally friendly for double click either (depends on program and configuration), so I've avoided those as well.
cc2b765
to
9415222
Compare
@bgentry Changed this to be all underscores instead like:
And added changelog. |
I think that's good at least to preserve double-click selectability in ~all platforms. People can customize this to their heart's desire so we don't need to stress too much about it IMO. They can use pod/container names, dyno names, etc. |
Yep, 100%. My thoughts too. |
Here, move away from ULIDs for generating client IDs, and over to a
custom ID generator that uses a combination of host and client start
time. This has two benefits:
Host/start time are more descriptive for humans. It should give an
operator a rough idea as to where the name of a client originated
from, and if it's a client that's likely long dead (if the timestamp
is very old).
Lets us drop our ULID package dependency, which we don't use for
anything else.
Generated IDs look like this for example:
I've tried to arrange them so that on most systems you'll be able to
double click on an ID to select the whole thing, which might be helpful
while copying information or debugging a production problem. Characters
like colons (
:
) are less friendly for double-click-to-select, so I'veavoided them. Hyphens and dots aren't universally friendly for double
click either (depends on program and configuration), so I've avoided
those as well.