Request to allow users to edit Workspaces OAuth Token scopes to enable PostStart command block execution

Proposal

Using GitLab Workspaces with pre-built private images result in the commands under the postStart script block to not execute properly or consistently. This is due to the Workspaces OAuth token not the having sufficient scope (read_registry) to pull images from private container registries:

  Example devfile change:
  # Before (failed with ImagePullBackOff):
  image: "<PRIVATE_REGISTRY_URL>:5050/my-group/my-project:latest"

  # After (works):
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images/workspaces/ubuntu-24.04:..."
  events:
    postStart:
      - install-deps  # pip install at runtime

Using public GitLab workspace base images properly execute commands in the postStart block.

However, we would like the ability for those using Self-Managed instances and using private registries to be able to modify or add the read_registry scope to the Workspaces OAuth token.

Including this feature allows for users to use the commands in the postStart block and introduces flexibility for those that are using GitLab Workspaces with images from private container registries.

Assignee Loading
Time tracking Loading