-
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
Make backward compliance for the workspace keys with ":" and optional namespace value #4123
Conversation
… namespace value Broken by #4061 Change-Id: I884e8adef2f01774f00a9f6c08ca834fc22b5917 Signed-off-by: Florent BENOIT <[email protected]>
I would not leave old format until we have really serious reason for that. Instead I'd add add exception to the service like this: |
@gazarenkov : Why is it a problem to get backward compliance ? Workspace KEY is something of the core part and not in a sub-sub part of plug-In so it's something that you should not break. And even more when backward compliance is possible |
Sure, it requires changes and yes, may be not pleasant, it is obvious. |
@gazarenkov risk is high (and of course you can't estimate because by definition, with a public API you don't maintain all clients) as it will be introduced for a version without deprecation time or introducing the new format. For real estimate and better result, you need to first deprecate when introducing a new format, keep things for a while, then remove deprecate. Not : replace directly. |
What you said is pretty obvious :). What I said is I would not blindly follow procedure you mentioned , I need to estimate real risk to not to be the hostage of API which is opposite to the concept. So, I have not thrown away any option yet, I asked if you know real clients other than ones we know about which may be impacted. Why not to consider making CLI backward compatible to the old syntax if it is some important to you BTW? |
here we derivate from the original issue that is currently, the CLI (and maybe other clients) are broken due to breaking changes, while at any time, code should be shippable and this PR fix the current state. about the future of cli:
I would say that it's better when all clients are still compliant by doing nothing on their side than having to update each clients ? Because the effort is pretty easy on the server side. I'm not arguing BTW that API should never be changed. Sometimes it requires changes but it's just that when changes are immediate, it breaks and it can be avoided by having timeframe and deprecation time for clients to have time to update. so yes, why not updating clients but:
|
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/1956/ |
@@ -895,13 +895,27 @@ private WorkspaceImpl doCreateWorkspace(WorkspaceConfig config, | |||
} | |||
|
|||
private WorkspaceImpl getByKey(String key) throws NotFoundException, ServerException { | |||
|
|||
int lastColonIndex = key.indexOf(":"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we fix doc for WorkspaceManager#getWorkspace https://github.com/eclipse/che/pull/4073/files#diff-349ffaa889025cd6acd2d5b512c2e687L183 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sleshchenko that's a good question.
I will add info with deprecated marker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sleshchenko 07cd05d
is it ok ?
…ptional namespace value Broken by #4061
@@ -179,6 +179,8 @@ public WorkspaceImpl createWorkspace(WorkspaceConfig config, | |||
* | |||
* <p> Key rules: | |||
* <ul> | |||
* <li>@Deprecated : If it contains <b>:</b> character then that key is combination of namespace and workspace name | |||
* <li>@Deprecated : <b></>:workspace_name</b> is valid abstract key and user will be detected from Environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rewrite to something like and current user name will be used as namespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I've used previous javadoc
now I've updated with your remark
…ptional namespace value Broken by #4061
Build # 1976 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1976/ to view the results. |
… namespace value (eclipse-che#4123) * Make backward compliance for the workspace keys with ":" and optional namespace value Broken by eclipse-che#4061 This backward compliance will be soon removed once deprecation time is over Change-Id: I884e8adef2f01774f00a9f6c08ca834fc22b5917 Signed-off-by: Florent BENOIT <[email protected]>
What does this PR do?
PR #4073 has broken any client using existing workspace keys
Restore the handling of previous keys format
What issues does this PR fix or reference?
#4061
Changelog
Restore backward compliance broken on workspace keys by #4073
so clients don't need to be updated
Release Notes
Restore backward compliance broken on workspace keys #4073
Docs PR
N/A
Change-Id: I884e8adef2f01774f00a9f6c08ca834fc22b5917
Signed-off-by: Florent BENOIT [email protected]