You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by GitBox <gi...@apache.org> on 2022/06/15 12:58:35 UTC

[GitHub] [incubator-linkis] peacewong opened a new pull request, #2291: Entrance support isolation by routing labels

peacewong opened a new pull request, #2291:
URL: https://github.com/apache/incubator-linkis/pull/2291

   ### What is the purpose of the change
   close #2078
   close #1803 
   
   ### Brief change log
   - Gateway supports routing and forwarding of execution requests for entrance;
   - The instance label module supports the registration and modification of routing labels.
   
   ### Usage 
   ### add route label for entrance
   ```
   echo "spring.eureka.instance.metadata-map.route=et1" >> $LINKIS_CONF_DIR/linkis-cg-entrance.properties 
   sh  $LINKIS_HOME/sbin/linkis-damemon.sh restart cg-entrance
   ```
   ![企业微信截图_16552959373596](https://user-images.githubusercontent.com/11496700/173826892-94b1546f-0107-4bf6-9b2f-c3c8a8c505d0.png)
   
   
   ### Use route label
   submit task:
   ```
   url:/api/v1/entrance/submit
   {
       "executionContent": {"code": "echo 1", "runType":  "shell"},
       "params": {"variable": {}, "configuration": {}},
       "source":  {"scriptPath": "ip"},
       "labels": {
           "engineType": "shell-1",
           "userCreator": "peacewong-IDE",
           "route": "et1"
       }
   }
   ```
   will be routed to a fixed service:
   ```
   {
       "method": "/api/entrance/submit",
       "status": 0,
       "message": "OK",
       "data": {
           "taskID": 45158,
           "execID": "exec_id018030linkis-cg-entrancelocalhost:9205IDE_peacewong_shell_0"
       }
   }
   ```
   
   or linkis-cli:
   
   ```
   sh bin/linkis-cli -submitUser  hadoop  -engineType shell-1 -codeType shell  -code "whoami" -labelMap route=et1 --gatewayUrl http://127.0.0.1:9101
   ```
   
   ### Use non-existing label
   submit task:
   ```
   url:/api/v1/entrance/submit
   {
       "executionContent": {"code": "echo 1", "runType":  "shell"},
       "params": {"variable": {}, "configuration": {}},
       "source":  {"scriptPath": "ip"},
       "labels": {
           "engineType": "shell-1",
           "userCreator": "peacewong-IDE",
           "route": "et1"
       }
   }
   ```
   will get the error
   ```
   {
       "method": "/api/rest_j/v1/entrance/submit",
       "status": 1,
       "message": "GatewayErrorException: errCode: 11011 ,desc: Cannot route to the corresponding service, URL: /api/rest_j/v1/entrance/submit RouteLabel: [{\"stringValue\":\"et2\",\"labelKey\":\"route\",\"feature\":null,\"modifiable\":true,\"featureKey\":\"feature\",\"empty\":false}] ,ip: localhost ,port: 9101 ,serviceKind: linkis-mg-gateway",
       "data": {
           "data": "{\r\n    \"executionContent\": {\"code\": \"echo 1\", \"runType\":  \"shell\"},\r\n    \"params\": {\"variable\": {}, \"configuration\": {}},\r\n    \"source\":  {\"scriptPath\": \"ip\"},\r\n    \"labels\": {\r\n        \"engineType\": \"shell-1\",\r\n        \"userCreator\": \"peacewong-IDE\",\r\n        \"route\": \"et2\"\r\n    }\r\n}"
       }
   }
   ```
   
   ### without label
   submit task:
   ```
   url:/api/v1/entrance/submit
   {
       "executionContent": {"code": "echo 1", "runType":  "shell"},
       "params": {"variable": {}, "configuration": {}},
       "source":  {"scriptPath": "ip"},
       "labels": {
           "engineType": "shell-1",
           "userCreator": "peacewong-IDE"
       }
   }
   ```
   will route to untagged entry services
   {
       "method": "/api/entrance/submit",
       "status": 0,
       "message": "OK",
       "data": {
           "taskID": 45159,
           "execID": "exec_id018018linkis-cg-entrancelocalhost2:9205IDE_peacewong_shell_0"
       }
   }
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] CCweixiao commented on pull request #2291: Entrance support isolation by routing labels

Posted by GitBox <gi...@apache.org>.
CCweixiao commented on PR #2291:
URL: https://github.com/apache/incubator-linkis/pull/2291#issuecomment-1156474308

   平哥,这个PR的功能没看太明白,是对entrance服务分组?不同路由标签的请求,分发到不同的entrance服务?
   Brother Ping, I don't understand the function of this PR. Is it a grouping of entry services? Are requests for different routing labels distributed to different entry services?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] codecov[bot] commented on pull request #2291: Entrance support isolation by routing labels

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #2291:
URL: https://github.com/apache/incubator-linkis/pull/2291#issuecomment-1156466436

   # [Codecov](https://codecov.io/gh/apache/incubator-linkis/pull/2291?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2291](https://codecov.io/gh/apache/incubator-linkis/pull/2291?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3a57608) into [dev-1.2.0](https://codecov.io/gh/apache/incubator-linkis/commit/d2202a431875177d3def65e1d35a483c36d11357?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d2202a4) will **increase** coverage by `0.40%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 3a57608 differs from pull request most recent head 945020b. Consider uploading reports for the commit 945020b to get more accurate results
   
   ```diff
   @@               Coverage Diff               @@
   ##             dev-1.2.0    #2291      +/-   ##
   ===============================================
   + Coverage        19.96%   20.36%   +0.40%     
   - Complexity        1028     1040      +12     
   ===============================================
     Files              453      454       +1     
     Lines            13689    13797     +108     
     Branches          2149     2177      +28     
   ===============================================
   + Hits              2733     2810      +77     
   - Misses           10592    10600       +8     
   - Partials           364      387      +23     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-linkis/pull/2291?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ngineplugin/jdbc/JDBCDataSourceConfigurations.java](https://codecov.io/gh/apache/incubator-linkis/pull/2291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWVuZ2luZWNvbm4tcGx1Z2lucy9lbmdpbmVjb25uLXBsdWdpbnMvamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvbGlua2lzL21hbmFnZXIvZW5naW5lcGx1Z2luL2pkYmMvSkRCQ0RhdGFTb3VyY2VDb25maWd1cmF0aW9ucy5qYXZh) | `18.18% <0.00%> (-1.82%)` | :arrow_down: |
   | [...is/manager/engineplugin/jdbc/PropertiesParser.java](https://codecov.io/gh/apache/incubator-linkis/pull/2291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWVuZ2luZWNvbm4tcGx1Z2lucy9lbmdpbmVjb25uLXBsdWdpbnMvamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvbGlua2lzL21hbmFnZXIvZW5naW5lcGx1Z2luL2pkYmMvUHJvcGVydGllc1BhcnNlci5qYXZh) | `62.50% <0.00%> (ø)` | |
   | [...ugin/jdbc/executer/JDBCMultiDatasourceParser.scala](https://codecov.io/gh/apache/incubator-linkis/pull/2291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWVuZ2luZWNvbm4tcGx1Z2lucy9lbmdpbmVjb25uLXBsdWdpbnMvamRiYy9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2xpbmtpcy9tYW5hZ2VyL2VuZ2luZXBsdWdpbi9qZGJjL2V4ZWN1dGVyL0pEQkNNdWx0aURhdGFzb3VyY2VQYXJzZXIuc2NhbGE=) | `48.88% <0.00%> (ø)` | |
   | [...s/manager/engineplugin/jdbc/ConnectionManager.java](https://codecov.io/gh/apache/incubator-linkis/pull/2291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWVuZ2luZWNvbm4tcGx1Z2lucy9lbmdpbmVjb25uLXBsdWdpbnMvamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvbGlua2lzL21hbmFnZXIvZW5naW5lcGx1Z2luL2pkYmMvQ29ubmVjdGlvbk1hbmFnZXIuamF2YQ==) | `43.12% <0.00%> (+1.89%)` | :arrow_up: |
   | [...eplugin/jdbc/executer/JDBCEngineConnExecutor.scala](https://codecov.io/gh/apache/incubator-linkis/pull/2291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWVuZ2luZWNvbm4tcGx1Z2lucy9lbmdpbmVjb25uLXBsdWdpbnMvamRiYy9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2xpbmtpcy9tYW5hZ2VyL2VuZ2luZXBsdWdpbi9qZGJjL2V4ZWN1dGVyL0pEQkNFbmdpbmVDb25uRXhlY3V0b3Iuc2NhbGE=) | `12.98% <0.00%> (+12.98%)` | :arrow_up: |
   | [...ineplugin/jdbc/factory/JDBCEngineConnFactory.scala](https://codecov.io/gh/apache/incubator-linkis/pull/2291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWVuZ2luZWNvbm4tcGx1Z2lucy9lbmdpbmVjb25uLXBsdWdpbnMvamRiYy9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2xpbmtpcy9tYW5hZ2VyL2VuZ2luZXBsdWdpbi9qZGJjL2ZhY3RvcnkvSkRCQ0VuZ2luZUNvbm5GYWN0b3J5LnNjYWxh) | `50.00% <0.00%> (+50.00%)` | :arrow_up: |
   | [...ger/engineplugin/jdbc/conf/JDBCConfiguration.scala](https://codecov.io/gh/apache/incubator-linkis/pull/2291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWVuZ2luZWNvbm4tcGx1Z2lucy9lbmdpbmVjb25uLXBsdWdpbnMvamRiYy9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2xpbmtpcy9tYW5hZ2VyL2VuZ2luZXBsdWdpbi9qZGJjL2NvbmYvSkRCQ0NvbmZpZ3VyYXRpb24uc2NhbGE=) | `100.00% <0.00%> (+100.00%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-linkis/pull/2291?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-linkis/pull/2291?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [d2202a4...945020b](https://codecov.io/gh/apache/incubator-linkis/pull/2291?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] peacewong commented on pull request #2291: Entrance support isolation by routing labels

Posted by GitBox <gi...@apache.org>.
peacewong commented on PR #2291:
URL: https://github.com/apache/incubator-linkis/pull/2291#issuecomment-1157201515

   > 平哥,这个PR的功能没看太明白,是对entrance服务分组?不同路由标签的请求,分发到不同的entrance服务? Brother Ping, I don't understand the function of this PR. Is it a grouping of entry services? Are requests for different routing labels distributed to different entry services?
   
   Yes, that's the feature


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [incubator-linkis] CCweixiao merged pull request #2291: Entrance support isolation by routing labels

Posted by GitBox <gi...@apache.org>.
CCweixiao merged PR #2291:
URL: https://github.com/apache/incubator-linkis/pull/2291


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org