[go: up one dir, main page]

Skip to content

Come up with more user-friendly scheme for random workspace names

MR:

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 the id of the group containing the project.

Benefits

  1. User Experience: Memorable, human-readable workspace names
  2. Debugging: Easier to identify and reference specific workspaces
  3. 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