text:
I configured discovery on the client and why it did not take effect ?

Question
I configured discovery on the client and why it did not take effect ?
eureka.client.serviceUrl.defaultZone=http://192.168.1.21:8761/eureka
spring.cloud.config.discovery.enabled=true
spring.cloud.config.discovery.serviceId=configserver

But the log prints out http://localhost:8888:
2018-05-30 10:12:47.254  INFO 2736 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@7f0eb4b4: startup date [Wed May 30 10:12:47 CST 2018]; root of context hierarchy
2018-05-30 10:12:47.667  INFO 2736 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-05-30 10:12:47.718  INFO 2736 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$e5276a08] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.1.RELEASE)

2018-05-30 10:12:48.075  INFO 2736 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://localhost:8888
2018-05-30 10:12:48.207  WARN 2736 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/zuul/dev/master": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)
2018-05-30 10:12:48.210  INFO 2736 --- [           main] com.cxria.gaiamount.api.ApiApplication   : No active profile set, falling back to default profiles: default
2018-05-30 10:12:48.228  INFO 2736 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1fa1cab1: startup date [Wed May 30 10:12:48 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@7f0eb4b4
2018-05-30 10:12:49.080  INFO 2736 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'environmentWebEndpointExtension' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointAutoConfiguration; factoryMethodName=environmentWebEndpointExtension; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/actuate/autoconfigure/env/EnvironmentEndpointAutoConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.cloud.autoconfigure.LifecycleMvcEndpointAutoConfiguration$EndpointConfiguration; factoryMethodName=environmentWebEndpointExtension; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/cloud/autoconfigure/LifecycleMvcEndpointAutoConfiguration$EndpointConfiguration.class]]
2018-05-30 10:12:49.147  INFO 2736 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'proxyRequestHelper' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.cloud.netflix.zuul.ZuulProxyAutoConfiguration$EndpointConfiguration; factoryMethodName=proxyRequestHelper; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/cloud/netflix/zuul/ZuulProxyAutoConfiguration$EndpointConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.cloud.netflix.zuul.ZuulProxyAutoConfiguration$NoActuatorConfiguration; factoryMethodName=proxyRequestHelper; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/cloud/netflix/zuul/ZuulProxyAutoConfiguration$NoActuatorConfiguration.class]]
2018-05-30 10:12:49.154  INFO 2736 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'counterFactory' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.cloud.netflix.zuul.ZuulServerAutoConfiguration$ZuulMetricsConfiguration; factoryMethodName=counterFactory; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/cloud/netflix/zuul/ZuulServerAutoConfiguration$ZuulMetricsConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.cloud.netflix.zuul.ZuulServerAutoConfiguration$ZuulCounterFactoryConfiguration; factoryMethodName=counterFactory; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/cloud/netflix/zuul/ZuulServerAutoConfiguration$ZuulCounterFactoryConfiguration.class]]
2018-05-30 10:12:49.432  INFO 2736 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=dcdff62b-ae36-3dc7-a0b9-92be9fb4819a
2018-05-30 10:12:49.457  INFO 2736 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-05-30 10:12:49.751  INFO 2736 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$e5276a08] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-05-30 10:12:50.080  INFO 2736 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8762 (http)
2018-05-30 10:12:50.241  INFO 2736 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2018-05-30 10:12:50.241  INFO 2736 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/9.0.8
2018-05-30 10:12:50.247  INFO 2736 --- [           main] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/xinwuy/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
2018-05-30 10:12:50.385  INFO 2736 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2018-05-30 10:12:50.386  INFO 2736 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2158 ms
2018-05-30 10:12:51.775  WARN 2736 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2018-05-30 10:12:51.775  INFO 2736 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2018-05-30 10:12:51.785  INFO 2736 --- [           main] c.netflix.config.DynamicPropertyFactory  : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@27755487
2018-05-30 10:12:51.937  INFO 2736 --- [           main] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2018-05-30 10:12:51.938  INFO 2736 --- [           main] o.s.b.w.servlet.ServletRegistrationBean  : Servlet zuulServlet mapped to [/zuul/*]
2018-05-30 10:12:51.944  INFO 2736 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-05-30 10:12:51.944  INFO 2736 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-05-30 10:12:51.944  INFO 2736 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-05-30 10:12:51.944  INFO 2736 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2018-05-30 10:12:51.944  INFO 2736 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpTraceFilter' to: [/*]
2018-05-30 10:12:51.944  INFO 2736 --- [           main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webMvcMetricsFilter' to: [/*]
2018-05-30 10:12:52.083  WARN 2736 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2018-05-30 10:12:52.084  INFO 2736 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2018-05-30 10:12:52.185  INFO 2736 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-05-30 10:12:52.441  INFO 2736 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1fa1cab1: startup date [Wed May 30 10:12:48 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@7f0eb4b4
2018-05-30 10:12:52.510  INFO 2736 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-05-30 10:12:52.511  INFO 2736 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-05-30 10:12:52.561  INFO 2736 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-05-30 10:12:52.562  INFO 2736 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-05-30 10:12:53.562  INFO 2736 --- [           main] o.s.c.n.zuul.ZuulFilterInitializer       : Starting filter initializer
2018-05-30 10:12:53.606  INFO 2736 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2018-05-30 10:12:53.621  INFO 2736 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/health],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-05-30 10:12:53.622  INFO 2736 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/info],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-05-30 10:12:53.624  INFO 2736 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto protected java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.springframework.boot.actuate.endpoint.web.Link>> org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping.links(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-05-30 10:12:53.693  INFO 2736 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-05-30 10:12:53.708  INFO 2736 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2018-05-30 10:12:53.709  INFO 2736 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'environmentManager' has been autodetected for JMX exposure
2018-05-30 10:12:53.712  INFO 2736 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'refreshScope' has been autodetected for JMX exposure
2018-05-30 10:12:53.715  INFO 2736 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2018-05-30 10:12:53.726  INFO 2736 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2018-05-30 10:12:53.738  INFO 2736 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=1fa1cab1,type=ConfigurationPropertiesRebinder]
2018-05-30 10:12:53.759  INFO 2736 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
2018-05-30 10:12:53.775  INFO 2736 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2018-05-30 10:12:53.857  INFO 2736 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2018-05-30 10:12:53.941  INFO 2736 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2018-05-30 10:12:53.941  INFO 2736 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2018-05-30 10:12:54.106  INFO 2736 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2018-05-30 10:12:54.106  INFO 2736 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2018-05-30 10:12:54.329  INFO 2736 --- [           main] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2018-05-30 10:12:54.358  INFO 2736 --- [           main] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2018-05-30 10:12:54.359  INFO 2736 --- [           main] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2018-05-30 10:12:54.359  INFO 2736 --- [           main] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2018-05-30 10:12:54.359  INFO 2736 --- [           main] com.netflix.discovery.DiscoveryClient    : Application is null : false
2018-05-30 10:12:54.359  INFO 2736 --- [           main] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2018-05-30 10:12:54.359  INFO 2736 --- [           main] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2018-05-30 10:12:54.359  INFO 2736 --- [           main] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2018-05-30 10:12:54.493  INFO 2736 --- [           main] com.netflix.discovery.DiscoveryClient    : The response status is 200
2018-05-30 10:12:54.496  INFO 2736 --- [           main] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 30
2018-05-30 10:12:54.499  INFO 2736 --- [           main] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 4
2018-05-30 10:12:54.504  INFO 2736 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1527646374502 with initial instances count: 3
2018-05-30 10:12:54.513  INFO 2736 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application zuul with eureka with status UP
2018-05-30 10:12:54.514  INFO 2736 --- [           main] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1527646374514, current=UP, previous=STARTING]
2018-05-30 10:12:54.516  INFO 2736 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_ZUUL/192.168.1.40:zuul:8762: registering service...
2018-05-30 10:12:54.600  INFO 2736 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_ZUUL/192.168.1.40:zuul:8762 - registration status: 204
2018-05-30 10:12:54.707  INFO 2736 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8762 (http) with context path ''
2018-05-30 10:12:54.711  INFO 2736 --- [           main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8762
2018-05-30 10:12:54.718  INFO 2736 --- [           main] com.cxria.gaiamount.api.ApiApplication   : Started ApiApplication in 8.621 seconds (JVM running for 10.193)
2018-05-30 10:12:55.682  INFO 2736 --- [n(10)-127.0.0.1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2018-05-30 10:12:55.682  INFO 2736 --- [n(10)-127.0.0.1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2018-05-30 10:12:55.705  INFO 2736 --- [on(4)-127.0.0.1] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://localhost:8888
2018-05-30 10:12:55.709  INFO 2736 --- [n(10)-127.0.0.1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 27 ms
2018-05-30 10:12:55.712  WARN 2736 --- [on(4)-127.0.0.1] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/zuul/dev/master": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)
2018-05-30 10:12:59.833  INFO 2736 --- [      Thread-26] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1fa1cab1: startup date [Wed May 30 10:12:48 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@7f0eb4b4
2018-05-30 10:12:59.834  INFO 2736 --- [      Thread-26] o.s.c.n.e.s.EurekaServiceRegistry        : Unregistering application zuul with eureka with status DOWN
2018-05-30 10:12:59.835  WARN 2736 --- [      Thread-26] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1527646379835, current=DOWN, previous=UP]
2018-05-30 10:12:59.835  INFO 2736 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_ZUUL/192.168.1.40:zuul:8762: registering service...
2018-05-30 10:12:59.837  INFO 2736 --- [      Thread-26] o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 0
2018-05-30 10:12:59.838  INFO 2736 --- [      Thread-26] o.s.c.n.zuul.ZuulFilterInitializer       : Stopping filter initializer
2018-05-30 10:12:59.841  INFO 2736 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_ZUUL/192.168.1.40:zuul:8762 - registration status: 204
2018-05-30 10:12:59.841  INFO 2736 --- [      Thread-26] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2018-05-30 10:12:59.841  INFO 2736 --- [      Thread-26] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans
2018-05-30 10:12:59.856  WARN 2736 --- [      Thread-26] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2018-05-30 10:12:59.856  INFO 2736 --- [      Thread-26] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2018-05-30 10:12:59.859  INFO 2736 --- [      Thread-26] com.netflix.discovery.DiscoveryClient    : Shutting down DiscoveryClient ...
2018-05-30 10:13:02.861  INFO 2736 --- [      Thread-26] com.netflix.discovery.DiscoveryClient    : Unregistering ...
2018-05-30 10:13:02.867  INFO 2736 --- [      Thread-26] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_ZUUL/192.168.1.40:zuul:8762 - deregister  status: 200
2018-05-30 10:13:02.880  INFO 2736 --- [      Thread-26] com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClient

I use Spring cloud version is  Finchley.RC1 .
Is there a problem with my configuration?
Thanks!

Are those settings in bootstrap.properties?

Yes~
My config server configuration:
eureka:
  client:
    service-url:
      defaultZone: http://eureka-server:8761/eureka
server:
  port: 8888
spring:
  application:
    name: configserver
  cloud:
    config:
      label: master
      server:
        git:
          uri: https://Summng@bitbucket.org/cxria/config.git
          username:
          password:
          search-paths: src/main/resources

But I don't use discovery.
Changed to spring.cloud.config.uri= http://192.168.1.21:8888/.
It worked.

authors: spencergibb xinwu-yang

repo: spring-cloud/spring-cloud-config


text:
Configurability of the Cookie Spec of jgit's http client

Problem description
I can use the config server with Bitbucket (v8.19.1) over http and authenticate with a token by exposing a bean like this:
@Bean
public TransportConfigCallback tokenAuthCallback() {
  var headers = Map.of("Authorization", "Bearer " + TOKEN);
  return transport -> {
    if (transport instanceof TransportHttp transportHttp) {
      transportHttp.setAdditionalHeaders(headers);
    }
  };
}

This works generally fine but produces a warning like the following in the config service on every http connection to the repository:

WARN o.a.h.c.protocol.ResponseProcessCookies  : Invalid cookie header: "Set-Cookie: BITBUCKETSESSIONID=XXXX; Max-Age=1209600; Expires=Thu, 09 May 2024 13:45:48 GMT; Path=/; Secure; HttpOnly". Invalid 'expires' attribute: Thu, 09 May 2024 13:45:48 GMT

Root cause
The problem can be fixed by setting the cookie spec of the request config to STANDARD with code like this (e.g. in HttpClient4Support):
httpClientBuilder.setDefaultRequestConfig(RequestConfig.custom().setCookieSpec(CookieSpecs.STANDARD))

Feature request
Setting the cookie spec of the underlying HttpClient is not impossible but rather elaborate at the moment (e.g. by redefining the implementation of ConfigurableHttpConnectionFactory). It would be great if JGitEnvironmentProperties had a property cookieSpec that would allow to set the cookie spec as needed.

Rather than introducing a property to do this I think it would provide us more flexibility if we added a way to customize the HttpClient.  PR #2413 should accomplish this.

source: gharchive/issue

authors: hpoettker ryanjbaxter

license_type: permissive

license_source: bigquery


text:
Question: How do you decrypt properties fetched using MultipleJGitEnvironmentRepository

Question: I've customized my config server to use MultipleJGitEnvironmentRepository  to fetch configurations based on custom search paths.  As a result the encrypted properties within the configurations are not being decrypted.(I understand the request to fetch properties through EnvironmentEncryptorEnvironmentRepository.findOne decrypts the values)
How do I decrypt the properties fetched through MultipleJGitEnvironmentRepository.findOne()

You can just wrap MultipleJGitEnvironmentRepository in EnvironmentEncryptorEnvironmentRepository.
https://github.com/spring-cloud/spring-cloud-config/blob/master/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/ConfigServerMvcConfiguration.java#L71

Thanks for the quick response Ryan. How would I be providing the EnvironmentEncryptor instance needed? Autowiring doesn't seem to work.

It is kind of hard to give you a direct answer without seeing some code.  If you are providing your EnvironmentRepository as a bean than it should be injected into here https://github.com/spring-cloud/spring-cloud-config/blob/master/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/config/ConfigServerMvcConfiguration.java#L65 (Assuming there is a bean of type ResourceRepository)

That worked Ryan. Thank you!
On Wed, Mar 14, 2018 at 1:39 PM, Ryan Baxter notifications@github.com
wrote:

It is kind of hard to give you a direct answer without seeing some code.
If you are providing your EnvironmentRepository as a bean than it should
be injected into here https://github.com/spring-cloud/spring-cloud-config/
blob/master/spring-cloud-config-server/src/main/java/
org/springframework/cloud/config/server/config/
ConfigServerMvcConfiguration.java#L65 (Assuming there is a bean of type
ResourceRepository)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/spring-cloud/spring-cloud-config/issues/941#issuecomment-373111339,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABKuUYQ3jqSQArCVVoqvo9Kba53wKZI3ks5teVXtgaJpZM4SqkDD
.

authors: harshanair ryanjbaxter


text:
Test Task/Batch workloads on Skipper mode

Remove classic-mode occurrences in the documentation and use the Skipper as a default and only Stream management option
Add skipper Uri to all SCDF configurations

Resolves #453

LGTM Squashed, Merged.

source: gharchive/pull-request

authors: cppwfs tzolov


text:
Parameters took by  RewriteLocationResponseHeader GatewayFilter Factory are incorrect in the documentation.

The version is 3.1.4.
Here are the errors in the documentation:

It takes stripVersionMode, locationHeaderName, hostValue, and protocolsRegex parameters.
....
The stripVersionMode parameter has the following possible values: NEVER_STRIP, AS_IN_REQUEST (default), and ALWAYS_STRIP.
....
The protocolsRegex parameter must be a valid regex String, against which the protocol name is matched. If it is not matched, the filter does nothing. The default is http|https|ftp|ftps.

According to the code， stripVersionMode might be stripVersion, protocolsRegex might be protocols. And the default value of protocols parameter is https?|ftps?.

Closing in favor of #2754

repo: spring-cloud/spring-cloud-gateway

license_source: github-api


text:
EL1008E: Property or field 'BAD_GATEWAY' cannot be found on object of type

org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'BAD_GATEWAY' cannot be found on object of type 'org.springframework.cloud.gateway.discovery.DiscoveryClientRouteDefinitionLocator$DelegatingServiceInstance' - maybe not public or not valid?
at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:217) ~[spring-expression-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104) ~[spring-expression-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:91) ~[spring-expression-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:114) ~[spring-expression-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:365) ~[spring-expression-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.cloud.gateway.discovery.DiscoveryClientRouteDefinitionLocator.getValueFromExpr(DiscoveryClientRouteDefinitionLocator.java:130) ~[spring-cloud-gateway-core-2.1.0.RELEASE.jar:2.1.0.RELEASE]
at org.springframework.cloud.gateway.discovery.DiscoveryClientRouteDefinitionLocator.lambda$getRouteDefinitions$4(DiscoveryClientRouteDefinitionLocator.java:117) ~[spring-cloud-gateway-core-2.1.0.RELEASE.jar:2.1.0.RELEASE]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:107) [reactor-core-3.2.6.RELEASE.jar:3.2.6.RELEASE]

I want to configure a global Retry GatewayFilter Factory；
yml config:
spring:
  cloud:
    gateway:
      routes:
        - id: retry_test
          uri: http://localhost:8085/system
          predicates:
           - Path=/system/**
          filters:
           - name: Retry
             args:
               retries: 3
               statuses: BAD_GATEWAY
          order: -10
      discovery:
        locator:
          enabled: true
          lower-case-service-id: true
          filters:
            - PreserveHostHeader
            - TokenHeader
            - name: Retry
              args:
                retries: 3
                statuses: BAD_GATEWAY

Global configuration error, and routing configuration is not a problem
What should I do?

Please learn how to format code on GitHub.
Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.

So the arguments to the filters under discovery.locator are SpEL expressions. so statuses: 'BAD_GATEWAY' should work.

We could use this to update the documentation https://cloud.spring.io/spring-cloud-static/Greenwich.RELEASE/single/spring-cloud.html#_configuring_predicates_and_filters_for_discoveryclient_routes or, if it's not SpEL, just include it maybe?

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

authors: huangpang ryanjbaxter spencergibb spring-issuemaster


text:
Setup project directory for Kotlin Samples

This accomplishes the pom file setup for a Kotlin sample app directory in spring-cloud-gcp.
In reference to #1299.

Codecov Report

Merging #1300 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #1300   +/-   ##
=========================================
  Coverage     67.76%   67.76%
  Complexity     1372     1372
=========================================
  Files           194      194
  Lines          5568     5568
  Branches        571      571
=========================================
  Hits           3773     3773
  Misses         1556     1556
  Partials        239      239

Flag
Coverage Δ
Complexity Δ

#integration
?
?

#unittests
67.76% <ø> (ø)
1372 <ø> (ø)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ac30ab...950e827. Read the comment docs.

authors: codecov-io dzou

repo: spring-cloud/spring-cloud-gcp


text:
Support the new OptionalDecoder

Feign released a new OptionalDecoder with it's version 9.5.0 (in the feign-java8 module). It would be nice be be able to configure it in an easy way.
Since the actual decoder bean is annotated with @OnMissingBean, we either:

need to create the whole decoder chain in a custom configuration class (not very resilient to updates)
need to create a custom configuration class that will auto-configure after the FeignClientsConfiguration one, and inject the existing Decoder bean into a new OptionalDecoder bean

Both solutions do not seem very good for maintenance. Do you see how this could be done in a more seamless way ?

This would target 2.0.0.x since java 8 will be the baseline then.

We were looking at the exact same thing the other day and hit the same issue. Other Spring projects use the pattern of a Customizer (such as ClusterBuilderCustomizer in Boot for Cassandra) as an extension point to allow user configuration to be added to beans created as part of autoconfig. Would be an enhancement that fits now and for future requirements.

You can already declare custom decoders as beans using @FeignClient(configuration).

Closed via c544f4aef63ce00ccd2122cde33d2b0fef2361d4

authors: LtTempletonPeck afillatre spencergibb

repo: spring-cloud/spring-cloud-netflix


text:
Add spring-cloud-stream-modules-analytics to bom

From @markpollack on February 11, 2016 3:25
Suggested to add this to the bom so dataflow (and presumably other consumers of these modules) would not have to declare this dependency explicity.
Look for this issue name in https://github.com/spring-cloud/spring-cloud-dataflow/blob/master/spring-cloud-dataflow-dependencies/pom.xml as an example.
Related: https://github.com/spring-cloud/spring-cloud-dataflow/issues/384
Copied from original issue: spring-cloud/spring-cloud-stream-modules#185

This issue really belongs in spring-cloud-dataflow....

authors: markpollack sabbyanandan


text:
Add spring-cloud-stream-modules-analytics to bom

Suggested to add this to the bom so dataflow (and presumably other consumers of these modules) would not have to declare this dependency explicity.
Look for this issue name in https://github.com/spring-cloud/spring-cloud-dataflow/blob/master/spring-cloud-dataflow-dependencies/pom.xml as an example.
Related: https://github.com/spring-cloud/spring-cloud-dataflow/issues/384

This issue was moved to spring-cloud/spring-cloud-stream-app-starters#78


text:
No serializer found for class java.io.ByteArrayInputStream on OpenAiAudioTranscriptionModel.call

Bug description
Exception is thrown when attempting to send a request to OpenAI transcription service. Please note that the same logic was working approximately 1-2 months ago.
Environment
Kotlin + Java 21
Spring Boot 3.3.1
Spring AI 1.0.0-M1 (Also tried on 1.0.0-SNAPSHOT)
Steps to reproduce
Simply execute .call method from OpenAiAudioTranscriptionModel with a ByteArrayResource set in the Prompt.
Here's my method:
fun transcribeAudio(audio: ByteArray): String {

        val resource = ByteArrayResource(audio)
        val options = OpenAiAudioTranscriptionOptions.builder()
            .withResponseFormat(OpenAiAudioApi.TranscriptResponseFormat.TEXT)
            .build()
        val prompt = AudioTranscriptionPrompt(resource, options)
        val response = client.call(prompt)
        val output = response.result.output
        log.info { "[Transcription] Result - ${response.result}" }
        return output
    }

Expected behavior
No exception. Executed method returns transcribed audio as text.
Some of the things that I tried to fix the issue

Removed all custom beans that could affect the serialization - ObjectMapper and MappingJackson2HttpMessageConverter
Custom ObjectMapper bean with disabled SerializationFeature.FAIL_ON_EMPTY_BEANS

@Bean
    fun objectMapper(): ObjectMapper {
        return ObjectMapper().apply {
            disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
        }
    }

Custom MappingJackson2HttpMessageConverter bean

    @Bean
    fun mappingJackson2HttpMessageConverter(objectMapper: ObjectMapper): MappingJackson2HttpMessageConverter {
        objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
        val converter = MappingJackson2HttpMessageConverter(objectMapper)
        return converter
    }

Stack trace
org.springframework.http.converter.HttpMessageConversionException: Type definition error: [simple type, class java.io.ByteArrayInputStream]
	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.writeInternal(AbstractJackson2HttpMessageConverter.java:489)
	at org.springframework.http.converter.AbstractGenericHttpMessageConverter$1.writeTo(AbstractGenericHttpMessageConverter.java:94)
	at org.springframework.http.client.HttpComponentsClientHttpRequest$BodyEntity.writeTo(HttpComponentsClientHttpRequest.java:155)
	at org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:253)
	at org.apache.hc.core5.http.impl.io.HttpRequestExecutor.execute(HttpRequestExecutor.java:141)
	at org.apache.hc.core5.http.impl.io.HttpRequestExecutor.execute(HttpRequestExecutor.java:218)
	at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager$InternalConnectionEndpoint.execute(PoolingHttpClientConnectionManager.java:717)
	at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.execute(InternalExecRuntime.java:216)
	at org.apache.hc.client5.http.impl.classic.MainClientExec.execute(MainClientExec.java:116)
	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
	at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:188)
	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
	at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:192)
	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
	at org.apache.hc.client5.http.impl.classic.HttpRequestRetryExec.execute(HttpRequestRetryExec.java:113)
	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
	at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:152)
	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
	at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:116)
	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
	at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170)
	at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:87)
	at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:55)
	at org.apache.hc.client5.http.classic.HttpClient.executeOpen(HttpClient.java:183)
	at org.springframework.http.client.HttpComponentsClientHttpRequest.executeInternal(HttpComponentsClientHttpRequest.java:99)
	at org.springframework.http.client.AbstractStreamingClientHttpRequest.executeInternal(AbstractStreamingClientHttpRequest.java:70)
	at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:66)
	at org.springframework.web.client.DefaultRestClient$DefaultRequestBodyUriSpec.exchangeInternal(DefaultRestClient.java:492)
	at org.springframework.web.client.DefaultRestClient$DefaultRequestBodyUriSpec.retrieve(DefaultRestClient.java:460)
	at org.springframework.ai.openai.api.OpenAiAudioApi.createTranscription(OpenAiAudioApi.java:670)
	at org.springframework.ai.openai.OpenAiAudioTranscriptionModel.lambda$call$0(OpenAiAudioTranscriptionModel.java:153)
	at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:344)
	at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:217)
	at org.springframework.ai.openai.OpenAiAudioTranscriptionModel.call(OpenAiAudioTranscriptionModel.java:124)
	at io.github.clivelewis.assistant.chat.impl.openai.OpenAiTranscriptionService.transcribeAudio(OpenAiTranscriptionService.kt:24)
	at io.github.clivelewis.assistant.telegram.commands.ConversationCommand.transcribeVoiceMessage(ConversationCommand.kt:187)
	at io.github.clivelewis.assistant.telegram.commands.ConversationCommand.access$transcribeVoiceMessage(ConversationCommand.kt:28)
	at io.github.clivelewis.assistant.telegram.commands.ConversationCommand$transcribeVoiceMessage$1.invokeSuspend(ConversationCommand.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class java.io.ByteArrayInputStream and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: org.springframework.util.LinkedMultiValueMap["file"]->java.util.ArrayList[0]->org.springframework.ai.openai.api.OpenAiAudioApi$1["inputStream"])
	at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:77)
	at com.fasterxml.jackson.databind.SerializerProvider.reportBadDefinition(SerializerProvider.java:1330)
	at com.fasterxml.jackson.databind.DatabindContext.reportBadDefinition(DatabindContext.java:414)
	at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:53)
	at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:30)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:732)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:770)
	at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:183)
	at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119)
	at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
	at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
	at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:808)
	at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithoutTypeInfo(MapSerializer.java:764)
	at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:720)
	at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:35)
	at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:502)
	at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:422)
	at com.fasterxml.jackson.databind.ObjectWriter$Prefetch.serialize(ObjectWriter.java:1570)
	at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:1061)
	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.writeInternal(AbstractJackson2HttpMessageConverter.java:483)
	... 45 common frames omitted

Closing as the issue was 'magically' fixed.
I assume there was something wrong with OpenAI API or maybe with my setup

I cloned the project, checked out to tags/v1.0.0-M1 and ran tests from https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/test/java/org/springframework/ai/openai/audio/transcription/OpenAiTranscriptionModelIT.java
All tests succeeded, so it's issue on my side. Either because of Kotlin, or because of my code...

I played around with different custom Bean definitions and somehow defining OpenAiAudioTranscriptionModel solved the issue for me...
@Bean
fun openAiAudioApi(@Value("\${spring.ai.openai.api-key}") apiKey: String) = OpenAiAudioApi(apiKey)

@Bean
fun openAiAudioTranscriptionModel(openAiAudioApi: OpenAiAudioApi) = OpenAiAudioTranscriptionModel(openAiAudioApi)

I'm closing the issue even though I have no idea why this helped. Will appreciate if somehow could explain.

repo: spring-projects/spring-ai


text:
Add maxInboundMessageSize to RabbitConnectionFactoryBean

Back port issue for: https://github.com/spring-projects/spring-amqp/issues/2495

Fixed via: https://github.com/spring-projects/spring-amqp/commit/c00f588af77ac3f2a65dc432410e8b4b141cb30e

repo: spring-projects/spring-amqp


text:
How to print SQL log in my IDEA console？

In Mybatis i know how to print SQL log to talk me My error sql,but in Spring-Data-JDBC i don't konw to print SQL log,I seach Bing no find answer to me？Can you talk about me？So Thanks

This issue tracker is for bug reports and feature/improvement requests.
This question is more of a usage questions. Those should be asked at Stackoverflow and be tagged with spring-data-jdbc.
By using Stackoverflow, the community can assist and the questions and their answers can more easily be found using the search engine of your choice.
Having said that, Spring Data JDBC uses the JdbcTemplate so in order to log SQL statements you should configure logging for the JdbcTemplate.

------------------ 原始邮件 ------------------
发件人:                                                                                "spring-projects/spring-data-jdbc"                                                                                @.>;
发送时间: 2022年1月20日(星期四) 下午2:47
@.>;
@.@.>;
主题: Re: [spring-projects/spring-data-jdbc] How to print SQL log in my IDEA console？ (Issue #1135)
This issue tracker is for bug reports and feature/improvement requests.
This question is more of a usage questions. Those should be asked at Stackoverflow and be tagged with spring-data-jdbc.
By using Stackoverflow, the community can assist and the questions and their answers can more easily be found using the search engine of your choice.
Having said that, Spring Data JDBC uses the JdbcTemplate so in order to log SQL statements you should configure logging for the JdbcTemplate.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: @.***>

------------------ 原始邮件 ------------------
发件人:                                                                                "spring-projects/spring-data-jdbc"                                                                                @.>;
发送时间: 2022年1月20日(星期四) 下午2:47
@.>;
@.@.>;
主题: Re: [spring-projects/spring-data-jdbc] How to print SQL log in my IDEA console？ (Issue #1135)
This issue tracker is for bug reports and feature/improvement requests.
This question is more of a usage questions. Those should be asked at Stackoverflow and be tagged with spring-data-jdbc.
By using Stackoverflow, the community can assist and the questions and their answers can more easily be found using the search engine of your choice.
Having said that, Spring Data JDBC uses the JdbcTemplate so in order to log SQL statements you should configure logging for the JdbcTemplate.
—
Thank you very much. I'm reckless.
I'm a rookie who just came into contact with spring data JDBC.
 Thank you for your answer. I think this framework is very cool. I've fallen in love with it. I hope I can put forward useful bugs in issus in the future.

I took the liberty to ask and answer How to log SQL statements and parameters with Spring Data JDBC

I also edited your comment for better readability.
I'm glad you like Spring Data JDBC and don't worry, everything is fine.

authors: JJloveworld schauder

repo: spring-projects/spring-data-jdbc


text:
Use the latest version of the Spring IO Plugin

This change is necessary to allow Spring IO Platform 2.0 to remove the platform-versions properties file that was deprecated in 1.1. To allow Spring Mobile's Platform compliance to be verified as part of Spring IO Platform 2.0's build and release process, I'd like this to be included in Spring Mobile 1.1.x which is the version that's currently in Spring IO Platform 2.0. If you have any questions, please let me know.

@wilkinsona should I push a new release (1.1.5) with this change, to be included in Spring IO?

@royclarkson At some point, yes please. There's no immediate need, but it'd be good to get a release with these changes in the not too distant future.

OK, I'll do that and send you a PR with the new version when it's ready.

Thanks. That PR should be against Boot, BTW. The Platform inherits the version of Spring Mobile from there.

authors: royclarkson wilkinsona

repo: spring-projects/spring-mobile


text:
Dependency upgrades

This has already been merged

authors: jgrandja jzheaux

repo: spring-projects/spring-security-oauth


text:
[Sprint: 49] XD-2575 Adding --closeTimeout option to close files after certain tim…

…e regardless of activity

This looks good to me.

merged

authors: jvalkeal markpollack trisberg

repo: spring-projects/spring-xd


text:
Global shortcut conflicts documentation

Documented Nvidia GeForce Experience and Dell Display Manager applications as known cause of shortcut conflicts
See:
https://github.com/springcomp/optimized-azerty-win-wiki/pull/1

Thanks for your contribution.

authors: Slion springcomp

repo: springcomp/optimized-azerty-win


text:
ResponseHeader annotation not parsed?

[x] What version of the library are you using? 2.9.2

What kind of issue is this?

[x] Bug report.

Neither of X-Hello nor X-Hello-Bis headers are rendered in Swagger-UI from the following controller, while all the other details are correctly displayed:
@CrossOrigin(origins = "*", maxAge = 3600)
@Api(tags={ "Test ResponseHeader" })
@RestController
@RequestMapping(path="/response-header", produces="application/json")
public class ResponseHeaderController {

	@ApiResponse(
			code=200, message="OK",
			responseHeaders={
					@ResponseHeader(name="X-Hello-Bis", description="X-Hello-Bis header description", response=String.class)
			})
	@ApiOperation(
			responseHeaders={
					@ResponseHeader(name="X-Hello", description="X-Hello header description", response=String.class)
			},
			value="Get test for response header",
			nickname="responseHeader", notes="Notes 'bout test"
		)
	@GetMapping(path="", produces="text/plain")
	public String responseHeader(@ApiParam(hidden=true) HttpServletRequest req, @ApiParam(hidden=true) HttpServletResponse resp) {
		resp.addHeader("X-Hello", "Hello!");
		resp.addHeader("X-Hello-Bis", "Hallo!");
		return "Hi!";
	}

}

I found issues #937 and #1271 both closed, am I missing something in my code?

It should work, I'll research. Thanks for linking to the right issues and searching the repository 👍

I have just hit this exact problem too, springfox 2.9.2 + spring boot 2.0.5.RELEASE. Tried via both @ApiResponse and @ApiOperation as described above, no response header properties in the generated swagger document.

FYI, this exists in SpringFox 3 as well.

Does this fix apply for SpringFox 3?  The description fields in ResponseHeader do not seem to be showing up in swagger.json anymore for me when I bumped the version from 2.9.2 to 3.0.0.
I had to replace depreciated methods ResponseMethodBuilder  -> ResponseBuilder and globalResponseMessage -> globalResponses
    @ApiResponses(value = [
        ApiResponse(code = 200, message = "Contents successfully returned", responseHeaders = [
             ResponseHeader(name="X-Hello-Bis", description="X-Hello-Bis header description", response=String::class)
        ]),
        ApiResponse(code = 404, message = "Upload could not be found", response = ControllerAdvice.ErrorResponse::class)
    ])
    @ApiOperation(value = "X-Hello", notes = "notes.")

docket configuration
        val responseMessages = listOf(
                ResponseBuilder()
                        .code("401")
                        .description("Unauthorized")
                        .build(),
                ResponseBuilder()
                        .code("403")
                        .description("Forbidden")
                        .build()
        )

        val docket = Docket(DocumentationType.SWAGGER_2)
                .apis(RequestHandlerSelectors.any())
                .forCodeGeneration(true)
                .select()
                .apis(RequestHandlerSelectors.any())
                .paths(PathSelectors.any())
                .build()
                .directModelSubstitute(Resource::class.java, MultipartFile::class.java)
                .useDefaultResponseMessages(false)
                .globalResponses(HttpMethod.GET, responseMessages)

repo: springfox/springfox


text:
Aggregate  API Docs in Spring Gateway failed

Please take the time to search the repository, if your question has already been asked or answered.

[x] What version of the library are you using?
3.0.0

What kind of issue is this?

[x] Bug report. If you’ve found a bug, spend the time to write a failing test.

The reproducer codes: https://github.com/hantsy/spring-puzzles/blob/master/springfox-gateway/
I tried to add an aggregated Swagger UI for all downstream service in a Microservices architecture, but failed.
    @Primary
    @Bean
    public SwaggerResourcesProvider swaggerResourcesProvider(InMemorySwaggerResourcesProvider defaultResourcesProvider) {
        return () -> {
            SwaggerResource customersResource = new SwaggerResource();
            customersResource.setName("Customers Endpoints");
            customersResource.setSwaggerVersion("3.0");

            customersResource.setUrl("/customers/v3/api-docs");
            //customersResource.setUrl("http://localhost:8001/v3/api-docs");

            SwaggerResource ordersResource = new SwaggerResource();
            ordersResource.setName("Orders Endpoints");
            ordersResource.setSwaggerVersion("3.0");
            ordersResource.setUrl("/orders/v3/api-docs");
            //ordersResource.setUrl("http://localhost:8002/v3/api-docs");

            List<SwaggerResource> resources = new ArrayList<>(defaultResourcesProvider.get());
            resources.add(customersResource);
            resources.add(ordersResource);
            return resources;
        };
    }

The router config in the gateway application.yml is similar to this.

spring:
  cloud:
    gateway:
      routes:
        - id: customers
          uri: http://localhost:8001
          predicates:
            - Path=/customers/**
          filters:
            - RewritePath=/customers/(?<segment>.*), /$\{segment}
        - id: orders
          uri: http://localhost:8002
          predicates:
            - Path=/orders/**
          filters:
            - RewritePath=/orders/(?<segment>.*), /$\{segment}

The swagger resources url added the gateway URL by default, I can not set a full URL with HTTP/HTTPS protocol.
When running the application, the Swagger UI is displayed, but when I tried to run the endpoints in the downstream service(eg. hosted on http://localhost:8001), it always called on the gateway host(hosted on http://localhost:8080), it is incorrect.
Excepted:  If it called on http://localhost:8080/customers, it will work due to rewrite rules, but it seems there is no way to set up the rewrite rules.  Or called on the target host address: http://localhost:8001.

Hope there is a baseUrl when it is set, the API Docs can be discovered via $baseUrl +"/v3/api-docs".

Hope there is a baseUrl. When it is set, the API Docs can be discovered via $baseUrl +"/v3/api-docs", and API endpoints test can be executed on the baseUrl directly.
So we can set the baseUrl to the gateway customers endpoints(http://localhost:8080/customers) instead of the target service.

@hantsy I think my blog would help you about it.
https://blog.yuebaix.com/2021/10/04/七天构建springcloud集群/
I suppose the maintainer has not maintained for a long time.

This is  the key solution.
@Primary
@Configuration
public class GatewayRoutesOasSwaggerResourcesProvider extends InMemorySwaggerResourcesProvider {
    protected static final String API_DOCS_URI = "/v3/api-docs";
    private static final String SWAGGER_VERSION = "3.0";
    private final RouteLocator routeLocator;
    private final GatewayProperties gatewayProperties;

    public GatewayRoutesOasSwaggerResourcesProvider(
            RouteLocator routeLocator, GatewayProperties gatewayProperties,
            Environment environment, DocumentationCache documentationCache, DocumentationPluginsManager pluginsManager) {
        super(environment, documentationCache, pluginsManager);
        this.routeLocator = routeLocator;
        this.gatewayProperties = gatewayProperties;
    }

    @Override
    public List<SwaggerResource> get() {
        List<SwaggerResource> resources = new ArrayList<>();
        resources.addAll(super.get());
        List<String> routes = new ArrayList<>();
        routeLocator.getRoutes().subscribe(route -> routes.add(route.getId()));
        gatewayProperties.getRoutes().stream().filter(routeDefinition -> routes.contains(routeDefinition.getId())).forEach(route -> {
            route.getPredicates().stream()
                    .filter(predicateDefinition -> ("Path").equalsIgnoreCase(predicateDefinition.getName()))
                    .forEach(predicateDefinition -> resources.add(swaggerResource(route.getId(),
                            predicateDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0")
                                    .replace("**", API_DOCS_URI))));
        });
        return resources;
    }

    private SwaggerResource swaggerResource(String name, String location) {
        SwaggerResource swaggerResource = new SwaggerResource();
        swaggerResource.setName(name);
        swaggerResource.setLocation(location);
        swaggerResource.setSwaggerVersion(SWAGGER_VERSION);
        return swaggerResource;
    }
}

@yuebaix Thanks.
It seems SpringFox development is not active now.

There is no update for several months, not sure this project is still active.

authors: hantsy yuebaix


text:
Missing example contract for path paramerters

I'm evaluating spring-cloud-contract-oa3 extention to minimize our teams need to write an openapi file and a seperate contract.
So i tried to migrate our contracts into our openapi.yml which turned out very well for most cases.
But i have issues to define a contract for an endpoint which expects an path parameter.
The generated test is not able to call our implementation.
here is a simplified version of our issue:
paths:
  /users/{userId}:
    get:
      summary: Get a user by ID
      parameters:
        - in: path
          name: userId
          schema:
            type: integer
          required: true
          description: Numeric ID of the user to get
          x-contracts:
          - contractId: 1
              name: Should Return User with given ID
     responses:
                '200':
                    description: user found
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    userId:
                                        type: string
                                        format: uuid
                    x-contracts:
                    - contractId: 1
                      body:
                          userId: "1ce5f829-a5c0-440e-bd3f-8dec47ccfafe"
                      headers:
                          Content-Type: application/json;charset=UTF-8

As you can see I have no idea where i have to put  the path parameter for my contract.
Can you provide an example for path parameters?

This is currently not supported - which is a big gap.
I see two options.

I could extend the OA3 parameter object to allow setting a value for the path parameter. (ie for a given contract, re-write the url /users/{userId} to /users/1234)
Add the ability to use a urlPath w/regex. Looks like Spring Cloud Contract will take a urlPath (with regex) over a url value BUT - then query parameters are not picked up

This is the SCC code with parses the Contract object -
	private UrlPattern urlPattern() {
		Object urlPath = urlPathOrUrlIfQueryPresent()
		if (urlPath) {
			if(urlPath instanceof Pattern) {
				return WireMock.urlPathMatching(getStubSideValue(urlPath.toString()) as String)
			} else {
				return WireMock.urlPathEqualTo(getStubSideValue(urlPath.toString()) as String)
			}
		}
		if(!request.url) {
			throw new IllegalStateException("URL is required!")
		}
		Object url = getUrlIfGstring(request?.url?.clientValue)
		if (url instanceof Pattern) {
			return WireMock.urlMatching((url as Pattern).pattern())
		}
		return WireMock.urlEqualTo(url.toString())
	}
	private Object urlPathOrUrlIfQueryPresent() {
		Object urlPath = request?.urlPath?.clientValue
		Object queryParamsFromUrl = request?.url?.queryParameters?.parameters
		if (urlPath) {
			return urlPath
		}
		if (queryParamsFromUrl) {
			return request?.url?.clientValue
		}
		return null
	}```

Assuming I'm reading the above correctly, you can get a urlPath (with regex) or a url with query params.

I'm leaning towards option 1 - which will allow you to specify a value for the contract.

Thoughts?

Thanks for your fast reply.
I think option 1 will be the best option because it will not have the big drawback of loosing the query params.

Added this to the 2.0.2.2 release. If you set a contractPath now, it will override the path for the contract.
Example:
paths:
    /foo:
        put:
            x-contracts:
                - contractId: 1
                  description: Some description
                  name: some name
                  priority: 8
                  ignored: true
                  contractPath: /foo1

authors: nekator springframeworkguru


text:
1.1.4 release

We've been using the queryAll flag for a few months now using a custom build from master. It seems to be working as expected. Can we do a 1.1.4 release to get that support in an official version?

Can we have this merged as soon as possible?

Hi nhamiltontt
QueryAll is not working for me. Can you tell me how you create the custom build and utilise the query all method?
Also do we have any latest release with queryAll options. I am using 1.1.3

authors: harshit0 nhamiltontt sindhujadhamodaran

repo: springml/spark-salesforce


text:
PHP Version

Hi,
I switch the Branch to 7.3.x version of PHP, but still get the 7.1.20 Version.

You need to shut down the running containers first via docker-compose down. After that step, change the branch and run the following commands.
docker-compose build
docker-compose up -d

does this solved you problem ? @wadimsewo

Closed due to now response.

authors: MrOffline77 narendravaghela wadimsewo

repo: sprintcube/docker-compose-lamp

license: MIT


text:
Add tests and get project ready with levels

Projects need to be able to use it, so we need to get all errors out of the first levels, and only use higher levels for core.

Solved with https://github.com/spryker/architecture-sniffer/pull/19

repo: spryker/architecture-sniffer


text:
APIGateway: Treat props as non-mandatory, and dont crash on unsupported resource

See #5462

Codecov Report

Merging #5466 (8e21bbf) into master (5675994) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #5466   +/-   ##
=======================================
  Coverage   96.09%   96.09%
=======================================
  Files         724      724
  Lines       71996    71998    +2
=======================================
+ Hits        69188    69190    +2
  Misses       2808     2808

Flag
Coverage Δ

servertests
35.82% <60.00%> (+<0.01%)
:arrow_up:

unittests
96.03% <100.00%> (+<0.01%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

moto/apigateway/models.py
94.37% <100.00%> (ø)

moto/cloudformation/parsing.py
97.28% <100.00%> (+0.01%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

authors: bblommers codecov-commenter

repo: spulec/moto


text:
Spyder 4 Hangs/Freezes randomly when editing code

Usually occurs when backspacing in code editing, with Keras (TensorFlow) model training running in background; simple non-responsiveness, screen greys out upon clicking (screenshot at bottom), with mousewheel spinning infinitely.
Interestingly, training continues seemingly unscathed, and model checkpoints itself as programmed (w/ files generated where expected) - nonetheless, it's problematic.
Versions

Spyder version: 4.0.0
Python version: 3.7.5
Qt version: 5.9.6
PyQt5 version: 5.9.2
Operating System: Windows 10

Dependencies
cloudpickle >=0.5.0          :  1.2.2 (OK)
pygments >=2.0               :  2.5.2 (OK)
qtconsole >=4.6.0            :  4.6.0 (OK)
nbconvert >=4.0              :  5.6.1 (OK)
sphinx >=0.6.6               :  2.2.2 (OK)
pylint >=0.25                :  2.4.4 (OK)
psutil >=0.3                 :  5.6.7 (OK)
qtawesome >=0.5.7            :  0.6.0 (OK)
qtpy >=1.5.0                 :  1.9.0 (OK)
pickleshare >=0.4            :  0.7.5 (OK)
zmq >=17                     :  18.1.0 (OK)
chardet >=2.0.0              :  3.0.4 (OK)
numpydoc >=0.6.0             :  0.9.1 (OK)
spyder_kernels >=1.8.1;<2.0.0:  1.8.1 (OK)
qdarkstyle >=2.7             :  2.7 (OK)
atomicwrites >=1.2.0         :  1.3.0 (OK)
diff_match_patch >=20181111  :  20181111 (OK)
intervaltree                 :  None (OK)
watchdog                     :  None (OK)
keyring                      :  None (OK)
pexpect >=4.4.0              :  4.7.0 (OK)
pympler                      :  None (OK)
sympy >=0.7.3                :  1.4 (OK)
cython >=0.21                :  0.29.14 (OK)
IPython >=4.0                :  7.10.1 (OK)
matplotlib >=2.0.0           :  3.1.1 (OK)
pandas >=0.13.1              :  0.25.3 (OK)
numpy >=1.7                  :  1.17.4 (OK)
scipy >=0.17.0               :  1.3.1 (OK)
pyls >=0.31.2;<0.32.0        :  0.31.2 (OK)
rtree >=0.8.3                :  0.8.3 (OK)

Screenshot:

I see the same behaviour, but cannot pin it down to a particular reason. Right now I just edited the docstring of a function as seen below (I was about to add "rotated around " in the screenshot below), when spyder froze. Happened a couple of times before and I don't see how to recover from this except for restarting spyder.

This could be caused by issue #10918, which is going to be fixed in our next version. So please wait until that release is out (hopefully next week) and report back.

I think this could also be caused by the problem reported on #11222, which was already fixed and it'll be part of our next release.

@ccordoba12 To notify, reproduced in 4.0.1.

Yeah, this will be fixed in our next version.

I am report the same bug. Code is about 1k lines and now it freezes every 20min or so.

I am reporting the same bug. Code is spread in 6 different tabs, each tab around 350 lines.  It usually freezes when scrolling back quickly with arrows  in command history.

now freezes and must be killed every time I try to comment/uncomment a block a code..it's become unusable.. I sadly am going to have to switch to another IDE though I really do like spyder

I am experiencing the same bug. The most recent was just 20 minutes ago. It crashes while just editing code. Nothing is running. And it happens often, every half hour to an hour. Spyder is up to date (4.0.1).

It seems the case is closed, but I am experiencing the same bug while editing a script less than 100 lines. It freezes several times so far. Below is the screenshot when it's freezing. It happened when I tried to type a space  I have imported pd, os and datetime, and have a big dataframe (186k * 45) in memory.
Running on Spyder 4.0.1, with python 3.7.6 64-bit | Qt 5.9.6 | PyQt5 5.9.2 | Windows 10

It happens to me every 15-20 minutes, even when editing and testing a very simple python script with a few hundred lines of code that just reads a 17 MB Excel file into a Pandas dataframe and performs simple calculations using small numpy arrays (plenty of free RAM memory available during the whole processing).
It seems to happen at the moments when I type too fast the tab and/or arrow keys.

This problem is a duplicate of #11222 and it'll be fixed in our next version, to be released in a couple of weeks.
If it reappears after that, please open a new issue.

authors: AleksanderB HeraldoAlmeida OverLordGoldDragon ccordoba12 derekeden mariosgeo princyok riberyrobben sbitzer

repo: spyder-ide/spyder


text:
st spyder

Issue Report Checklist

[ ] Searched the issues page for similar reports
[ ] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[ ] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[ ] Could not reproduce inside jupyter qtconsole (if console-related)
[ ] Tried basic troubleshooting (if a bug/error)

[ ] Restarted Spyder
[ ] Reset preferences with spyder --reset
[ ] Reinstalled the latest version of Anaconda
[ ] Tried the other applicable steps from the Troubleshooting Guide

[ ] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
What steps reproduce the problem?

What is the expected output? What do you see instead?
Paste Traceback/Error Below (if applicable)

PASTE TRACEBACK HERE

Versions

Spyder version:
Python version:
Qt version:
PyQt version:
Operating System name/version:

Dependencies

PASTE DEPENDENCIES HERE

Closing because this is empty.


text:
Open Project fails

Description
What steps will reproduce the problem?

While in a project opened at Spyder start-up I try to click Projects->Open Project and I receive this error
Traceback
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\projects\plugin.py", line 98, in <lambda>
    triggered=lambda v: self.open_project())
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\projects\plugin.py", line 288, in open_project
    self.notify_project_open(path)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\decorators.py", line 22, in wrapper
    self.emit_request(method, params, requires_response)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\projects\plugin.py", line 553, in emit_request
    self.main.completions.broadcast_notification(method, params)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\plugin.py", line 323, in broadcast_notification
    req_type, req)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\languageserver\plugin.py", line 578, in broadcast_notification
    self.send_notification(language, request, params)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\languageserver\plugin.py", line 569, in send_notification
    client.perform_request(request, params)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\languageserver\client.py", line 527, in perform_request
    _id = handler(params)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\languageserver\decorators.py", line 41, in wrapper
    params = req(self, *args, **kwargs)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\languageserver\providers\workspace.py", line 46, in send_workspace_folders_change
    folder_uri = path_as_uri(folder)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\languageserver\providers\utils.py", line 51, in path_as_uri
    path_obj = pathlib.Path(osp.abspath(path))
  File "C:\anaconda3\envs\tf20\lib\ntpath.py", line 526, in abspath
    return normpath(_getfullpathname(path))
TypeError: _getfullpathname: path should be string, bytes or os.PathLike, not NoneType

Versions

Spyder version: 4.1.4
Python version: 3.7.7
Qt version: 5.9.6
PyQt5 version: 5.9.2
Operating System: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0           :  1.4.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.5.0 (OK)
diff_match_patch >=20181111    :  20200713 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.16.1 (OK)
jedi =0.17.1                   :  0.17.1 (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  1.1.0 (OK)
paramiko >=2.4.0               :  2.7.1 (OK)
parso =0.7.0                   :  0.7.0 (OK)
pexpect >=4.4.0                :  4.8.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.7.0 (OK)
pygments >=2.0                 :  2.6.1 (OK)
pylint >=1.0                   :  2.5.3 (OK)
pyls >=0.34.0;<1.0.0           :  0.34.1 (OK)
qdarkstyle >=2.8               :  2.8.1 (OK)
qtawesome >=0.5.7              :  0.7.2 (OK)
qtconsole >=4.6.0              :  4.7.5 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
rtree >=0.8.3                  :  0.9.4 (OK)
sphinx >=0.6.6                 :  3.1.2 (OK)
spyder_kernels >=1.9.2;<1.10.0 :  1.9.2 (OK)
watchdog                       :  None (OK)
zmq >=17                       :  19.0.1 (OK)

# Optional:
cython >=0.21                  :  0.29.21 (OK)
matplotlib >=2.0.0             :  3.2.2 (OK)
numpy >=1.7                    :  1.18.5 (OK)
pandas >=0.13.1                :  1.0.5 (OK)
scipy >=0.17.0                 :  1.5.0 (OK)
sympy >=0.7.3                  :  1.6.1 (OK)

I have the same issues. After reverting back to 4.1.3, I can open project again. So, it should be something wrong with 4.1.4.

I can't reproduce this on Linux. @dalthviz, could you try it on Windows?

I was unable to reproduce this, however seems like some how the empty path send when calling the open action is being use to respond to the notification of the workspace change, maybe @andfoy could have an idea of what this could be happening? (maybe is some sort of race condition?)
Also, seems like this a duplicate of #13338 and #12967 . In the case of #13338 a restart helped

Thanks @dalthviz for the feedback. I have two comments about this:

Issue #12967 shows that the problem was present before 4.1.4.
Although we can't reproduce this on our side, the solution is simply validating that the project's path is not None when trying to open a project.

Just in case, I was able to reproduce this:

authors: Dwingkak andreiionutdamian ccordoba12 dalthviz


text:
some error happened

Description
What steps will reproduce the problem?

import torch as t
m = t.nn.Linear(1, 20)
input = t.randn(1, 598, 1)
Traceback
Exception in comms call get_namespace_view:
  File "E:\anaconda\envs\torch\lib\site-packages\spyder_kernels\comms\commbase.py", line 314, in _comm_message
    buffer = cloudpickle.loads(msg['buffers'][0],
  File "E:\anaconda\envs\torch\lib\site-packages\torch\__init__.py", line 613, in <module>
    _C._initExtension(manager_path())
  File "E:\anaconda\envs\torch\lib\site-packages\torch\cuda\__init__.py", line 685, in <module>
    from . import amp
  File "E:\anaconda\envs\torch\lib\site-packages\torch\cuda\amp\__init__.py", line 1, in <module>
    from .autocast_mode import autocast, custom_fwd, custom_bwd  # noqa: F401
  File "E:\anaconda\envs\torch\lib\site-packages\torch\cuda\amp\autocast_mode.py", line 11, in <module>
    class autocast(torch.autocast_mode.autocast):
AttributeError: partially initialized module 'torch' has no attribute 'autocast_mode' (most likely due to a circular import)

Versions

Spyder version: 5.1.5
Python version: 3.9.7
Qt version: 5.12.9
PyQt5 version: 5.12.3
Operating System: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.0.2 (OK)
IPython >=7.6.0               :  7.29.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.0 (OK)
jsonschema >=3.2.0            :  4.2.1 (OK)
keyring >=17.0.0              :  23.2.1 (OK)
nbconvert >=4.0               :  6.2.0 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
paramiko >=2.4.0              :  2.8.0 (OK)
parso >=0.7.0;<0.9.0          :  0.8.2 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.10.0 (OK)
pylint >=2.5.0;<2.10.0        :  2.7.2 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.2.2;<1.3.0          :  1.2.4 (OK)
pylsp_black >=1.0.0           :  None (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.2.1 (OK)
qtawesome >=1.0.2             :  1.1.0 (OK)
qtconsole >=5.1.0             :  5.1.1 (OK)
qtpy >=1.5.0                  :  1.11.2 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=49.6.0           :  58.5.3 (OK)
sphinx >=0.6.6                :  4.2.0 (OK)
spyder_kernels >=2.1.1;<2.2.0 :  2.1.3 (OK)
textdistance >=4.2.0          :  4.2.2 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
zmq >=17                      :  22.3.0 (OK)

# Optional:
cython >=0.21                 :  None (OK)
matplotlib >=2.0.0            :  3.4.3 (OK)
numpy >=1.7                   :  1.21.4 (OK)
pandas >=1.1.1                :  1.3.4 (OK)
scipy >=0.17.0                :  1.7.2 (OK)
sympy >=0.7.3                 :  None (OK)

Hello @ccordoba12, I installed Pytorch with Conda. Before this error happened, I debugged a neural network and I found that double clicking a variable in the Variable Explorer cannot pop up a visualization window,

Hello @ccordoba12, I installed Pytorch with Conda (Run command 'conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch').
Before this error happened, I debugged a neural network and I found that double-clicking a variable in the Variable Explorer cannot pop up a visualization window, It's stuck for a while. So I removed all variables, and input the mentioned code in the Console, the error happened. To be noted, I also found Variables are no longer recorded in the Variable Explorer.
Many thanks for replying and helping.

Ok, thanks for letting us know about that. I think this error happens because it's not possible to serialize (i.e. to convert to a string) the variable you were trying to see through our Variable Explorer. And we need that to send objects from the kernel to Spyder in order to display them.
In a future version, we'll capture and pass when that error happens so users don't have to experience it.

Many Thanks for helping


text:
Spyder comments (Ctrl+1 and Ctrl+4) generate pep8 warnings

From bentkows...@gmail.com on 2014-04-07T06:47:08Z
Spyder Version:  2.2.5
Python Version:  2.7.5+
Qt Version    :  4.8.4, PyQt4 (API v2) 4.10.3 on Linux
IPython >=0.13  :  0.13.2 (OK)
matplotlib >=1.0:  1.2.1 (OK)
pep8 >=0.6      :  1.5.4 (OK)
pyflakes >=0.5.0:  0.8.1 (OK)
pylint >=0.25   :  1.1.0 (OK)
rope >=0.9.2    :  0.9.4 (OK)
sphinx >=0.6.6  :  1.2.2 (OK)
sympy >=0.7.0   :  0.7.3 (OK)
What steps will reproduce the problem?

I updated Spyder2 and the whole bundle around it (rope, pylint, sphinx etc.) with PIP -U [...]
It seems there as some update to PEP8 guidelines regarding commenting with #  (PEP8 E265).
Say, I have commented a line:
#somefunc(arg1, arg2)
I get a warning "E265 block comment should start with '# '". Adding a spece:

somefunc(arg1, arg2)
removes the warning. Ctr+4 adds a line:
#===================================
at the beginning and end of the block commented out. This brings a warning as well. What is the expected output? What do you see instead? No false positive error message.
Please provide any additional information below
. Probably it's not a problem for people using software deposited in repos, but with time it will come up.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1785

From contrebasse on 2014-04-11T06:25:16Z
The warning is correct, the problem lies with spyder's autocomment, it should add a space after the #.
The problem is to know if the space should be removed when removing the comment.

From bentkows...@gmail.com on 2014-04-11T06:42:27Z
A workaround would be adding not just the '#' sign but a 'special Spyder comment sequence', e.g. "# %" ("hash-space-proc"). But on the other hand that's looks just dirty :-(
Spyder can warn about a gap being not a multiplication of 4. That could be used to count the gap size and auto adjust it, if the removed hash was the first character in the line.
P.

From contrebasse on 2014-04-11T14:25:22Z
Having a number of space multiple of 4 (or 2 since it is an configuration option) would not work for continuation lines.
The issue can be fixed for Ctrl+4, however.

From ccordoba12 on 2015-01-01T15:21:16Z
Status: Accepted
Labels: MS-v2.3.3

From ccordoba12 on 2014-04-16T09:13:50Z
Joseph, if you can help us to solve this one it'd be great.
Status: HelpNeeded
Labels: Cat-Editor

From ccordoba12 on 2015-01-08T15:16:16Z
Labels: -MS-v2.3.3 MS-v2.4

Why can't we just make Ctrl-1 add and remove '# ' (with a space)? If there is no space, just remove '#', but always add '# '. I think that would work well with most code that follows PEP8 conventions.

Ctrl-1 also leads to problems when you are commenting out indented blocks:
for i in range(10):
#    print(i)  # this is how the line looks when commented out using Ctrl-1
    # print(i)  # this is how the line should look if following PEP8
    print(i)  # so that the indent makes sense

Using Ctrl-1 above gives a PEP8 error: E115 expected an indented block (comment).

So if Ctrl-1 worked by adding / removing '# ' before the first non-whitespace character in the line, that would fix both problems?

The problem is not adding # , but to know how to remove it without breaking the code. It should work even if the user added a comment manually at any place.
Imagine that the user manually added #(with no additional space) at the beginning of an indented line. Removing #  at the beginning of the line with would be wrong because print(2) would be indented by 3 spaces instead of 4:
if True:
    print(1)
#    print(2)

We could check the surrounding block and try to guess the correct behavior, but I'm not sure we could do it without doing it wrong in some tricky corner cases.

But according to PEP8, block comments should be indented at the same level as the code. So the only time this would create problems is when people are not following PEP8 conventions to begin with. Maybe adding "Use '# ' for comments" as an option somewhere in configurations would work?
For the problem that you point out above, it would be useful if Shift - Tab worked even when lines are not multiples of four (it works this way in Geany for example). That way you could fix indentation with Shift - Tab, Tab.

Spyder shouldn't break code even if people are not following pep8.
I agree about Shift-Tab, it could be improved, but I don't think it's a solution for the uncommenting problem.
Do you know what other python editors do in this case ?

Just tested this with PyCharm.
For the most part, it indents and unindents at the level of the code using '# ' (with a space) for indentation:
if True:
    print(1)
    # print(2)

If you select code that spans several different levels of indentation, it adds '# ' at the first level:
if True:
    print(1)
    # if True:
    #     print(2)

In both cases, it unindents by removing '# '.
For the case you pointed out above, it gives you a PEP8 warning, and unindenting still works by removing '# ', resulting in:
if True:
    print(1)
  print(2)

Thanks for testing.
The last case is strange, I'd expect to get 3 spaces before print(2) instead of 2, is it really like this in pycharm or just a typo when copying the result ?
@spyder-ide/core-developers Any idea ?

It's really like this. I think it always removes '# ' (with a space).

I actually think that that is the easiest to implement, cause we dont check for corner cases at all.. simply #  is removed and inserted always.
@Nodd I would prefer doing something like that cause is predictable, if we start playing with how to understand other cases we will end with weird code...

authors: Nodd goanpeca ostrokach spyder-issues-migrator


text:
Error on Startup

Description
What steps will reproduce the problem?

starting spyder or literaly doing anything in spyder
Traceback
Error on reading from the event loop self pipe
loop: <ProactorEventLoop running=True closed=False debug=False>
Traceback (most recent call last):
  File "D:\WinPython\WPy64-3820\python-3.8.2.amd64\lib\asyncio\windows_events.py", line 453, in finish_recv
    return ov.getresult()
OSError: [WinError 995] Der E/A-Vorgang wurde wegen eines Threadendes oder einer Anwendungsanforderung abgebrochen

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\WinPython\WPy64-3820\python-3.8.2.amd64\lib\asyncio\proactor_events.py", line 768, in _loop_self_reading
    f.result()  # may raise
  File "D:\WinPython\WPy64-3820\python-3.8.2.amd64\lib\asyncio\windows_events.py", line 808, in _poll
    value = callback(transferred, key, ov)
  File "D:\WinPython\WPy64-3820\python-3.8.2.amd64\lib\asyncio\windows_events.py", line 457, in finish_recv
    raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 995] Der E/A-Vorgang wurde wegen eines Threadendes oder einer Anwendungsanforderung abgebrochen

Versions

Spyder version: 5.3.2  (pip)
Python version: 3.8.2 64-bit
Qt version: 5.15.2
PyQt5 version: 5.15.4
Operating System: Windows 10

Dependencies
# Mandatory:
atomicwrites >=1.2.0          :  1.3.0 (OK)
chardet >=2.0.0               :  3.0.4 (OK)
cloudpickle >=0.5.0           :  1.3.0 (OK)
cookiecutter >=1.6.0          :  2.1.1 (OK)
diff_match_patch >=20181111   :  20181111 (OK)
intervaltree >=3.0.2          :  3.0.2 (OK)
IPython >=7.31.1;<8.0.0       :  7.34.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.1 (OK)
jellyfish >=0.7               :  0.9.0 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  21.2.0 (OK)
nbconvert >=4.0               :  5.6.1 (OK)
numpydoc >=0.6.0              :  0.9.2 (OK)
paramiko >=2.4.0              :  2.7.1 (OK)
parso >=0.7.0;<0.9.0          :  0.8.3 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.7.0 (OK)
pygments >=2.0                :  2.6.1 (OK)
pylint >=2.5.0;<3.0           :  2.14.5 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.5.0;<1.6.0          :  1.5.0 (OK)
pylsp_black >=1.2.0           :  1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0     :  3.0.3 (OK)
qstylizer >=0.1.10            :  0.2.1 (OK)
qtawesome >=1.0.2             :  1.1.1 (OK)
qtconsole >=5.3.0;<5.4.0      :  5.3.1 (OK)
qtpy >=2.1.0                  :  2.1.0 (OK)
rtree >=0.9.7                 :  1.0.0 (OK)
setuptools >=49.6.0           :  63.4.2 (OK)
sphinx >=0.6.6                :  2.4.4 (OK)
spyder_kernels >=2.3.2;<2.4.0 :  2.3.2 (OK)
textdistance >=4.2.0          :  4.3.0 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.9 (OK)
zmq >=22.1.0                  :  23.2.0 (OK)

# Optional:
cython >=0.21                 :  0.29.15 (OK)
matplotlib >=3.0.0            :  3.2.1 (OK)
numpy >=1.7                   :  1.18.2 (OK)
pandas >=1.1.1                :  1.0.3 (NOK)
scipy >=0.17.0                :  1.4.1 (OK)
sympy >=0.7.3                 :  1.5.1 (OK)

Hi @h0l0gr4ph thank you for the feedback! Seems like you are using WinPython? We have had some issues with a similar traceback but we haven't had ways to reproduce this in our side :/
However, checking the traceback, seems like an issue about that is open at https://github.com/ipython/ipython/issues/12049 and also a comment with a workaround/patch code is available https://github.com/ipython/ipython/issues/12049#issuecomment-586544339
Also seems like doing a downgrade to prompt-toolkit could help: https://github.com/ipython/ipython/issues/12049#issuecomment-640275866
Let us know if the info above helps!

Closing due to lack of response


text:
not able to open array of float64 type

Description
What steps will reproduce the problem?

What is the expected output? What do you see instead?
Please provide any additional information below
File "/usr/lib/python3/dist-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 449, in createEditor
if not editor.setup_and_check(value, title=key, readonly=readonly):
File "/usr/lib/python3/dist-packages/spyder/widgets/variableexplorer/arrayeditor.py", line 619, in setup_and_check
self.data.flags.writeable = True
ValueError: cannot set WRITEABLE flag to True of this array
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 449, in createEditor
if not editor.setup_and_check(value, title=key, readonly=readonly):
File "/usr/lib/python3/dist-packages/spyder/widgets/variableexplorer/arrayeditor.py", line 619, in setup_and_check
self.data.flags.writeable = True
ValueError: cannot set WRITEABLE flag to True of this array
Version and main components

Spyder Version: 3.2.6
Python Version: 3.6.7
Qt Versions: 5.9.5, PyQt5 5.10.1 on Linux

Dependencies
pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.24.1 (OK)
numpy >=1.7      :  1.16.2 (OK)
sphinx >=0.6.6   :  1.6.7 (OK)
rope >=0.9.4     :  0.10.5 (OK)
jedi >=0.9.0     :  0.11.1 (OK)
psutil >=0.3     :  5.4.2 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
sympy >=0.7.3    :  None (NOK)
cython >=0.21    :  None (NOK)
qtconsole >=4.2.0:  4.3.1 (OK)
IPython >=4.0    :  5.5.0 (OK)
pylint >=0.25    :  1.8.3 (OK)

This is fixed in our latest version (3.3.3). Please update by opening the Anaconda Prompt and running there
conda update spyder

How to get it through pip?