Come up with more user-friendly scheme for random workspace names
MR:
- Generate a user-friendly name for workspaces (!202750 - merged) • Ashvin Sharma • 18.4
- Optimize workspace names length (!204625 - merged) • Ashvin Sharma • 18.5
Problem Statement
Currently, workspaces use basic random alphanumeric strings for naming which are not user-friendly or memorable. This makes it difficult for users to:
- Identify their workspaces at a glance
- Debug issues when multiple workspaces exist
Proposed Solution
Implement a naming scheme using combinations of adjectives and nouns (e.g., clever-einstein
, happy-penguin
, focused-curie
) similar to how Docker generates container names.
Acceptance Criteria
-
Replace SecureRandom.alphanumeric
with adjective-noun combination generator -
Ensure global uniqueness with collision detection and retry mechanism -
Add following keys in the annotations -
workspaces.gitlab.com/agentk_id
-
workspaces.gitlab.com/project_id
- this will be optional if we add project-less workspaces -
workspaces.gitlab.com/namespace_id
- this is the GitLab group AKA namespace - we don't call it group_id because in the future we may support also personal namespaces. For now, this would be theid
of the group containing the project.
-
Benefits
- User Experience: Memorable, human-readable workspace names
- Debugging: Easier to identify and reference specific workspaces
- Communication: Teams can easily discuss workspaces by name when we have shared workspaces
References
- Docker's naming implementation:
[moby/moby names-generator.go](https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go)
- Current code location:
ee/lib/remote_development/workspaces/create/create_processor.rb
Edited by Ashvin Sharma