internal/namesgenerator: spark less controversy#52097
internal/namesgenerator: spark less controversy#52097corhere wants to merge 1 commit intomoby:masterfrom
Conversation
Replace the controversial list of people's names with a new pair of word lists. Neither list is manually curated to avoid any bike-shedding of individual entries. Each of the lists is the complete enumeration of a rigorously defined set of words that are unlikely to attract controversy. Signed-off-by: Cory Snider <[email protected]>
| // IUPAC names of the elements of the periodic table which have | ||
| // primordial nuclides. |
There was a problem hiding this comment.
If there is any concern about uranium being in the list we can tweak the set definition to exclude it:
| // IUPAC names of the elements of the periodic table which have | |
| // primordial nuclides. | |
| // IUPAC names of the elements of the periodic table which have | |
| // at least one stable primordial nuclide, as of 2026 February 26. |
That definition excludes bismuth, thorium and uranium from the set.
(The date freeze is necessary to make it a closed set because nuclides may move from the stable column to the decaying column as the science improves.)
|
Wonder if we could have this package in https://github.com/moby/sys so we can use it in downstream projects like buildx to stay consistent related to docker/buildx#3354 ? |
I actually wonder if buildx SHOULD follow the same naming; there's bits where it's adding more confusion than if not; see docker/buildx#3326 (comment) |
| // GetRandomName generates a random name from the list of adjectives and surnames in this package | ||
| // formatted as "adjective_surname". For example 'focused_turing'. If retry is non-zero, a random | ||
| // integer between 0 and 10 will be added to the end of the name, e.g `focused_turing3` | ||
| func GetRandomName(retry int) string { |
There was a problem hiding this comment.
Do we even need random names?
nerdctl just uses base(imageName) + "-" + containerID[:5].
e.g., nginx-09d23
$ nerdctl ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
09d239745287 docker.io/library/nginx:alpine "/docker-entrypoint.…" 1 second ago Up nginx-09d23There was a problem hiding this comment.
I like this - specifically the imageName part. It makes it easier to recognize the container by just looking at the name.
| // IUPAC names of the elements of the periodic table which have | ||
| // primordial nuclides. | ||
| // https://en.wikipedia.org/w/index.php?title=List_of_elements_by_stability_of_isotopes&oldid=1333877059 | ||
| element = [...]string{ |
There was a problem hiding this comment.
Some elements are literally toxic
- What I did
Replace the controversial list of people's names with a new pair of word lists. Neither list is manually curated to avoid any bike-shedding of individual entries.
- How I did it
Each of the lists is the complete enumeration of a rigorously defined set of words that are unlikely to attract controversy.
- How to verify it
- Human readable description for the release notes
- container names are no longer generated with the names of any notable individuals- A picture of a cute animal (not mandatory but encouraged)