Skip to content

store: remove uses of docker namesgenerator#3354

Open
thaJeztah wants to merge 2 commits intodocker:masterfrom
thaJeztah:remove_namesgenerator
Open

store: remove uses of docker namesgenerator#3354
thaJeztah wants to merge 2 commits intodocker:masterfrom
thaJeztah:remove_namesgenerator

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented Aug 5, 2025

It will not be part of the api or client modules, so replace it with a local implementation, that's not using names of hackers/scientists, so that we don't have to carry the debates around those choices here.

Thanks to ChatGPT for generating some lists (I haven't fully checked them).

jsternberg
jsternberg previously approved these changes Aug 5, 2025
@thaJeztah
Copy link
Copy Markdown
Member Author

@crazy-max PTAL

@crazy-max crazy-max requested a review from Copilot August 7, 2025 07:42

This comment was marked as outdated.

@crazy-max
Copy link
Copy Markdown
Member

Thanks to ChatGPT for generating some lists (I haven't fully checked them).

Asked Copilot about this list:

Reviewing the provided lists of adjectives and nouns, I do not see any words that are widely considered controversial, offensive, or inappropriate in general English usage. The words are fairly neutral and commonly found in random name generators for things like containers or temporary objects.

However, a few things to consider:

  • "Lazy" and "odd" (adjectives) can carry slightly negative connotations (e.g., describing something as lazy or odd), but they are not offensive.
  • Some words could be interpreted as negative depending on the context, such as "void," "crash," "shock," "crash," "void," "crash," or "null" (though "null" is not in your list, "void" and "crash" are).
  • "Blank" might be interpreted negatively in some contexts.
  • There are no slurs, profanities, or terms with cultural or historical baggage.

If you are especially concerned about user sensitivity or brand image, you may wish to review or filter out words that could be perceived as negative or unprofessional in some combinations (e.g., "lazy-crash" or "odd-void"), even though none are inherently controversial.

@thaJeztah
Copy link
Copy Markdown
Member Author

LOL fight of the AI - ChatGPT created the list.

I'll probably split the list to 1 word per line; easier to add/remove things and to spot duplicates.

Will update in a bit

@thaJeztah thaJeztah force-pushed the remove_namesgenerator branch from 358ec12 to 87a05fb Compare August 7, 2025 12:11
@thaJeztah thaJeztah requested a review from Copilot August 7, 2025 12:34

This comment was marked as outdated.

@thaJeztah
Copy link
Copy Markdown
Member Author

Oh! Need to remove those words it flagged as possibly offensive. Funny because I told ChatGPT to take that into account but already noticed it didn't do a great job

@thaJeztah thaJeztah force-pushed the remove_namesgenerator branch 2 times, most recently from b4c3d6c to dfbb95e Compare August 7, 2025 13:02
@crazy-max
Copy link
Copy Markdown
Member

Oh! Need to remove those words it flagged as possibly offensive. Funny because I told ChatGPT to take that into account but already noticed it didn't do a great job

Yeah might not be the same model

@thaJeztah thaJeztah force-pushed the remove_namesgenerator branch from 326e142 to 108ab3d Compare August 7, 2025 14:11
@thaJeztah thaJeztah requested a review from Copilot August 7, 2025 19:39

This comment was marked as outdated.

@thaJeztah thaJeztah force-pushed the remove_namesgenerator branch from 108ab3d to 0e64cb9 Compare August 7, 2025 19:44
@thaJeztah thaJeztah requested a review from Copilot August 7, 2025 19:44

This comment was marked as outdated.

AkihiroSuda
AkihiroSuda previously approved these changes Aug 20, 2025
@thaJeztah
Copy link
Copy Markdown
Member Author

Oh! Let me check those last comments from CoPilot, LOL, I thought "let me put AI to use for silly tasks like generating a unique list", and it failed miserably every time.

@thaJeztah thaJeztah force-pushed the remove_namesgenerator branch from 0e64cb9 to 1e5f5fa Compare August 20, 2025 07:49
@thaJeztah
Copy link
Copy Markdown
Member Author

thaJeztah commented Aug 20, 2025

Updated the list

@thaJeztah thaJeztah requested a review from Copilot August 20, 2025 07:51

This comment was marked as outdated.

@thaJeztah thaJeztah force-pushed the remove_namesgenerator branch from 1e5f5fa to b642e05 Compare August 20, 2025 07:57
@thaJeztah thaJeztah requested a review from Copilot August 20, 2025 07:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the Docker namesgenerator dependency with a local implementation to avoid carrying debates around the choice of names (hackers/scientists) used in the Docker package. The change maintains the same random name generation functionality while using neutral adjectives, nouns, and themes.

  • Removes external dependency on github.com/docker/docker/pkg/namesgenerator
  • Implements local name generation using three word lists (adjectives, nouns, themes)
  • Updates the random number generation to use math/rand/v2

Reviewed Changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.

File Description
store/util.go Updates name generation logic to use local word lists and new random API
store/random_names.go Adds three word lists for generating random names with neutral vocabulary

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jsternberg
Copy link
Copy Markdown
Collaborator

I think my understanding of where this issue landed was that @tonistiigi didn't want us to have a separate names generator or maintain separate code for buildx. I propose that either we close this PR or that we move this new names generator into the docker/cli repository or moby/sys. If it's in either of those, I think we can use those as dependencies.

@thaJeztah
Copy link
Copy Markdown
Member Author

thaJeztah commented Mar 30, 2026

The "notable names" based generator will be sunset entirely, and won't be a separate module; moby/moby#52097

But I still wonder if buildx should use a different naming altogether for builders; see #3326 (comment)

We may have something like this (just a really quick write-up without giving it much thought);

docker buildx ls
CONTEXT/INSTANCE       DRIVER             STATUS     BUILDKIT   PLATFORMS
desktop-linux *         
 \_ desktop-linux      docker             running    v0.25.1    linux/amd64 (+2), linux/arm64, linux/ppc64le, linux/s390x, (2 more)
 \_ desktop-linux0     docker-container   error
 \_ desktop-linux1     docker-container   inactive

I'm not 100% sure what the exact use-cases are for multiple builders per context; I could see this being to namespace builds, but (see my earlier comment), perhaps that's something we should look into in a wider scope to namespace objects (containers, volumes, builders, networks).

It will not be part of the api or client modules, so replace it with
a local implementation, that's not using names of hackers/scientists,
so that we don't have to carry the debates around those choices here.

Thanks to ChatGPT for generating some lists (I haven't fully checked
them).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the remove_namesgenerator branch from b642e05 to 81c358a Compare March 30, 2026 15:57
@jsternberg
Copy link
Copy Markdown
Collaborator

@tonistiigi would you be ok if I resolved this by removing any random namesgenerator to begin with and change the naming to be ${driver}-${rand} or something similar to one of the proposals in moby? Then we can avoid any names generator to begin with.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants