gitpod-io / gitpod-io/gitpod

[ws-manager-bridge] cannot use `gpctl clusters update <command>` in preview environment with empty short name

Open
#13,150 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component: db component: gpctl component: ws-manager-bridge meta: never-stale type: bug
Dominant language
TypeScript
Stars
13.8k
Forks
1.4k
Avg merge
17h 58m
Merged PRs (30d)
5

Description

Bug description

--name is required with gpctl, but, shortname is empty, "" in the database and preview config, I think shortName used to be "default".

The ws-manager-bridge API requires name, too.

We need the ability to use gpctl command more easily in preview environments. For this to happen, the Gitpod cluster name must be set.

Steps to reproduce
# the cluster name is not set
gpctl clusters list
NAME        URL                           STATIC        STATE            SCORE        GOVERNED        ADMISSION CONSTRAINTS
            dns:///ws-manager:8080        true          AVAILABLE        50           true            []

# cannot use without name value
gpctl clusters update score 00 --name
Error: flag needs an argument: --name

# cannot pass in an empty cluster name
gpctl clusters update score 00 --name " "
FATA[0001] rpc error: code = Unknown desc = a WorkspaceCluster with name   does not exist in the DB! 
Workspace affected

n/a

Expected behavior

Cluster name in preview environments should be an actual value (not empty string). For example, this way, we can set the score to 0, or cordon it, to observe that workspaces do not even get set to Pending.

Example repository

No response

Anything else?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at .werft/jobs/build/installer/installer.ts around the preview configuration referenced in the issue, then trace how that value reaches the ws-manager-bridge API and the gpctl clusters commands. Verify the behavior with gpctl clusters list and gpctl clusters update score 00 --name. Done means preview clusters have a non-empty name and these commands can target them.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.