-
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 it possible to use relative links to recipe in workspace environment #3002
Conversation
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/941/ |
targetUriBuilder.scheme(apiEndpoint.getScheme()) | ||
.host(apiEndpoint.getHost()) | ||
.port(apiEndpoint.getPort()) | ||
.replacePath(apiEndpoint.getPath() + location); |
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.
Is it possible that api endpoint doesn't have trailing slash? In that case I suppose it would be better to use .replacePath().path()
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.
AFAIK api endpoint never contain trailing slash
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
targetUriBuilder.scheme(apiEndpoint.getScheme()) | ||
.host(apiEndpoint.getHost()) | ||
.port(apiEndpoint.getPort()) | ||
.replacePath(apiEndpoint.getPath() + location); |
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.
See above
@@ -298,7 +296,7 @@ public void shouldSetDockerfileContentInsteadOfUrlIfUrlPointsToCheApiOnEnvironme | |||
// given | |||
EnvironmentImpl env = createEnv(); | |||
String machineName = "machineWithDockerfileFromApi"; | |||
String additionalServiceComposeFilePart = "\n " + machineName + ":\n build:\n context: " + API_ENDPOINT + "/recipe/12345"; |
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 assume that your changes should not influence these tests
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's due to regexp change in CheEnvironmentEngine.
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/948/ |
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/956/ |
What does this PR do?
To ease data migration between domains, we should store local recipe links in a relative form. And when necessary, downloader should place current domain by itself.
What issues does this PR fix or reference?
Fixes #2769