tencent / spring-cloud-tencent Goto Github PK
View Code? Open in Web Editor NEWSpring Cloud Tencent is a Spring Cloud based Service Governance Framework provided by Tencent.
License: Other
Spring Cloud Tencent is a Spring Cloud based Service Governance Framework provided by Tencent.
License: Other
What is the feature you want to add?
Add siwtch for :
Why do you want to add this feature?
How to implement this feature?
Additional context
Add any other context or screenshots about the feature request here.
What is the feature you want to add?
Supplemental unit tests.
Why do you want to add this feature?
To standardize the development process.
How to implement this feature?
Supplemental unit tests for every CLASS.
Additional context
No.
What is the feature you want to add?
I would like to deploy the cluster in K8s with helmchart, and also with a default namespace like "polarishmesh"
Why do you want to add this feature?
How to implement this feature?
Additional context
Add any other context or screenshots about the feature request here.
What is the feature you want to add?
Upgrade third-party libs because current version brings in jars with CVEs .
eg:
Why do you want to add this feature?
Upgrade the version of the dependency package specified in the section .
How to implement this feature?
none .
Additional context
What is the feature you want to add?
I want non-explicit service name configuration support in SpringCloudGateway. See The DiscoveryClient Route Definition Locator.
Why do you want to add this feature?
When using configuration like this:
spring:
gateway:
discovery:
locator:
enabled: true
lowerCaseServiceId: false
'predicates[0]':
name: Path
args:
pattern: "'/'+serviceId+'/**'"
'filters[0]':
name: RewritePath
args:
regexp: '''/'' + serviceId + ''/(?<remaining>.*)'''
replacement: '''/$\{remaining}'''
"404 Not Found" error will be thrown.
How to implement this feature?
Implement method of "com.tencent.cloud.polaris.discovery.PolarisServiceDiscovery#getServices"
Additional context
Add any other context or screenshots about the feature request here.
Maybe polaris-java should be updated first.
What is the feature you want to add?
User can customize the ip which be registered.
Why do you want to add this feature?
User may want to set custom ip address.
How to implement this feature?
User set custom ip address in configuration file.
Additional context
No.
Describe the bug
See Dependabot alerts
To Reproduce
Update dependencies.
Expected behavior
Remove the alert.
Environment
Additional context
No.
What is the feature you want to add?
Divide storage and transfer of metadata.
Why do you want to add this feature?
User can choose whether using transfer of metadata or not.
How to implement this feature?
Put storage of metadata into spring-cloud-tencent-commons and create spring-cloud-starter-tencent-metadata-transfer.
Additional context
No.
What is the feature you want to add?
Support config change listener.
com.tencent.polaris.configuration.client.internal.ConfigPropertiesFile#addChangeListener
Why do you want to add this feature?
For listenning for configuration change events.
How to implement this feature?
TBD.
Additional context
No.
What is the feature you want to add?
Why do you want to add this feature?
Optimize project structure.
How to implement this feature?
Additional context
No.
When the service is double-registered, the service nodes that have been offline in the consul single-registration cannot be excluded from Polaris
What is the feature you want to add?
Update version number.
Why do you want to add this feature?
How to implement this feature?
Additional context
Add any other context or screenshots about the feature request here.
No.
When a service is recorded on the Polaris console, the gateway is registered first, and the service is registered later, and the gateway will not be able to route to the service.
Thank everyone for choosing Spring Cloud Tencent. We created this issue to collect use cases so we can drive the Spring Cloud Tencent community to evolve in the right direction. We expect you to submit a comment on this issue to include the following information:
Orgnizatioin (required): ......
Website (required): ......
Product (optional): ......
LOGO (optional): ......
感谢您选择 Spring Cloud Tencent。我们创建这个 Issue 来收集 Spring Cloud Tencent 的使用案例,帮助 Spring Cloud Tencent 社区向正确的方向演进,期待大家在 Issue 下面添加 Comment,Comment 示例如下所示:
组织(必填):......
网址(必填):......
产品(选填):......
LOGO(选填):......
What is the feature you want to add?
Add formatting plugins as required by the Spring Cloud community for code formatting .
Why do you want to add this feature?
Add maven plugin spring-javaformat-maven-plugin
<plugin>
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-maven-plugin</artifactId>
</plugin>
How to implement this feature?
Add spring-javaformat-maven-plugin
in parent pom.xml
file .
Additional context
none .
When the gateway is deployed first, and then the service registered to the registry cannot be routed by the gateway, a 404 error is reported
Add a CHANGELOG file to record important PR.
What is the feature you want to add?
Optimize dependencies and notes.
Why do you want to add this feature?
Some codes are not professional.
How to implement this feature?
Optimize the project.
Additional context
No.
使用polaris-java
404Not Found
服务注册和发现客户端依赖guava版本较低,会造成启动失败
at com.codemes.tencent.discovery.DiscoveryClientApp.main(DiscoveryClientApp.java:13) ~[classes/:na] Caused by: java.lang.NoSuchMethodError: 'void com.google.common.base.Preconditions.checkArgument(boolean, java.lang.String, char, java.lang.Object)' at io.grpc.Metadata$Key.validateName(Metadata.java:742) ~[grpc-api-1.33.0.jar:1.33.0] at io.grpc.Metadata$Key.<init>(Metadata.java:750) ~[grpc-api-1.33.0.jar:1.33.0] at io.grpc.Metadata$Key.<init>(Metadata.java:668) ~[grpc-api-1.33.0.jar:1.33.0] at io.grpc.Metadata$AsciiKey.<init>(Metadata.java:959) ~[grpc-api-1.33.0.jar:1.33.0] at io.grpc.Metadata$AsciiKey.<init>(Metadata.java:954) ~[grpc-api-1.33.0.jar:1.33.0]
pom配置如下
`
4.0.0
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.9.RELEASE</version>
</parent>
<groupId>com.codemes.tencent</groupId>
<artifactId>tencent-discovery-client</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-starter-tencent-polaris-discovery</artifactId>
</dependency>
</dependencies>
<build>
<finalName>tencent-discovery-client</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-dependencies</artifactId>
<version>1.5.0-Hoxton.SR9</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
`
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior.
Expected behavior
A clear and concise description of what you expected to happen.
Environment
Additional context
Add any other context about the problem here.
What is the feature you want to add?
Add new spring-cloud-tencent-docs
module
Why do you want to add this feature?
Markdown files can be directly exported to Html or pdf format for easy maintenance.
How to implement this feature?
Use the asciidoctor-maven-plugin
maven plugin to complete the build of the documentation module.
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
</plugin>
Additional context
Add any other context or screenshots about the feature request here.
I can use configuration with "spring.cloud.polaris.address=grpc://127.0.0.1:8091" to specify Polaris registry address And "spring.application.name=xxx" to specify registry service,but I don't know how to modify the default namespace of the service?
What is the feature you want to add?
Router feature can be used in SCG application.
Why do you want to add this feature?
A complete microservice call includes the SCG, so the service routing feature needs to be implemented in the SCG as well.
How to implement this feature?
Additional context
No.
What is the feature you want to add?
Let the spring-cloud-tencent support multiple discovery server.
Why do you want to add this feature?
When using another discovery server and what to change to polaris, can use this feature to realize smooth migration.
How to implement this feature?
Loading multiple discovery configuration and using polaris-java to realize this feature.
Additional context
No.
What is the feature you want to add?
Why do you want to add this feature?
How to implement this feature?
Additional context
Add any other context or screenshots about the feature request here.
Describe the bug
A clear and concise description of what the bug is.
Response response = delegate.execute(request, options);
// HTTP code greater than 400 is an exception
if (response.status() >= 400) {
resultRequest.setRetStatus(RetStatus.RetFail);
}
return response;
should judge as bigger than 500
To Reproduce
Steps to reproduce the behavior.
Expected behavior
A clear and concise description of what you expected to happen.
Environment
Additional context
Add any other context about the problem here.
使用北极星上报心跳的时候,部分服务出现上报异常,异常日志如下:
2022-05-09 15:13:52 2022-05-09 15:13:52.977 [] [polaris-spring-cloud-heartbeat-1] ERROR com.tencent.cloud.polaris.registry.PolarisServiceRegistry - polaris heartbeat[API_TIMEOUT]
2022-05-09 15:13:52 com.tencent.polaris.api.exception.PolarisException: ERR-1004(API_TIMEOUT), heartbeat request timeout.
2022-05-09 15:13:52 at com.tencent.polaris.discovery.client.api.DefaultProviderAPI.heartbeat(DefaultProviderAPI.java:153)
2022-05-09 15:13:52 at com.tencent.cloud.polaris.registry.PolarisServiceRegistry.lambda$heartbeat$0(PolarisServiceRegistry.java:219)
2022-05-09 15:13:52 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
2022-05-09 15:13:52 at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
2022-05-09 15:13:52 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
2022-05-09 15:13:52 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
2022-05-09 15:13:52 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2022-05-09 15:13:52 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2022-05-09 15:13:52 at java.lang.Thread.run(Thread.java:750)
使用的包版本是1.4.1-Hoxton.SR9。引入的以下两个starter:
spring-cloud-starter-tencent-polaris-discovery
spring-cloud-starter-tencent-polaris-router
What is the feature you want to add?
Support metric reporting.
Why do you want to add this feature?
It is needed to report metric of microservice.
How to implement this feature?
TBD.
Additional context
No.
Polaris is not flexible and extensible enough to set metadata here. This only through configuration “spring cloud.tencent.metadata” to set metadata. It is impossible to set metadata through code.
But Spring Cloud Consul and Nacos are flexible in this regard. For example, there is a customize method in the registration method of ConsulAutoRegistration
The user can implement the interface ConsulRegistrationCustomizer and put the customized metadata in the implementation class through code
It is suggested that Polaris should be modified like this in Class PolarisServiceRegistry.
What is the feature you want to add?
https://cloud.spring.io/spring-cloud-kubernetes/multi/multi__contributing.html
Why do you want to add this feature?
How to implement this feature?
Additional context
Add any other context or screenshots about the feature request here.
Describe the bug
写了一个简单的服务注册的示例,启动后报如下错误,大约报了6次后,停止报错
`2022-06-14 20:59:55.744 ERROR 1636 --- [oud-heartbeat-1] c.t.c.p.registry.PolarisServiceRegistry : polaris heartbeat[SERVER_USER_ERROR]
com.tencent.polaris.api.exception.PolarisException: ERR-1006(SERVER_USER_ERROR), server error 400141: heartbeat on disabled instance
at com.tencent.polaris.plugins.connector.grpc.GrpcUtil.checkResponse(GrpcUtil.java:141) ~[connector-polaris-grpc-1.6.0.jar!/:na]
at com.tencent.polaris.plugins.connector.grpc.GrpcConnector.heartbeat(GrpcConnector.java:397) ~[connector-polaris-grpc-1.6.0.jar!/:na]
at com.tencent.polaris.discovery.client.api.DefaultProviderAPI.heartbeat(DefaultProviderAPI.java:136) ~[polaris-discovery-client-1.6.0.jar!/:na]
at com.tencent.cloud.polaris.registry.PolarisServiceRegistry.lambda$heartbeat$0(PolarisServiceRegistry.java:233) ~[spring-cloud-starter-tencent-polaris-discovery-1.5.0-Hoxton.SR9.jar!/:1.5.0-Hoxton.SR9]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_332]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[na:1.8.0_332]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_332]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[na:1.8.0_332]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_332]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_332]
at java.lang.Thread.run(Thread.java:750) ~[na:1.8.0_332]
`
To Reproduce
大约30秒后,启动应用
java -jar tencent-discovery-client.jar
应用代码如下
main 方法
`@EnableDiscoveryClient
@SpringBootApplication
public class DiscoveryClientApp {
public static void main(String[] args) {
SpringApplication.run(DiscoveryClientApp.class,args);
}
}
`
bootstrap.yml
`server:
port: 8789
spring:
application:
name: tencent-discovery-client
cloud:
polaris:
address: grpc://localhost:8091
namespace: default`
pom.xml
`
4.0.0
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.9.RELEASE</version>
</parent>
<groupId>com.codemes.tencent</groupId>
<artifactId>tencent-discovery-client</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-starter-tencent-polaris-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
</dependency>
</dependencies>
<build>
<finalName>tencent-discovery-client</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-dependencies</artifactId>
<version>1.5.0-Hoxton.SR9</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
`
have any plans or when to release SpringCloud 2020.x.x version support ?
What is the feature you want to add?
When using spring-cloud-tencent-polaris-gateway, rate-limit can be configured if enabled.
Why do you want to add this feature?
How to implement this feature?
Add configuration properties to configure it.
Additional context
No.
When I manually call spring's registration and deregistration interface (actually, the registration and deregistration methods of Polaris will be called), there is no problem with the deregistration, but when I call the registration interface again, the service can be registered normally, but the heartbeat thread fails to ope
n
What is the feature you want to add?
support for spring boot 2.6.x
Why do you want to add this feature?
我们正在使用springboot 2.6.x,同时也有引入spring cloud tencent的打算,所以希望spring cloud tencent能够兼容springboot 2.6.x
How to implement this feature?
测试spring cloud tencent与springboot2.6.x兼容性,如果不兼容,调整代码使之兼容。
Additional context
No
What is the feature you want to add?
Support custom tag parsing from rules.
Why do you want to add this feature?
User can read tag or metadata from HTTP header, param and so on for routing, rate-limiting, circuit-breaking and so on.
How to implement this feature?
TBD.
Additional context
No.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.