[GitHub] coveralls commented on issue #662: [SCB-507] avoid rest publisher get NaN values when there is no period publisher
coveralls commented on issue #662: [SCB-507] avoid rest publisher get NaN values when there is no period publisher URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/662#issuecomment-382971337 [![Coverage Status](https://coveralls.io/builds/16612108/badge)](https://coveralls.io/builds/16612108) Coverage increased (+0.006%) to 87.496% when pulling **953b94c71c4c349f2a7abf0ecf2ad653bc4ba026 on wujimin:fix-metrics-poll-task** into **94f034ac5de9c64993b25db119be3aa8e69d435f on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liubao68 closed pull request #661: [SCB-494] Delete temp file after download
liubao68 closed pull request #661: [SCB-494] Delete temp file after download URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/661 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/DownloadSchema.java b/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/DownloadSchema.java index 0fbd6ee69..712551189 100644 --- a/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/DownloadSchema.java +++ b/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/DownloadSchema.java @@ -21,12 +21,16 @@ import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; +import java.util.UUID; +import javax.servlet.http.Part; + +import org.apache.commons.io.FileUtils; +import org.apache.servicecomb.foundation.common.part.FilePart; import org.apache.servicecomb.provider.rest.common.RestSchema; import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.Resource; import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -35,8 +39,44 @@ import io.swagger.annotations.ApiResponses; @RestSchema(schemaId = "download") -@RequestMapping(path = "/download", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) +@RequestMapping(path = "/download") public class DownloadSchema { + File tempDir = new File("downloadTemp"); + + public DownloadSchema() throws IOException { +FileUtils.forceMkdir(tempDir); + } + + // content is file name + protected File createTempFile() throws IOException { +String name = "download-" + UUID.randomUUID().toString() + ".txt"; +File file = new File(tempDir, name); +FileUtils.write(file, name); +return file; + } + + // customize HttpHeaders.CONTENT_DISPOSITION to be "attachment;filename=tempFileEntity.txt" + @GetMapping(path = "/tempFileEntity") + public ResponseEntity downloadTempFileEntity() throws IOException { +File file = createTempFile(); + +return ResponseEntity +.ok() +.header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=tempFileEntity.txt") +.body(new FilePart(null, file) +.setDeleteAfterFinished(true)); + } + + // generate HttpHeaders.CONTENT_DISPOSITION to be "attachment;filename=tempFilePart.txt" automatically + @GetMapping(path = "/tempFilePart") + public Part downloadTempFilePart() throws IOException { +File file = createTempFile(); + +return new FilePart(null, file) +.setDeleteAfterFinished(true) +.setSubmittedFileName("tempFilePart.txt"); + } + @GetMapping(path = "/file") public File downloadFile() throws IOException { return new File(this.getClass().getClassLoader().getResource("microservice.yaml").getFile()); diff --git a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/part/AbstractPart.java b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/part/AbstractPart.java index 4027f8f88..653d0f909 100644 --- a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/part/AbstractPart.java +++ b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/part/AbstractPart.java @@ -60,9 +60,10 @@ public String getSubmittedFileName() { return submittedFileName; } - public void setSubmittedFileName(String submittedFileName) { + public AbstractPart setSubmittedFileName(String submittedFileName) { this.submittedFileName = submittedFileName; updateContentType(); +return this; } private void updateContentType() { diff --git a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/part/FilePart.java b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/part/FilePart.java index 2b2a4da62..ef2904797 100644 --- a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/part/FilePart.java +++ b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/part/FilePart.java @@ -24,9 +24,11 @@ import org.apache.commons.io.FileUtils; -public class FilePart extends AbstractPart { +public class FilePart extends AbstractPart implements FilePartForSend { private File file; + private boolean deleteAfterFinished; + public FilePart(String name, String
[GitHub] liubao68 closed pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration
liubao68 closed pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/658 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/microservice.yaml b/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/microservice.yaml index 95d89ae36..1be593db4 100644 --- a/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/microservice.yaml +++ b/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/microservice.yaml @@ -25,6 +25,9 @@ cse: address: http://127.0.0.1:30100 rest: address: 0.0.0.0:8080 + #add highway for test filter + highway: +address: 0.0.0.0:7070 handler: chain: Provider: diff --git a/demo/demo-spring-boot-discovery/demo-spring-boot-zuul-proxy/src/test/java/org/apache/servicecomb/demo/discovery/zuul/DiscoveryZuulProxyIT.java b/demo/demo-spring-boot-discovery/demo-spring-boot-zuul-proxy/src/test/java/org/apache/servicecomb/demo/discovery/zuul/DiscoveryZuulProxyIT.java index 7de82872f..ed3a9631a 100644 --- a/demo/demo-spring-boot-discovery/demo-spring-boot-zuul-proxy/src/test/java/org/apache/servicecomb/demo/discovery/zuul/DiscoveryZuulProxyIT.java +++ b/demo/demo-spring-boot-discovery/demo-spring-boot-zuul-proxy/src/test/java/org/apache/servicecomb/demo/discovery/zuul/DiscoveryZuulProxyIT.java @@ -40,13 +40,16 @@ private TestRestTemplate restTemplate; @Test - public void getsRemoteServiceThroughGateway() throws Exception { -String response = restTemplate.getForObject( -"/gateway/greeting/sayhello/{name}", -String.class, -"Mike"); + public void getsRemoteServiceThroughGateway() { +//loop three time to insure only rest endpoint get +for (int i = 0; i < 3; i++) { + String response = restTemplate.getForObject( + "/gateway/greeting/sayhello/{name}", + String.class, + "Mike"); -assertThat(response).isEqualTo("hello Mike"); + assertThat(response).isEqualTo("hello Mike"); +} } @SpringBootApplication @@ -55,7 +58,7 @@ public void getsRemoteServiceThroughGateway() throws Exception { @EnableServiceComb static class DiscoveryZuulProxy { -public static void main(String[] args) throws Exception { +public static void main(String[] args) { SpringApplication.run(DiscoveryZuulProxy.class, args); } } diff --git a/samples/bmi/webapp/pom.xml b/samples/bmi/webapp/pom.xml index 4581ea358..23ae4fab2 100644 --- a/samples/bmi/webapp/pom.xml +++ b/samples/bmi/webapp/pom.xml @@ -33,6 +33,11 @@ org.springframework.boot spring-boot-starter + + + org.apache.servicecomb + transport-rest-vertx + org.apache.servicecomb spring-boot-starter-servicecomb diff --git a/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseRibbonEndpointDiscoveryFilter.java b/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseRibbonEndpointDiscoveryFilter.java new file mode 100644 index 0..65f72d7a3 --- /dev/null +++ b/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseRibbonEndpointDiscoveryFilter.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.servicecomb.springboot.starter.discovery; + +import org.apache.servicecomb.foundation.common.net.URIEndpointObject; +import org.apache.servicecomb.serviceregistry.api.registry.MicroserviceInstance; +import org.apache.servicecomb.serviceregistry.discovery.AbstractEndpointDiscoveryFilter; +import
[GitHub] little-cui commented on issue #328: [SCB-479] Add proxy to service-center in frontend
little-cui commented on issue #328: [SCB-479] Add proxy to service-center in frontend URL: https://github.com/apache/incubator-servicecomb-service-center/pull/328#issuecomment-382956261 Why do not use the standard package httputil.ReverseProxy ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration
coveralls commented on issue #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#issuecomment-382350160 [![Coverage Status](https://coveralls.io/builds/16611492/badge)](https://coveralls.io/builds/16611492) Coverage increased (+0.04%) to 87.478% when pulling **8ad68fea89b144e856fef47e40dfd611c64360b3 on zhengyangyong:SCB-474** into **41049be9d9b41d32fbdf4e12f613d6e85ab21301 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #661: [SCB-494] Delete temp file after download
coveralls commented on issue #661: [SCB-494] Delete temp file after download URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/661#issuecomment-382950841 [![Coverage Status](https://coveralls.io/builds/16611419/badge)](https://coveralls.io/builds/16611419) Coverage decreased (-0.09%) to 87.376% when pulling **4fd6d197b6206ad8544f35d65b2a3a16fe910781 on wujimin:delete-temp-file-after-download** into **719a079592fa3dabd1f251599462df88ef7f68e5 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin opened a new pull request #662: [SCB-507] avoid rest publisher get NaN values when there is no period publisher
wujimin opened a new pull request #662: [SCB-507] avoid rest publisher get NaN values when there is no period publisher URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/662 ![image](https://user-images.githubusercontent.com/16874843/39027943-e5198206-4486-11e8-967a-1f95d17c0718.png) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration
zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#discussion_r182931277 ## File path: spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseRibbonEndpointDiscoveryFilter.java ## @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.servicecomb.springboot.starter.discovery; + +import org.apache.servicecomb.core.filter.EndpointDiscoveryFilter; +import org.apache.servicecomb.serviceregistry.discovery.DiscoveryContext; +import org.apache.servicecomb.serviceregistry.discovery.DiscoveryTreeNode; + +public class CseRibbonEndpointDiscoveryFilter extends EndpointDiscoveryFilter { Review comment: Done This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration
zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#discussion_r182931334 ## File path: spring-boot-starter/spring-boot-starter-discovery/pom.xml ## @@ -73,7 +73,7 @@ org.apache.servicecomb - service-registry + java-chassis-core Review comment: Done,now CseRibbonEndpointDiscoveryFilter extend from AbstractEndpointDiscoveryFilter This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration
zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#discussion_r182931282 ## File path: spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/ServiceCombServerList.java ## @@ -49,13 +49,11 @@ public ServiceCombServerList() { RegistryUtils.getAppId(), serviceId, DefinitionConst.VERSION_RULE_ALL); -Mapservers = serversVersionedCache.data(); -List instances = new ArrayList<>(servers.size()); -for (MicroserviceInstance s : servers.values()) { - for (String endpoint : s.getEndpoints()) { -URIEndpointObject uri = new URIEndpointObject(endpoint); -instances.add(new Server(uri.getHostOrIp(), uri.getPort())); - } +ArrayList endpoints = serversVersionedCache.data(); Review comment: Done This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liubao68 commented on issue #618: Any example for using this micro-service framework without Spring?
liubao68 commented on issue #618: Any example for using this micro-service framework without Spring? URL: https://github.com/apache/incubator-servicecomb-java-chassis/issues/618#issuecomment-382944848 Some of the core components use spring features, and most important part like Spring MVC programming feature. Thus java-chassis can not run without spring yet. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liubao68 commented on issue #654: java-chassis依赖的springboot版本过低
liubao68 commented on issue #654: java-chassis依赖的springboot版本过低 URL: https://github.com/apache/incubator-servicecomb-java-chassis/issues/654#issuecomment-382944214 java-chassis和spring boot的依赖关系是很松的,是作为它的一个组件使用。 应该你很容易使用spring boot的高版本集成和使用java-chassis。 说明参考:https://java.huaweicse.com/using-cse-in-spring-boot.html This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin opened a new pull request #661: [SCB-494] Delete temp file after download
wujimin opened a new pull request #661: [SCB-494] Delete temp file after download URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/661 ![image](https://user-images.githubusercontent.com/16874843/39027017-8b75dc58-4482-11e8-8a5b-5bf267dbc755.png) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #651: [SCB-498] Configuration Center ip address need to config default port
coveralls commented on issue #651: [SCB-498] Configuration Center ip address need to config default port URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/651#issuecomment-381932927 [![Coverage Status](https://coveralls.io/builds/1665/badge)](https://coveralls.io/builds/1665) Coverage increased (+0.02%) to 87.465% when pulling **2166c248e2338418337a51b8c73394e2ad836dad on weichao666:addDefaultPort** into **41049be9d9b41d32fbdf4e12f613d6e85ab21301 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liubao68 closed pull request #653: [SCB-483] Springmvc rest vertx file download
liubao68 closed pull request #653: [SCB-483] Springmvc rest vertx file download URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/653 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/common/common-javassist/src/test/java/org/apache/servicecomb/common/javassist/TestJavassistUtils.java b/common/common-javassist/src/test/java/org/apache/servicecomb/common/javassist/TestJavassistUtils.java index 73c4c7ff1..a69eb0fd7 100644 --- a/common/common-javassist/src/test/java/org/apache/servicecomb/common/javassist/TestJavassistUtils.java +++ b/common/common-javassist/src/test/java/org/apache/servicecomb/common/javassist/TestJavassistUtils.java @@ -152,7 +152,7 @@ public void singleWrapperInt() throws Exception { public void multiWrapper() throws Exception { ClassConfig classConfig = new ClassConfig(); classConfig.setClassName("cse.ut.multi.Wrapper"); -classConfig.addField("intField", (Type) int.class); +classConfig.addField("intField", int.class); classConfig.addField("strField", String.class); JavassistUtils.genMultiWrapperInterface(classConfig); @@ -161,7 +161,7 @@ public void multiWrapper() throws Exception { MultiWrapper instance = (MultiWrapper) wrapperClass.newInstance(); instance.writeFields(new Object[] {100, "test"}); -Object[] fieldValues = (Object[]) instance.readFields(); +Object[] fieldValues = instance.readFields(); Assert.assertEquals(100, fieldValues[0]); Assert.assertEquals("test", fieldValues[1]); } diff --git a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/utils/ProtobufSchemaUtils.java b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/utils/ProtobufSchemaUtils.java index f1c985fed..8fd1e89dd 100644 --- a/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/utils/ProtobufSchemaUtils.java +++ b/common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/utils/ProtobufSchemaUtils.java @@ -178,7 +178,7 @@ public static WrapSchema getOrCreateArgsSchema(OperationMeta operationMeta) { return getOrCreateSchema(type, () -> { if (!isArgsNeedWrap(method)) { // 可以直接使用 -Class cls = (Class) method.getParameterTypes()[0]; +Class cls = method.getParameterTypes()[0]; Schema schema = RuntimeSchema.createFrom(cls); return WrapSchemaFactory.createSchema(schema, WrapType.ARGS_NOT_WRAP); } diff --git a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java index 3dfb5cc62..9a3769b88 100644 --- a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java +++ b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java @@ -17,11 +17,13 @@ package org.apache.servicecomb.common.rest; +import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.concurrent.CompletableFuture; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.Response.Status; @@ -31,6 +33,7 @@ import org.apache.servicecomb.common.rest.codec.produce.ProduceProcessorManager; import org.apache.servicecomb.common.rest.definition.RestOperationMeta; import org.apache.servicecomb.common.rest.filter.HttpServerFilter; +import org.apache.servicecomb.common.rest.filter.HttpServerFilterBeforeSendResponseExecutor; import org.apache.servicecomb.common.rest.locator.OperationLocator; import org.apache.servicecomb.common.rest.locator.ServicePathManager; import org.apache.servicecomb.core.Const; @@ -194,18 +197,11 @@ protected void sendResponseQuietly(Response response) { LOGGER.error("Failed to send rest response, operation:{}.", invocation.getMicroserviceQualifiedName(), e); -} finally { - requestEx.getAsyncContext().complete(); - // if failed to locate path, then will not create invocation - // TODO: statistics this case - if (invocation != null) { -invocation.onFinish(response); - } } } @SuppressWarnings("deprecation") - protected void sendResponse(Response response) throws Exception { + protected void sendResponse(Response response) { if (response.getHeaders().getHeaderMap() != null) { for (Entryentry : response.getHeaders().getHeaderMap().entrySet()) { for (Object value : entry.getValue()) { @@ -216,14 +212,41 @@ protected void sendResponse(Response response) throws Exception { } }
[GitHub] coveralls commented on issue #651: [SCB-498] Configuration Center ip address need to config default port
coveralls commented on issue #651: [SCB-498] Configuration Center ip address need to config default port URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/651#issuecomment-381932927 [![Coverage Status](https://coveralls.io/builds/16611017/badge)](https://coveralls.io/builds/16611017) Coverage increased (+0.02%) to 87.459% when pulling **2166c248e2338418337a51b8c73394e2ad836dad on weichao666:addDefaultPort** into **41049be9d9b41d32fbdf4e12f613d6e85ab21301 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liubao68 commented on issue #655: rpc模式下生成swagger-ui文档
liubao68 commented on issue #655: rpc模式下生成swagger-ui文档 URL: https://github.com/apache/incubator-servicecomb-java-chassis/issues/655#issuecomment-382937830 rpc模式下也是会生成契约的,契约可以在service-center查询,也会打印在日志中。 你说的swagger-ui和契约是什么关系? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liubao68 commented on issue #659: 是否考虑支持函数重载
liubao68 commented on issue #659: 是否考虑支持函数重载 URL: https://github.com/apache/incubator-servicecomb-java-chassis/issues/659#issuecomment-382937182 目前是支持函数重载的, 加上@ApiOperation标签即可。每个接口必须有唯一的operation id This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] weichao666 commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port
weichao666 commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/651#discussion_r182926768 ## File path: foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/net/TestNetUtils.java ## @@ -49,6 +49,10 @@ public void testNetutils() { Assert.assertEquals(NetUtils.parseIpPortFromURI(null), null); Assert.assertEquals(NetUtils.parseIpPortFromURI("ss"), null); Assert.assertEquals(NetUtils.parseIpPortFromURI("rest://127.0.0.1:8080").getHostOrIp(), "127.0.0.1"); + Assert.assertEquals(NetUtils.parseIpPortFromURI("http://127.0.0.1:8080;).getPort(), 8080); Review comment: done This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #648: [SCB-482] Http2 support for java-chassis
wujimin commented on a change in pull request #648: [SCB-482] Http2 support for java-chassis URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/648#discussion_r182782090 ## File path: transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestTransportClient.java ## @@ -62,7 +77,16 @@ private static HttpClientOptions createHttpClientOptions() { } public void send(Invocation invocation, AsyncResponse asyncResp) throws Exception { -HttpClientWithContext httpClientWithContext = clientMgr.findClientPool(invocation.isSync()); +URIEndpointObject endpoint = (URIEndpointObject) invocation.getEndpoint().getAddress(); +HttpClientWithContext httpClientWithContext; +if (endpoint.isHttp2Enabled()) { + httpClientWithContext = clientMgrHttp2.findClientPool(invocation.isSync()); + if (!endpoint.isSslEnabled()) { +((HttpClientImpl) httpClientWithContext.getHttpClient()).getOptions().setHttp2ClearTextUpgrade(false); Review comment: invoke a h2c endpoint and then for this httpclient instance http2ClearTextUpgrade always be false is this expected? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #648: [SCB-482] Http2 support for java-chassis
wujimin commented on a change in pull request #648: [SCB-482] Http2 support for java-chassis URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/648#discussion_r182782090 ## File path: transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestTransportClient.java ## @@ -62,7 +77,16 @@ private static HttpClientOptions createHttpClientOptions() { } public void send(Invocation invocation, AsyncResponse asyncResp) throws Exception { -HttpClientWithContext httpClientWithContext = clientMgr.findClientPool(invocation.isSync()); +URIEndpointObject endpoint = (URIEndpointObject) invocation.getEndpoint().getAddress(); +HttpClientWithContext httpClientWithContext; +if (endpoint.isHttp2Enabled()) { + httpClientWithContext = clientMgrHttp2.findClientPool(invocation.isSync()); + if (!endpoint.isSslEnabled()) { +((HttpClientImpl) httpClientWithContext.getHttpClient()).getOptions().setHttp2ClearTextUpgrade(false); Review comment: multi invocation will share the same httpClient instance when use http2 so there is concurrence problem here, right? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #648: [SCB-482] Http2 support for java-chassis
wujimin commented on a change in pull request #648: [SCB-482] Http2 support for java-chassis URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/648#discussion_r182780365 ## File path: foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/net/URIEndpointObject.java ## @@ -47,6 +53,10 @@ public URIEndpointObject(String endpoint) { setPort(uri.getPort()); querys = splitQuery(uri); sslEnabled = Boolean.parseBoolean(getFirst(SSL_ENABLED_KEY)); +String httpversion = getFirst(HTTP2_ENABLED_KEY); +if (httpversion != null && httpversion.compareTo(HTTP2) == 0) { Review comment: http2Enabled = HTTP2.equals(httpVersion) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port
wujimin commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/651#discussion_r182779209 ## File path: foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/net/TestNetUtils.java ## @@ -49,6 +49,10 @@ public void testNetutils() { Assert.assertEquals(NetUtils.parseIpPortFromURI(null), null); Assert.assertEquals(NetUtils.parseIpPortFromURI("ss"), null); Assert.assertEquals(NetUtils.parseIpPortFromURI("rest://127.0.0.1:8080").getHostOrIp(), "127.0.0.1"); + Assert.assertEquals(NetUtils.parseIpPortFromURI("http://127.0.0.1:8080;).getPort(), 8080); Review comment: expect value is the first parameter This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port
wujimin commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/651#discussion_r182778910 ## File path: sh.exe.stackdump ## @@ -0,0 +1,11 @@ +Stack trace: Review comment: why we need this file? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin closed pull request #652: [SCB 456]Remove warning
wujimin closed pull request #652: [SCB 456]Remove warning URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/652 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestConfigUtil.java b/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestConfigUtil.java index a61555a0e..d5265315e 100644 --- a/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestConfigUtil.java +++ b/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestConfigUtil.java @@ -79,7 +79,7 @@ public static void tearDown() throws Exception { @Test public void testAddConfig() { -Map config = new HashMap(); +Map config = new HashMap<>(); config.put("service_description.name", "service_name_test"); ConfigUtil.setConfigs(config); ConfigUtil.addConfig("service_description.version", "1.0.2"); This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on issue #652: [SCB 456]Remove warning
wujimin commented on issue #652: [SCB 456]Remove warning URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/652#issuecomment-382768277 fixed by https://github.com/apache/incubator-servicecomb-java-chassis/pull/660 but reviews have no any response, sigh.. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #660: [SCB-453] Read config from application yaml properties
coveralls commented on issue #660: [SCB-453] Read config from application yaml properties URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/660#issuecomment-382766643 [![Coverage Status](https://coveralls.io/builds/16599973/badge)](https://coveralls.io/builds/16599973) Coverage increased (+0.04%) to 87.482% when pulling **5977c321f1d8f58dfb1fc5a975ef5c2916736db2 on yhs0092:read_config_from_application_yaml_properties** into **41049be9d9b41d32fbdf4e12f613d6e85ab21301 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] yhs0092 opened a new pull request #660: [SCB-453] Read config from application yaml properties
yhs0092 opened a new pull request #660: [SCB-453] Read config from application yaml properties URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/660 Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- Support reading ServiceComb configurations from application.yaml/application.properties See [SCB-453](https://issues.apache.org/jira/browse/SCB-453) ![compile_warning](https://issues.apache.org/jira/secure/attachment/12919814/Compile_Warning.PNG "compile warning") This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration
zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#discussion_r182739600 ## File path: spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseRibbonEndpointDiscoveryFilter.java ## @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.servicecomb.springboot.starter.discovery; + +import org.apache.servicecomb.core.filter.EndpointDiscoveryFilter; +import org.apache.servicecomb.serviceregistry.discovery.DiscoveryContext; +import org.apache.servicecomb.serviceregistry.discovery.DiscoveryTreeNode; + +public class CseRibbonEndpointDiscoveryFilter extends EndpointDiscoveryFilter { Review comment: this package also have a set of "Cse.java" in it ,we may rename them by the way? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration
zhengyangyong commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#discussion_r182740480 ## File path: spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/ServiceCombServerList.java ## @@ -49,13 +49,11 @@ public ServiceCombServerList() { RegistryUtils.getAppId(), serviceId, DefinitionConst.VERSION_RULE_ALL); -Mapservers = serversVersionedCache.data(); -List instances = new ArrayList<>(servers.size()); -for (MicroserviceInstance s : servers.values()) { - for (String endpoint : s.getEndpoints()) { -URIEndpointObject uri = new URIEndpointObject(endpoint); -instances.add(new Server(uri.getHostOrIp(), uri.getPort())); - } +ArrayList endpoints = serversVersionedCache.data(); Review comment: got it This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #651: [SCB-498] Configuration Center ip address need to config default port
coveralls commented on issue #651: [SCB-498] Configuration Center ip address need to config default port URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/651#issuecomment-381932927 [![Coverage Status](https://coveralls.io/builds/16597412/badge)](https://coveralls.io/builds/16597412) Coverage increased (+0.007%) to 87.448% when pulling **0ed7f69933ddd2ba065570cc4ea90215f9115df1 on weichao666:addDefaultPort** into **41049be9d9b41d32fbdf4e12f613d6e85ab21301 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] weichao666 commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port
weichao666 commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/651#discussion_r182720412 ## File path: foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/net/NetUtils.java ## @@ -145,12 +145,25 @@ public static IpPort parseIpPortFromURI(String uriAddress) { try { URI uri = new URI(uriAddress); String authority = uri.getAuthority(); - return parseIpPort(authority); + return parseIpPort(uri.getScheme(), authority); } catch (URISyntaxException e) { return null; } } + private static IpPort parseIpPort(String scheme, String authority) { +if (authority == null) + return null; +int idx = authority.indexOf(':'); +if (idx != -1) + return parseIpPort(authority); +if (scheme.equals("http")) + return parseIpPort(new StringBuffer(authority).append(":80").toString()); +if (scheme.equals("https")) + return parseIpPort(new StringBuffer(authority).append(":443").toString()); +return parseIpPort(authority); Review comment: done This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] weichao666 commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port
weichao666 commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/651#discussion_r182673233 ## File path: foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/net/NetUtils.java ## @@ -145,12 +145,25 @@ public static IpPort parseIpPortFromURI(String uriAddress) { try { URI uri = new URI(uriAddress); String authority = uri.getAuthority(); - return parseIpPort(authority); + return parseIpPort(uri.getScheme(), authority); } catch (URISyntaxException e) { return null; } } + private static IpPort parseIpPort(String scheme, String authority) { +if (authority == null) + return null; +int idx = authority.indexOf(':'); +if (idx != -1) + return parseIpPort(authority); +if (scheme.equals("http")) + return parseIpPort(new StringBuffer(authority).append(":80").toString()); +if (scheme.equals("https")) + return parseIpPort(new StringBuffer(authority).append(":443").toString()); +return parseIpPort(authority); Review comment: only http and https was deal with here, if it's starts with others, e.g "rest://",shouldn't return null This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] weichao666 commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port
weichao666 commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/651#discussion_r182673233 ## File path: foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/net/NetUtils.java ## @@ -145,12 +145,25 @@ public static IpPort parseIpPortFromURI(String uriAddress) { try { URI uri = new URI(uriAddress); String authority = uri.getAuthority(); - return parseIpPort(authority); + return parseIpPort(uri.getScheme(), authority); } catch (URISyntaxException e) { return null; } } + private static IpPort parseIpPort(String scheme, String authority) { +if (authority == null) + return null; +int idx = authority.indexOf(':'); +if (idx != -1) + return parseIpPort(authority); +if (scheme.equals("http")) + return parseIpPort(new StringBuffer(authority).append(":80").toString()); +if (scheme.equals("https")) + return parseIpPort(new StringBuffer(authority).append(":443").toString()); +return parseIpPort(authority); Review comment: only http and https was deal with here, if it's starts with others, e.g "rest://",shouldn't return null This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liubao68 commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port
liubao68 commented on a change in pull request #651: [SCB-498] Configuration Center ip address need to config default port URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/651#discussion_r182670564 ## File path: foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/net/NetUtils.java ## @@ -145,12 +145,25 @@ public static IpPort parseIpPortFromURI(String uriAddress) { try { URI uri = new URI(uriAddress); String authority = uri.getAuthority(); - return parseIpPort(authority); + return parseIpPort(uri.getScheme(), authority); } catch (URISyntaxException e) { return null; } } + private static IpPort parseIpPort(String scheme, String authority) { +if (authority == null) + return null; +int idx = authority.indexOf(':'); +if (idx != -1) + return parseIpPort(authority); +if (scheme.equals("http")) + return parseIpPort(new StringBuffer(authority).append(":80").toString()); Review comment: return new IpPort(authority, 80) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration
wujimin commented on a change in pull request #658: [SCB-474] add endpoint filter (only rest endpoints) for zuul integration URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#discussion_r182439746 ## File path: spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/ServiceCombServerList.java ## @@ -49,13 +49,11 @@ public ServiceCombServerList() { RegistryUtils.getAppId(), serviceId, DefinitionConst.VERSION_RULE_ALL); -Mapservers = serversVersionedCache.data(); -List instances = new ArrayList<>(servers.size()); -for (MicroserviceInstance s : servers.values()) { - for (String endpoint : s.getEndpoints()) { -URIEndpointObject uri = new URIEndpointObject(endpoint); -instances.add(new Server(uri.getHostOrIp(), uri.getPort())); - } +ArrayList endpoints = serversVersionedCache.data(); Review comment: by previous comment, here will got `List`, not `List` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jeho0815 commented on a change in pull request #648: [SCB-482] Http2 support for java-chassis
jeho0815 commented on a change in pull request #648: [SCB-482] Http2 support for java-chassis URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/648#discussion_r182653130 ## File path: transports/transport-rest/transport-rest-vertx/src/test/java/org/apache/servicecomb/transport/rest/vertx/TestRestServerVerticle.java ## @@ -109,6 +109,38 @@ public void testRestServerVerticleWithRouterSSL(@Mocked Transport transport, @Mo server.start(startFuture); } + @Test + public void testRestServerVerticleWithHttp2(@Mocked Transport transport, @Mocked Vertx vertx, + @Mocked Context context, + @Mocked JsonObject jsonObject, @Mocked Future startFuture) throws Exception { +URIEndpointObject endpointObject = new URIEndpointObject("http://127.0.0.1:8080?protocol=h2;); +new Expectations() { + { +transport.parseAddress("http://127.0.0.1:8080?protocol=h2;); Review comment: h2 can use over http, SPDY has to run with https This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asifdxtreme commented on issue #328: [SCB-479] Add proxy to service-center in frontend
asifdxtreme commented on issue #328: [SCB-479] Add proxy to service-center in frontend URL: https://github.com/apache/incubator-servicecomb-service-center/pull/328#issuecomment-382634015 @yangbor Does the current implementation holds if service-center and frontend is running in the same docker image? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #653: [SCB-483] Springmvc rest vertx file download
coveralls commented on issue #653: [SCB-483] Springmvc rest vertx file download URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/653#issuecomment-382072555 [![Coverage Status](https://coveralls.io/builds/16592696/badge)](https://coveralls.io/builds/16592696) Coverage increased (+0.04%) to 87.485% when pulling **d1c97633a8a37ab88d8254b5f85a8de53caef186 on wujimin:springmvc-rest-vertx-file-download** into **41049be9d9b41d32fbdf4e12f613d6e85ab21301 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #653: [SCB-483] Springmvc rest vertx file download
wujimin commented on a change in pull request #653: [SCB-483] Springmvc rest vertx file download URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/653#discussion_r182644564 ## File path: common/common-rest/src/main/java/org/apache/servicecomb/common/rest/filter/inner/ServerRestArgsFilter.java ## @@ -50,7 +54,7 @@ public Response afterReceiveRequest(Invocation invocation, HttpServletRequestEx } @Override - public void beforeSendResponse(Invocation invocation, HttpServletResponseEx responseEx) { + public CompletableFuture asyncBeforeSendResponse(Invocation invocation, HttpServletResponseEx responseEx) { Review comment: done. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #653: [SCB-483] Springmvc rest vertx file download
wujimin commented on a change in pull request #653: [SCB-483] Springmvc rest vertx file download URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/653#discussion_r182643228 ## File path: demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/DownloadSchema.java ## @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.servicecomb.demo.springmvc.server; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; + +import org.apache.servicecomb.provider.rest.common.RestSchema; +import org.springframework.core.io.ByteArrayResource; +import org.springframework.core.io.Resource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; + +@RestSchema(schemaId = "download") +@RequestMapping(path = "/download", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) +public class DownloadSchema { + @GetMapping(path = "/file") Review comment: yes, already declared in this commit comments this PR just for producer https://issues.apache.org/jira/browse/SCB-487 is for consumer This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services