Skip to content

E2E workspace-name fallback can resolve an unrelated DevWorkspace #23993

Open

Description

@sameekshyaranjan

Describe the bug

ApiUrlResolver.resolveWorkspaceName() can resolve a missing workspace name to a different DevWorkspace whose Kubernetes resource name merely starts with the requested name plus a hyphen. The fallback accepts any nonempty alphanumeric suffix. TestWorkspaceUtil.stopWorkspaceByName() and deleteWorkspaceByName() use the resulting URL, so cleanup can stop or delete the wrong workspace.

Steps to reproduce

  1. Ensure there is no DevWorkspace with metadata.name: workspace.
  2. Have a separate DevWorkspace with metadata.name: workspace-2 and display-name label kubernetes.io/metadata.name: workspace-2.
  3. Call getWorkspaceApiUrl('workspace') (or stopWorkspaceByName('workspace')).

Actual: the resolver returns the API URL for workspace-2.

Expected: the resolver reports that workspace was not found. A restored resource such as workspace-4fnq should remain resolvable when its display-name label is workspace.

Code references

Why it matters

A name collision during E2E cleanup can act on a workspace other than the one the test requested. Checking the DevWorkspace display-name label before accepting a generated-name fallback would preserve backup-restore support while avoiding this case.

Related: #23911 introduced the suffix fallback for backup restore; #23965 added an exact-name check against the list.

Activity

  1. added
    status/need-triageAn issue that needs to be prioritized by the curator responsible for the triage. See https://github.
    on Oct 15, 2026
  2. added 4 commits that reference this issue on Oct 15, 2026
    d0c5e94
    240638b
    92e0405
    3e98b63
  3. added
    kind/bugOutline of a bug - must adhere to the bug report template.
    severity/P2Has a minor but important impact to the usage or development of the system.
    team/AThis team is responsible for the Che Operator and all its operands as well as chectl and Hosted Che
    and removed
    status/need-triageAn issue that needs to be prioritized by the curator responsible for the triage. See https://github.
    on Oct 16, 2026
  4. svor commented on Oct 16, 2026

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugOutline of a bug - must adhere to the bug report template.severity/P2Has a minor but important impact to the usage or development of the system.team/AThis team is responsible for the Che Operator and all its operands as well as chectl and Hosted Che

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions