Skip to content
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

che-4061: change the key format for workspace find method #4115

Closed
wants to merge 1 commit into from

Conversation

ashumilova
Copy link
Contributor

@ashumilova ashumilova commented Feb 12, 2017

Signed-off-by: Ann Shumilova [email protected]

What does this PR do?

The additional changes for this PR #4073

What issues does this PR fix or reference?

#4061

Changelog

Reworked workspace key to new format where namespace can contain / symbols.

Release Notes

Reworked workspace key to new format where namespace can contain / symbols.

Docs PR

Current docs doesn't contain mentions about namespace - nothing to be updated. But the planned docs for teams should contain the namespace description.

@codenvy-ci
Copy link

@benoitf
Copy link
Contributor

benoitf commented Feb 13, 2017

booting chedir:

 docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/data eclipse/che:nightly dir --fast up

connecting with ssh fails:

$ docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/data eclipse/che:nightly dir --fast ssh
INFO: (che cli): nightly - using docker 1.13.0 / docker4mac
WARN: ':/chedir' not mounted - using /Users/benoitf/Documents/snowcamp/web-java-spring-petclinic as source location
ERROR: (che dir): Eclipse Che is running http://localhost:8080 but workspace (local) has not been found

using ssh with workspace name "local":

docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/data eclipse/che:nightly ssh --fast local
INFO: (che cli): nightly - using docker 1.13.0 / docker4mac
Call on rest url /api/workspace/local returned invalid response code (404) with error:Workspace with id 'local' doesn't exist

while

docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/data eclipse/che:nightly action --fast list-workspaces
INFO: (che cli): nightly - using docker 1.13.0 / docker4mac
NAME   ID                         STATUS   
local  workspaceyodz7cdvygde0hvg  RUNNING  

and with id it's working as well

$ docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/data eclipse/che:nightly ssh --fast workspaceyodz7cdvygde0hvg
INFO: (che cli): nightly - using docker 1.13.0 / docker4mac
Warning: Permanently added '[192.168.65.2]:32774' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 14.04 LTS (GNU/Linux 4.4.0-45-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

@@ -153,13 +153,6 @@ export class Workspace {
searchWorkspace(key:string):Promise<org.eclipse.che.api.workspace.shared.dto.WorkspaceDto> {
Log.getLogger().debug('search workspace with key', key);

// if workspace key is too short it's a workspace name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that by removing that part now we're unable to find a workspace by its name

@codenvy-ci
Copy link

@ashumilova ashumilova closed this Feb 13, 2017
@ashumilova ashumilova deleted the fix_search_workspace branch February 13, 2017 13:44
@JamesDrummond JamesDrummond mentioned this pull request Feb 17, 2017
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants