Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-1017

"crwctl workspace:delete" should print a meaningful error when user tries to delete a running workspace

    XMLWordPrintable

Details

    • Workaround Exists
    • Hide

      1. stop running workspace
      2. THEN delete it.

      Show
      1. stop running workspace 2. THEN delete it.

    Description

      crwctl/2.2.0-CI-quay.fb9a0a9 linux-x64 node-v10.19.0 workspace:delete command can't find started workspace of CRW 2.2.0.RC1-0623 with OS OAuth support on OCP 3.11/4.4 https://codeready-workspaces-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/update-crw-crwctl-tls-oauth/80/console:

      [ndp@localhost jenkins-jobs]$ ~/tmp/crwctl/bin/crwctl workspace:list --access-token $USER_ACCESS_TOKEN -n update-crw-crwctl-tls-oauth
      › Current Kubernetes context: 'default/api-ocp44-crw-qe-com:6443/admin'
      Id                        Name                 Namespace       Status  Created                  Updated                  
      workspaceozunj3rjw63e0fpe java-eap-maven-l4gfa admin-codeready RUNNING 2020-06-24T22:23:13.307Z 2020-06-24T22:24:07.957Z 
      
      [ndp@localhost jenkins-jobs]$ ~/tmp/crwctl/bin/crwctl workspace:delete workspaceozunj3rjw63e0fpe --access-token $USER_ACCESS_TOKEN -n update-crw-crwctl-tls-oauth
      › Current Kubernetes context: 'default/api-ocp44-crw-qe-com:6443/admin'
      Error: Workspace 'workspaceozunj3rjw63e0fpe' not found
          at CheHelper.<anonymous> (~/tmp/crwctl/lib/api/che.js:580:27)
          at Generator.throw (<anonymous>)
          at rejected (~/tmp/crwctl/node_modules/tslib/tslib.js:108:69)
      

      At the same time crwctl workspace:delete command had successfully deleted stopped workspace:

      [ndp@localhost jenkins-jobs]$ ~/tmp/crwctl/bin/crwctl workspace:stop workspaceozunj3rjw63e0fpe --access-token $USER_ACCESS_TOKEN -n update-crw-crwctl-tls-oauth
      › Current Kubernetes context: 'default/api-ocp44-crw-qe-com:6443/admin'
      Workspace successfully stopped.
      
      [ndp@localhost jenkins-jobs]$ ~/tmp/crwctl/bin/crwctl workspace:delete workspaceozunj3rjw63e0fpe --access-token $USER_ACCESS_TOKEN -n update-crw-crwctl-tls-oauth
      › Current Kubernetes context: 'default/api-ocp44-crw-qe-com:6443/admin'
      Workspace with id 'workspaceozunj3rjw63e0fpe' deleted.
      

      Attachments

        Activity

          People

            abazko Anatolii Bazko
            dnochevn Dmytro Nochevnov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: