Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: replace moby/moby namesgenerator with internal implementation#21377

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
zedkipp wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromzedkipp/namesgenerator

Conversation

@zedkipp
Copy link
Contributor

The moby/moby/pkg/namesgenerator package has ~25k unique name combinations. With the retry parameter, which is awkwardly an integer that only differs in behavior when the value is > 0, it only adds a single digit (0-9), giving ~250k total possibilities. It also uses the math/rand package internally with the default seed which is deterministically random. In parallel tests, this combination has experienced collisions.

This replaces the external dependency with an internal implementation that uses a monotonically increasing atomic counter instead of random digits, guaranteeing uniqueness within a process. Names continue to be truncated to 32 characters (including atomic counter suffix) to fit common name length limits for test purposes.

@zedkippzedkippforce-pushed thezedkipp/namesgenerator branch 3 times, most recently from7ed462c to3b1a5a7CompareDecember 22, 2025 20:28
The moby/moby/pkg/namesgenerator package has ~25k unique name combinations. Withthe retry parameter, which is awkwardly an integer that only differs in behaviorwhen the value is > 0, it only adds a single digit (0-9), giving ~250k totalpossibilities. It also uses the math/rand package internally with the default seedwhich is deterministically random. In parallel tests, this combination hasexperienced collisions.This replaces the external dependency with an internal implementation that uses amonotonically increasing atomic counter instead of random digits, guaranteeinguniqueness within a process. Names in tests continue to be truncated to 32 characters(including atomic counter suffix) to fit common name length limits.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@zedkippzedkipp

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@zedkipp

[8]ページ先頭

©2009-2025 Movatter.jp