-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chectl commands in the devworkspace land #20671
Comments
Issue to close: #13785 |
@tolusha: our Happy path tests and CRW E2E tests are widely using next workspace commands [1]:
So, could you continue supporting those commands from chectl? [1] https://gitlab.cee.redhat.com/codeready-workspaces/crw-jenkins/-/blob/master/vars/crwctlUtil.groovy |
|
Droping chectl commands will be done here [1] [1] #20866 |
Hello
|
I get that @tolusha, thanks. My point was whether to-be-removed functionality of An ask to replace used |
What I think would help us greatly is to have an instructions on how to create/start/list workspaces using "any" API. |
@akurinnoy |
for stop (and also start again): https://github.com/eclipse-che/che-theia/blob/8a48c2fbd803e0c37548cd4720cdd7282a13b3a6/extensions/eclipse-che-theia-remote-impl-k8s/src/node/k8s-workspace-service-impl.ts#L90-L120 (update of .spec.started field) |
For the simplest case of create the workspace from Devfile -- could we not curl the factory URL and have that flow create the workspace? That way we're testing an actually recommended customer user story and might discover problems w/ passing parameters or page refresh bugs... For the other commands like |
An alternative to @nickboldt proposal to use an HTTP request to start the workspace (that can be complicated if devfile->devworkspace conversion is still done client side cc @benoitf @olexii4) is to use the DW CRs included in Che devfile registry. Create the workspaces namespace (optional) This step is required if the Che user hasn't logged in yet. The first time a user open the User Dashboard, a namespace with some particular annotations/labels is created. So if this namespace doesn't exist it should be created: CHE_USER_NAME="kube:admin"
CHE_USER_NAMESPACE="che-workspaces"
kubectl apply - <<EOF
apiVersion: v1
kind: Namespace
metadata:
annotations:
che.eclipse.org/username: "${CHE_USER_NAME}"
labels:
app.kubernetes.io/component: workspaces-namespace"
app.kubernetes.io/part-of: che.eclipse.org
name: ${CHE_USER_NAMESPACE}"
EOF Start a workspace
REGISTRY_URL="https://eclipse-che.github.io/che-devfile-registry/main"
CHE_SAMPLE="nodejs"
CHE_EDITOR="che-theia-next"
DW="nodejs-web-app"
DWT="theia-ide-${DW}"
# Set the namespace to be CHE_USER_NAMESPACE
CHE_USER_NAMESPACE="che-workspaces"
kubens "${CHE_USER_NAMESPACE}"
# Create the editor DevWorkspaceTemplate
curl -sSL ${REGISTRY_URL}/devfiles/${CHE_SAMPLE}/devworkspace-${CHE_EDITOR}.yaml | yq --arg DWT ${DWT} 'select(.metadata.name == $DWT)' | kubectl apply -f -
# Create the DevWorkspace itself
curl -sSL ${REGISTRY_URL}/devfiles/${CHE_SAMPLE}/devworkspace-${CHE_EDITOR}.yaml | yq --arg DW ${DW} 'select(.metadata.name == $DW)' | jq '. * {spec: {routingClass: "che"}}' | kubectl apply -f -
# Wait until it's started
k wait --for=jsonpath='{.status.phase}'=Running dw/${DW} --timeout=-1s List workspaces k get dw Stop an existing workspace k patch dw ${DW} -p '{"spec":{"started":false}}' --type=merge
k wait --for=jsonpath='{.status.phase}'=Stopped dw/${DW} Restart an existing workspace k patch dw ${DW} -p '{"spec":{"started":true}}' --type=merge
k wait --for=jsonpath='{.status.phase}'=Running dw/${DW} |
Thank you @benoitf @l0rd @nickboldt . @dmytro-ndp would it meet team needs once devworkspacerouting is patched? |
@kpiwko: thanks for heads up. @l0rd, @benoitf , @nickboldt: thank you for help! |
I think that if you're adding .
|
moving issue to 7.42 milestone as this issue is part of the endgame |
@dmytro-ndp I have update the instructions to start a workspace |
Removing `$ crwctl workspace:start --devfile` from the *Usage* section because according to eclipse-che/che#20671: command(s) status plan ------------------------------------------------------------ all `workspace` commands broken drop
Removing `$ crwctl workspace:start --devfile` from the *# Usage* section because according to eclipse-che/che#20671 `all workspace commands | broken | drop`.
Is your task related to a problem? Please describe
When devworkspace is enabled by default then some workspace commands won't work.
We have to decided what to do with them
Describe the solution you'd like
Make a plan for every not working command with devworkspace engine either to remove or fix.
Describe alternatives you've considered
No response
Additional context
#20010
The text was updated successfully, but these errors were encountered: