[jira] [Commented] (SCB-937) Customizable tracing sample rate

2018-09-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16626743#comment-16626743
 ] 

ASF GitHub Bot commented on SCB-937:


coveralls commented on issue #449: SCB-937 Customizable tracing sample rate
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/449#issuecomment-424200248
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/19170270/badge)](https://coveralls.io/builds/19170270)
   
   Coverage increased (+0.2%) to 62.506% when pulling 
**1ac5a794523e89872b6e320883e96f2567b9 on little-cui:master** into 
**95013d48d6c3db50c10f575a29d0b773fb9c4128 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


> Customizable tracing sample rate
> 
>
> Key: SCB-937
> URL: https://issues.apache.org/jira/browse/SCB-937
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Service-Center
>Reporter: little-cui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-937) Customizable tracing sample rate

2018-09-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16626741#comment-16626741
 ] 

ASF GitHub Bot commented on SCB-937:


codecov-io commented on issue #449: SCB-937 Customizable tracing sample rate
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/449#issuecomment-424200199
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449?src=pr=h1)
 Report
   > Merging 
[#449](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/95013d48d6c3db50c10f575a29d0b773fb9c4128?src=pr=desc)
 will **increase** coverage by `0.22%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #449  +/-   ##
   ==
   + Coverage   59.77%   59.99%   +0.22% 
   ==
 Files 149  149  
 Lines   1317413182   +8 
   ==
   + Hits 7875 7909  +34 
   + Misses   4727 4703  -24 
   + Partials  572  570   -2
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/plugin/infra/tracing/buildin/common.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9pbmZyYS90cmFjaW5nL2J1aWxkaW4vY29tbW9uLmdv)
 | `80% <100%> (+30%)` | :arrow_up: |
   | 
[server/plugin/infra/registry/etcd/tracing.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9pbmZyYS9yZWdpc3RyeS9ldGNkL3RyYWNpbmcuZ28=)
 | `72.72% <0%> (-9.1%)` | :arrow_down: |
   | 
[server/plugin/infra/registry/etcd/etcd.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9pbmZyYS9yZWdpc3RyeS9ldGNkL2V0Y2QuZ28=)
 | `86.95% <0%> (+0.18%)` | :arrow_up: |
   | 
[server/govern/service.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449/diff?src=pr=tree#diff-c2VydmVyL2dvdmVybi9zZXJ2aWNlLmdv)
 | `73.66% <0%> (+0.33%)` | :arrow_up: |
   | 
[server/service/notification/websocket.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvbm90aWZpY2F0aW9uL3dlYnNvY2tldC5nbw==)
 | `84.51% <0%> (+0.64%)` | :arrow_up: |
   | 
[pkg/tlsutil/tlsutil.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449/diff?src=pr=tree#diff-cGtnL3Rsc3V0aWwvdGxzdXRpbC5nbw==)
 | `74.52% <0%> (+0.94%)` | :arrow_up: |
   | 
[pkg/util/tree.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449/diff?src=pr=tree#diff-cGtnL3V0aWwvdHJlZS5nbw==)
 | `84.37% <0%> (+3.12%)` | :arrow_up: |
   | 
[...ver/plugin/infra/tracing/buildin/file\_collector.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9pbmZyYS90cmFjaW5nL2J1aWxkaW4vZmlsZV9jb2xsZWN0b3IuZ28=)
 | `63.1% <0%> (+10.67%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449?src=pr=footer).
 Last update 
[95013d4...1ac5a79](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/449?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


> Customizable tracing sample rate
> 
>
> Key: SCB-937
> URL: https://issues.apache.org/jira/browse/SCB-937
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Service-Center
>Reporter: little-cui
>Assignee: little-cui
>Priority: Major
>   

[jira] [Commented] (SCB-938) Should check self presevation max ttl

2018-09-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16626737#comment-16626737
 ] 

ASF GitHub Bot commented on SCB-938:


codecov-io commented on issue #450: SCB-938 Should check self presevation max 
ttl
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/450#issuecomment-424199820
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/450?src=pr=h1)
 Report
   > Merging 
[#450](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/450?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/95013d48d6c3db50c10f575a29d0b773fb9c4128?src=pr=desc)
 will **decrease** coverage by `<.01%`.
   > The diff coverage is `88.88%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/450/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/450?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #450  +/-   ##
   ==
   - Coverage   59.77%   59.76%   -0.01% 
   ==
 Files 149  149  
 Lines   1317413176   +2 
   ==
 Hits 7875 7875  
 Misses   4727 4727  
   - Partials  572  574   +2
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/450?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/core/backend/common.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/450/diff?src=pr=tree#diff-c2VydmVyL2NvcmUvYmFja2VuZC9jb21tb24uZ28=)
 | `100% <ø> (ø)` | :arrow_up: |
   | 
[server/core/backend/defer\_instance.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/450/diff?src=pr=tree#diff-c2VydmVyL2NvcmUvYmFja2VuZC9kZWZlcl9pbnN0YW5jZS5nbw==)
 | `86.02% <88.88%> (+0.3%)` | :arrow_up: |
   | 
[server/plugin/infra/registry/etcd/tracing.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/450/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9pbmZyYS9yZWdpc3RyeS9ldGNkL3RyYWNpbmcuZ28=)
 | `72.72% <0%> (-9.1%)` | :arrow_down: |
   | 
[server/broker/util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/450/diff?src=pr=tree#diff-c2VydmVyL2Jyb2tlci91dGlsLmdv)
 | `53.2% <0%> (-0.27%)` | :arrow_down: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/450?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/450?src=pr=footer).
 Last update 
[95013d4...65d86e3](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/450?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


> Should check self presevation max ttl
> -
>
> Key: SCB-938
> URL: https://issues.apache.org/jira/browse/SCB-938
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Service-Center
>Reporter: little-cui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-938) Should check self presevation max ttl

2018-09-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16626738#comment-16626738
 ] 

ASF GitHub Bot commented on SCB-938:


coveralls commented on issue #450: SCB-938 Should check self presevation max ttl
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/450#issuecomment-424199860
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/19170246/badge)](https://coveralls.io/builds/19170246)
   
   Coverage decreased (-0.1%) to 62.219% when pulling 
**65d86e315d988c296cdbfe79de675a61fb682518 on little-cui:bug** into 
**95013d48d6c3db50c10f575a29d0b773fb9c4128 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


> Should check self presevation max ttl
> -
>
> Key: SCB-938
> URL: https://issues.apache.org/jira/browse/SCB-938
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Service-Center
>Reporter: little-cui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-938) Should check self presevation max ttl

2018-09-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16626711#comment-16626711
 ] 

ASF GitHub Bot commented on SCB-938:


little-cui opened a new pull request #450: SCB-938 Should check self 
presevation max ttl
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/450
 
 
   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 `go build` `go test` `go fmt` `go vet` 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).
   
   ---
   


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


> Should check self presevation max ttl
> -
>
> Key: SCB-938
> URL: https://issues.apache.org/jira/browse/SCB-938
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Service-Center
>Reporter: little-cui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-938) Should check self presevation max ttl

2018-09-24 Thread little-cui (JIRA)


 [ 
https://issues.apache.org/jira/browse/SCB-938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

little-cui resolved SCB-938.

Resolution: Fixed

> Should check self presevation max ttl
> -
>
> Key: SCB-938
> URL: https://issues.apache.org/jira/browse/SCB-938
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Service-Center
>Reporter: little-cui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SCB-938) Should check self presevation max ttl

2018-09-24 Thread little-cui (JIRA)
little-cui created SCB-938:
--

 Summary: Should check self presevation max ttl
 Key: SCB-938
 URL: https://issues.apache.org/jira/browse/SCB-938
 Project: Apache ServiceComb
  Issue Type: Bug
  Components: Service-Center
Reporter: little-cui
Assignee: little-cui
 Fix For: service-center-1.1.0






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-937) Customizable tracing sample rate

2018-09-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16626701#comment-16626701
 ] 

ASF GitHub Bot commented on SCB-937:


little-cui opened a new pull request #449: SCB-937 Customizable tracing sample 
rate
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/449
 
 
   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 `go build` `go test` `go fmt` `go vet` 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).
   
   ---
   


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


> Customizable tracing sample rate
> 
>
> Key: SCB-937
> URL: https://issues.apache.org/jira/browse/SCB-937
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Service-Center
>Reporter: little-cui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SCB-937) Customizable tracing sample rate

2018-09-24 Thread little-cui (JIRA)


 [ 
https://issues.apache.org/jira/browse/SCB-937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

little-cui resolved SCB-937.

Resolution: Fixed

> Customizable tracing sample rate
> 
>
> Key: SCB-937
> URL: https://issues.apache.org/jira/browse/SCB-937
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Service-Center
>Reporter: little-cui
>Assignee: little-cui
>Priority: Major
> Fix For: service-center-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SCB-937) Customizable tracing sample rate

2018-09-24 Thread little-cui (JIRA)
little-cui created SCB-937:
--

 Summary: Customizable tracing sample rate
 Key: SCB-937
 URL: https://issues.apache.org/jira/browse/SCB-937
 Project: Apache ServiceComb
  Issue Type: Improvement
  Components: Service-Center
Reporter: little-cui
Assignee: little-cui
 Fix For: service-center-1.1.0






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-891) Add kamon metrics to Omega client

2018-09-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16625861#comment-16625861
 ] 

ASF GitHub Bot commented on SCB-891:


maheshrajus opened a new pull request #314: [SCB-891] Add kamon metrics to 
Omega client
URL: https://github.com/apache/incubator-servicecomb-saga/pull/314
 
 
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [x] 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.
- [x] Each commit in the pull request should have a meaningful subject line 
and body.
- [x] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [x] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [x] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [x] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   


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


> Add kamon metrics to Omega client
> -
>
> Key: SCB-891
> URL: https://issues.apache.org/jira/browse/SCB-891
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Saga
>Reporter: Mahesh Raju Somalaraju
>Assignee: Mahesh Raju Somalaraju
>Priority: Major
> Fix For: saga-0.3.0
>
>
> Need to add Kamon traces/metrics to omega client.
> Need to find the major flows in omega client side and need to add the kamon 
> annotations for traces/metrics.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-926) Invoke 3rd party service

2018-09-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16625698#comment-16625698
 ] 

ASF GitHub Bot commented on SCB-926:


yhs0092 commented on a change in pull request #915: [SCB-926] support invoking 
3rd party service
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/915#discussion_r219806264
 
 

 ##
 File path: 
integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/thirdparty/Test3rdPartyInvocation.java
 ##
 @@ -0,0 +1,244 @@
+/*
+ * 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.it.testcase.thirdparty;
+
+import java.util.Collections;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import javax.ws.rs.CookieParam;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.HeaderParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.QueryParam;
+import javax.xml.ws.Holder;
+
+import org.apache.servicecomb.it.extend.engine.GateRestTemplate;
+import org.apache.servicecomb.provider.pojo.Invoker;
+import org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder;
+import 
org.apache.servicecomb.provider.springmvc.reference.async.CseAsyncRestTemplate;
+import org.apache.servicecomb.serviceregistry.RegistryUtils;
+import 
org.apache.servicecomb.serviceregistry.api.registry.MicroserviceInstance;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.util.concurrent.ListenableFuture;
+import org.springframework.web.client.RestTemplate;
+
+public class Test3rdPartyInvocation {
+
+  private static final String THIRD_PARTY_MICROSERVICE_NAME = 
"3rdPartyDataTypeJaxrs";
+
+  private static final String ASYNC_THIRD_PARTY_MICROSERVICE_NAME = 
THIRD_PARTY_MICROSERVICE_NAME + "Async";
+
+  // to get endpoint from urlPrefix
+  static GateRestTemplate rt = (GateRestTemplate) 
GateRestTemplate.createEdgeRestTemplate("dataTypeJaxrs");
+
+  private static DataTypeJaxrsSchemaIntf dataTypeJaxrsSchema;
+
+  private static DataTypeJaxrsSchemaAsyncIntf dataTypeJaxrsSchemaAsync;
+
+  @BeforeClass
+  public static void beforeClass() {
+String urlPrefix = rt.getUrlPrefix();
+int beginIndex = urlPrefix.indexOf("//");
+int endIndex = urlPrefix.indexOf("/", beginIndex + 3);
+String endpoint = "rest:" + urlPrefix.substring(beginIndex, endIndex);
+RegistryUtils.getServiceRegistry()
+.registryMicroserviceMappingByEndpoints(
+THIRD_PARTY_MICROSERVICE_NAME, "1.2.1", 
DataTypeJaxrsSchemaIntf.class,
+Collections.singletonList(endpoint));
+
+MicroserviceInstance instance = new MicroserviceInstance();
+instance.setEndpoints(Collections.singletonList(endpoint));
+RegistryUtils.getServiceRegistry()
 
 Review comment:
   I've asked wujimin's opinion and maybe we can have a new discussion on the 
scenario that there are  microservices registered in sc with only instance info 
but no schema.
   This issue is planned to provide the basic ability to invoke 3rd party 
service.


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


> Invoke 3rd party service
> 
>
> Key: SCB-926
> URL: https://issues.apache.org/jira/browse/SCB-926
> Project: Apache ServiceComb
>  Issue Type: New Feature
>Affects Versions: java-chassis-1.1.0
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Major
>
> Provide a interface to let users specify 3rd party services' endpoints and 
> let users can invoke 3rd party service like invoking the ServiceComb 
> 

[jira] [Commented] (SCB-926) Invoke 3rd party service

2018-09-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16625695#comment-16625695
 ] 

ASF GitHub Bot commented on SCB-926:


yhs0092 commented on a change in pull request #915: [SCB-926] support invoking 
3rd party service
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/915#discussion_r219805724
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/schema/AbstractSchemaFactory.java
 ##
 @@ -103,4 +109,12 @@ protected SwaggerGenerator generateSwagger(CONTEXT 
context) {
 
 return generator;
   }
+
+  protected String getSwaggerContent(Swagger swagger) {
 
 Review comment:
   Fixed.


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


> Invoke 3rd party service
> 
>
> Key: SCB-926
> URL: https://issues.apache.org/jira/browse/SCB-926
> Project: Apache ServiceComb
>  Issue Type: New Feature
>Affects Versions: java-chassis-1.1.0
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Major
>
> Provide a interface to let users specify 3rd party services' endpoints and 
> let users can invoke 3rd party service like invoking the ServiceComb 
> microservice.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-926) Invoke 3rd party service

2018-09-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16625694#comment-16625694
 ] 

ASF GitHub Bot commented on SCB-926:


yhs0092 commented on a change in pull request #915: [SCB-926] support invoking 
3rd party service
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/915#discussion_r219805614
 
 

 ##
 File path: core/src/main/java/org/apache/servicecomb/core/CseContext.java
 ##
 @@ -40,6 +41,8 @@ public static CseContext getInstance() {
 
   private ConsumerSchemaFactory consumerSchemaFactory;
 
+  private StaticSchemaFactory staticSchemaFactory;
 
 Review comment:
   Fixed.


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


> Invoke 3rd party service
> 
>
> Key: SCB-926
> URL: https://issues.apache.org/jira/browse/SCB-926
> Project: Apache ServiceComb
>  Issue Type: New Feature
>Affects Versions: java-chassis-1.1.0
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Major
>
> Provide a interface to let users specify 3rd party services' endpoints and 
> let users can invoke 3rd party service like invoking the ServiceComb 
> microservice.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-926) Invoke 3rd party service

2018-09-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16625693#comment-16625693
 ] 

ASF GitHub Bot commented on SCB-926:


yhs0092 commented on a change in pull request #915: [SCB-926] support invoking 
3rd party service
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/915#discussion_r219805512
 
 

 ##
 File path: 
integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/thirdparty/Test3rdPartyInvocation.java
 ##
 @@ -0,0 +1,244 @@
+/*
+ * 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.it.testcase.thirdparty;
+
+import java.util.Collections;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import javax.ws.rs.CookieParam;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.HeaderParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.QueryParam;
+import javax.xml.ws.Holder;
+
+import org.apache.servicecomb.it.extend.engine.GateRestTemplate;
+import org.apache.servicecomb.provider.pojo.Invoker;
+import org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder;
+import 
org.apache.servicecomb.provider.springmvc.reference.async.CseAsyncRestTemplate;
+import org.apache.servicecomb.serviceregistry.RegistryUtils;
+import 
org.apache.servicecomb.serviceregistry.api.registry.MicroserviceInstance;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.util.concurrent.ListenableFuture;
+import org.springframework.web.client.RestTemplate;
+
+public class Test3rdPartyInvocation {
+
+  private static final String THIRD_PARTY_MICROSERVICE_NAME = 
"3rdPartyDataTypeJaxrs";
+
+  private static final String ASYNC_THIRD_PARTY_MICROSERVICE_NAME = 
THIRD_PARTY_MICROSERVICE_NAME + "Async";
+
+  // to get endpoint from urlPrefix
+  static GateRestTemplate rt = (GateRestTemplate) 
GateRestTemplate.createEdgeRestTemplate("dataTypeJaxrs");
+
+  private static DataTypeJaxrsSchemaIntf dataTypeJaxrsSchema;
+
+  private static DataTypeJaxrsSchemaAsyncIntf dataTypeJaxrsSchemaAsync;
+
+  @BeforeClass
+  public static void beforeClass() {
+String urlPrefix = rt.getUrlPrefix();
+int beginIndex = urlPrefix.indexOf("//");
+int endIndex = urlPrefix.indexOf("/", beginIndex + 3);
+String endpoint = "rest:" + urlPrefix.substring(beginIndex, endIndex);
+RegistryUtils.getServiceRegistry()
+.registryMicroserviceMappingByEndpoints(
+THIRD_PARTY_MICROSERVICE_NAME, "1.2.1", 
DataTypeJaxrsSchemaIntf.class,
+Collections.singletonList(endpoint));
+
+MicroserviceInstance instance = new MicroserviceInstance();
+instance.setEndpoints(Collections.singletonList(endpoint));
+RegistryUtils.getServiceRegistry()
+.registryMicroserviceMapping(
+ASYNC_THIRD_PARTY_MICROSERVICE_NAME, "1.1.1", 
DataTypeJaxrsSchemaAsyncIntf.class,
+Collections.singletonList(instance)
+);
+
+dataTypeJaxrsSchema = Invoker.createProxy(
+THIRD_PARTY_MICROSERVICE_NAME, THIRD_PARTY_MICROSERVICE_NAME, 
DataTypeJaxrsSchemaIntf.class);
+dataTypeJaxrsSchemaAsync = Invoker.createProxy(
+ASYNC_THIRD_PARTY_MICROSERVICE_NAME, 
ASYNC_THIRD_PARTY_MICROSERVICE_NAME, DataTypeJaxrsSchemaAsyncIntf.class);
+  }
+
+  @Test
+  public void testSyncInvoke_RPC() {
+Assert.assertEquals(1, dataTypeJaxrsSchema.intPath(1));
+Assert.assertEquals(2, dataTypeJaxrsSchema.intQuery(2));
+Assert.assertEquals(3, dataTypeJaxrsSchema.intHeader(3));
+Assert.assertEquals(4, dataTypeJaxrsSchema.intCookie(4));
+Assert.assertEquals(5, dataTypeJaxrsSchema.intForm(5));
+Assert.assertEquals(6, dataTypeJaxrsSchema.intBody(6));
+Assert.assertEquals(7, dataTypeJaxrsSchema.add(3, 4));
+Assert.assertEquals("abc", dataTypeJaxrsSchema.stringPath("abc"));
+Assert.assertEquals("def", 

[jira] [Commented] (SCB-926) Invoke 3rd party service

2018-09-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16625691#comment-16625691
 ] 

ASF GitHub Bot commented on SCB-926:


yhs0092 commented on a change in pull request #915: [SCB-926] support invoking 
3rd party service
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/915#discussion_r219804658
 
 

 ##
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/registry/AbstractServiceRegistry.java
 ##
 @@ -303,4 +307,30 @@ public void destroy() {
 eventBus.post(new ShutdownEvent());
 unregisterInstance();
   }
+
+  @Override
+  public void registryMicroserviceMapping(String microserviceName, String 
version, Class schemaIntfCls,
+  List instances) {
+String app = RegistryUtils.getAppId();
+MicroserviceManager microserviceManager = 
appManager.getOrCreateMicroserviceManager(app);
+StaticMicroserviceVersions microserviceVersions =
+(StaticMicroserviceVersions) microserviceManager.getVersionsByName()
+.computeIfAbsent(microserviceName,
+svcName -> new StaticMicroserviceVersions(this.appManager, 
app, microserviceName, schemaIntfCls));
+
+microserviceVersions.addInstances(version, instances);
 
 Review comment:
   `addInstances` is put inside `computeIfAbsent`. Currently only initial 
instance method is provided. Users cannot re-set instance info of a 3rd party 
service.


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


> Invoke 3rd party service
> 
>
> Key: SCB-926
> URL: https://issues.apache.org/jira/browse/SCB-926
> Project: Apache ServiceComb
>  Issue Type: New Feature
>Affects Versions: java-chassis-1.1.0
>Reporter: YaoHaishi
>Assignee: YaoHaishi
>Priority: Major
>
> Provide a interface to let users specify 3rd party services' endpoints and 
> let users can invoke 3rd party service like invoking the ServiceComb 
> microservice.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)