Skip to content

Commit 6ac0ffd

Browse files
authored
Merge pull request eclipse-che#6887 from eclipse/che6mastermerge
Backport missing changes from master to che6
2 parents a1e2562 + 487ad85 commit 6ac0ffd

4 files changed

Lines changed: 21 additions & 2 deletions

File tree

assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/codenvy/che.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ che.docker.server_evaluation_strategy=default
233233
# chePort : Che listening port number of workspace master
234234
# wildcardNipDomain : get external address transformed into a nip.io DNS sub-domain
235235
# wildcardXipDomain : get external address transformed into a xip.io DNS sub-domain
236+
# user : name of the current user
237+
# workspacesRoutingSuffix: explicit routing suffix for workspace agents (see property che.workspaces.routing-suffix)
236238
che.docker.server_evaluation_strategy.custom.template=<serverName>.<machineName>.<workspaceId>.<wildcardNipDomain>:<chePort>
237239

238240
# Protocol to use for http access (for example it can be set to https)

core/che-core-api-core/src/main/java/org/eclipse/che/api/core/rest/DefaultHttpJsonRequest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ protected DefaultHttpJsonResponse doRequest(
237237
str = CharStreams.toString(reader);
238238
}
239239
final String contentType = conn.getContentType();
240-
if (contentType != null && contentType.startsWith(MediaType.APPLICATION_JSON)) {
240+
if (contentType != null
241+
&& (contentType.startsWith(MediaType.APPLICATION_JSON)
242+
|| contentType.startsWith("application/vnd.api+json"))) {
241243
final ServiceError serviceError =
242244
DtoFactory.getInstance().createDtoFromJson(str, ServiceError.class);
243245
if (serviceError.getMessage() != null) {
@@ -266,7 +268,8 @@ protected DefaultHttpJsonResponse doRequest(
266268
final String contentType = conn.getContentType();
267269
if (responseCode != HttpURLConnection.HTTP_NO_CONTENT
268270
&& contentType != null
269-
&& !contentType.startsWith(MediaType.APPLICATION_JSON)) {
271+
&& !(contentType.startsWith(MediaType.APPLICATION_JSON)
272+
|| contentType.startsWith("application/vnd.api+json"))) {
270273
throw new IOException(conn.getResponseMessage());
271274
}
272275

dockerfiles/init/modules/openshift/files/scripts/multi-user/deploy_postgres_and_keycloak.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@
88

99
COMMAND_DIR=$(dirname "$0")
1010

11+
export CHE_EPHEMERAL=${CHE_EPHEMERAL:-false}
12+
1113
"$COMMAND_DIR"/deploy_postgres_only.sh
1214
"$COMMAND_DIR"/wait_until_postgres_is_available.sh
1315

1416
oc create -f "$COMMAND_DIR"/keycloak/
1517

18+
if [ "${CHE_EPHEMERAL}" == "true" ]; then
19+
oc volume dc/keycloak --remove --confirm
20+
oc delete pvc/keycloak-log
21+
oc delete pvc/keycloak-data
22+
fi
23+
1624
IMAGE_KEYCLOACK=${IMAGE_KEYCLOACK:-"jboss/keycloak-openshift:3.3.0.CR2-3"}
1725

1826
oc create -f - <<-EOF

dockerfiles/init/modules/openshift/files/scripts/multi-user/deploy_postgres_only.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@
77
#
88

99
COMMAND_DIR=$(dirname "$0")
10+
export CHE_EPHEMERAL=${CHE_EPHEMERAL:-false}
1011

1112
oc create -f "$COMMAND_DIR"/che-init-image-stream.yaml
1213

1314
oc create -f "$COMMAND_DIR"/postgres/
1415

16+
if [ "${CHE_EPHEMERAL}" == "true" ]; then
17+
oc volume dc/postgres --remove --confirm
18+
oc delete pvc/postgres-data
19+
fi
20+
1521
IMAGE_INIT=${IMAGE_INIT:-"eclipse/che-init:nightly"}
1622

1723
oc create -f - <<-EOF

0 commit comments

Comments
 (0)