These are chat archives for spring-cloud/spring-cloud

19th
Aug 2016
Jacarri Chan
@jacarrichan
Aug 19 2016 01:37
hi guys, does spring-cloud must need spring-boot?
Marcos Barbero
@marcosbarbero
Aug 19 2016 01:38
From http://projects.spring.io/spring-cloud/ Spring Cloud builds on Spring Boot...
Jacarri Chan
@jacarrichan
Aug 19 2016 01:39
i have a spring project that not base on spring-boot, but i want to import spring-cloud, can i complete it ?
OK ,tks
I understand ~~
Jacarri Chan
@jacarrichan
Aug 19 2016 01:44
may be you should go to bed~~ ^_^ @marcosbarbero
Marcos Barbero
@marcosbarbero
Aug 19 2016 01:45
hahaha I’m going soon
stunode
@stunode
Aug 19 2016 01:47
hello everyone,i am come from Alibaba
Jacarri Chan
@jacarrichan
Aug 19 2016 01:48
Hangzhou
G20
stunode
@stunode
Aug 19 2016 01:49
yes , you know?
Jacarri Chan
@jacarrichan
Aug 19 2016 01:49
come from ShangHai ,(^o^)/~
stunode
@stunode
Aug 19 2016 01:50
哈哈
East Lei
@leipeizhao
Aug 19 2016 01:50
hi,guys,i'm form xian
stunode
@stunode
Aug 19 2016 01:50
this all chinese?
East Lei
@leipeizhao
Aug 19 2016 01:51
yes
EvanChou
@EvanDylan
Aug 19 2016 01:51
yes you are right
East Lei
@leipeizhao
Aug 19 2016 01:51
全是中国人
Jacarri Chan
@jacarrichan
Aug 19 2016 01:51
Last weekend, I went to Hangzhou~
timezone~~~
the problem is timezone
EvanChou
@EvanDylan
Aug 19 2016 01:52
then ,what happend?
Jacarri Chan
@jacarrichan
Aug 19 2016 01:52
nothing happend~~
East Lei
@leipeizhao
Aug 19 2016 01:52
timezone?where are you now?
singAllSong
@singAllSong
Aug 19 2016 01:53
hello
Jacarri Chan
@jacarrichan
Aug 19 2016 01:53
[this all chinese?] the problem is timezone,becaus foreigners have fallen asleep ~~~
singAllSong
@singAllSong
Aug 19 2016 01:53
everybody?
秀毛的英文啊 都是中国人
说中文
qingshuo putonghua
ok?
stunode
@stunode
Aug 19 2016 01:57

oh , but i suppose the

programmers should be up all night

we should take a exercise for English ~because this is laowai's place~
EvanChou
@EvanDylan
Aug 19 2016 01:59

wobuxinnihuizhemewuliaodeduwan

zzySoftAccount
@zzySoftAccount
Aug 19 2016 01:59
hi
EvanChou
@EvanDylan
Aug 19 2016 02:01
time to work, everyone
East Lei
@leipeizhao
Aug 19 2016 02:03
good works
Jacarri Chan
@jacarrichan
Aug 19 2016 02:03
day day up ~~~
charliewong001
@charliewong001
Aug 19 2016 02:34
haiyourenzaima
what's this room about?
Spencer Gibb
@spencergibb
Aug 19 2016 02:36
Spring Cloud
East Lei
@leipeizhao
Aug 19 2016 02:39
@spencergibb When ?Do you not sleep
Spencer Gibb
@spencergibb
Aug 19 2016 02:50
I do. I'm getting ready to.
bitsofinfo
@bitsofinfo
Aug 19 2016 04:49
Trying to create a custom feign Client to do some response manipulation. Trying this approach in a custom Feign @Configuration annotated class. Problem is that the client I need to be proxying is the ribbon LoadBalancerClient and not this default one. How can I do that? (continuation of this convo: https://gitter.im/OpenFeign/feign?at=57b67582b64a3a016f4a8e99)
    @Bean
    @Primary
    public Client myClient() {
        return new Client() {

              private Client client = new Client.Default(null, null);

              @Override
              public Response execute(Request request, Options options) throws IOException {
                  Response resp = client.execute(request, options);

                  /*
                   * Impl all the custom mutations I want here
                   * 
                   */

                  return resp;
              }

          };
    }


      @Bean
      @Primary
      @Scope("prototype")
      @ConditionalOnProperty(name = "feign.hystrix.enabled", matchIfMissing = true)
      public Feign.Builder feignBuilder() {

          return HystrixFeign.builder().client(myClient());
      }
bitsofinfo
@bitsofinfo
Aug 19 2016 05:25
this seems to work, can anyone verify this is an acceptable way to do this?
    @Bean
    public Client configurableLBFeignClient(CachingSpringLoadBalancerFactory cachingFactory,
                                            SpringClientFactory clientFactory) {
        return new LoadBalancerFeignClient(myClientBean(),
                cachingFactory, clientFactory);
    }
Dreampie
@Dreampie
Aug 19 2016 11:44
how can use @hystrixcommand with threadlocal
Daniel Lavoie
@daniellavoie
Aug 19 2016 11:59
Morning everyone,
I little question on the Config Server using a git backend. I have the feeling that the server does not handle branches that where force pushed very well. Any means to force a hard reset when commits differs ?
Daniel Lavoie
@daniellavoie
Aug 19 2016 12:15
I'll go for some debugging on the JGitEnvironmentRepository and see how its handles a diverged remote repository.
spring.cloud.config.server.git.cloneOnStart=true seems to fix my problem.
I am surprised because the property name suggest that the clone would occurs on start up. It seems to checkout the forced commit even when without restarting.
Daniel Lavoie
@daniellavoie
Aug 19 2016 12:38

It looks like it tries to merge the Config Server HEAD with remote branch upon checkout.

The local repo of the config server ends up with conflicts like this :

<<<<<<< HEAD
flyway.enabled=false
flyway.baseline-version=0.5.0
=======
flyway.enabled=true
flyway.baseline-version=0.4.0
>>>>>>> branch 'int' of ....

@spencergibb What would think if I contribute an enhancement where the local repo is hard reset when the upstream diverge ?

Daniel Lavoie
@daniellavoie
Aug 19 2016 12:50
I can see that the repository uses a simple git pull command to sync. I am not a git expert but if I can configure pull command to reset --hard using .git/config, it would do the trick without touching JGitEnvironmentRepository.
Still I am wondering if it would just be better to always reset --hard rather than pull. Config Server should not ever modify remote configuration.
Dreampie
@Dreampie
Aug 19 2016 13:14
How can use threadlocal in @HystrixCommand for update
https://gist.github.com/Dreampie/d85b8ddd7e978df8802b98680df0baa0 update threadlocal value not work
Stephan L
@stephlag
Aug 19 2016 15:21
@marcingrzejszczak did you see my comment on PR 1221 ?
Marcin Grzejszczak
@marcingrzejszczak
Aug 19 2016 15:22
Yeah - I'm out of office currently. I had some problems with tests unable to start application context :/
Stephan L
@stephlag
Aug 19 2016 15:22
well for me it is working...
Marcin Grzejszczak
@marcingrzejszczak
Aug 19 2016 15:23
I'll try to maybe isolate it in circleci or travis
Stephan L
@stephlag
Aug 19 2016 15:23
it also works against 1.0.4
Marcin Grzejszczak
@marcingrzejszczak
Aug 19 2016 15:23
Strange
So most likely it was sth wrong on my local machine
Stephan L
@stephlag
Aug 19 2016 15:24
do you remember if it was related to my changes ?
Marcin Grzejszczak
@marcingrzejszczak
Aug 19 2016 15:24
@spencergibb @ryanjbaxter lets maybe merge this and see what Jenkins will tell us?
bitsofinfo
@bitsofinfo
Aug 19 2016 16:04

Anyone every experience this? I am seeing the FIRST call of a spring-cloud feign/hystrix/ribbon client trip the fallback, despite the response being sent back (i.e. a 200)

See the log snippet below (first line then second to last line)

All subsequent invocations work fine as expected.

2016-08-19 09:55:33,539 me  app [t=44451130823f7b18,s=16dae6676b681f57,se=true] DEBUG [CountryClient] [CountryClient#getCountries] ---> GET http://zz-X-ee-service/dimCountries?size=1000 HTTP/1.1
2016-08-19 09:55:33,543 me  app [t=44451130823f7b18,s=16dae6676b681f57,se=true] INFO [AnnotationConfigApplicationContext] Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@3d7605dd: startup date [Fri Aug 19 09:55:33 MDT 2016]; parent: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@5f254608
2016-08-19 09:55:33,576 me  app [t=44451130823f7b18,s=16dae6676b681f57,se=true] INFO [AutowiredAnnotationBeanPostProcessor] JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2016-08-19 09:55:33,710 me  app [t=44451130823f7b18,s=16dae6676b681f57,se=true] INFO [ChainedDynamicProperty] Flipping property: zz-X-ee-service.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2016-08-19 09:55:33,746 me  app [t=44451130823f7b18,s=16dae6676b681f57,se=true] INFO [ShutdownEnabledTimer] Shutdown hook installed for: NFLoadBalancer-PingTimer-zz-X-ee-service
2016-08-19 09:55:33,771 me  app [t=44451130823f7b18,s=16dae6676b681f57,se=true] INFO [BaseLoadBalancer] Client:zz-X-ee-service instantiated a LoadBalancer:DynamicServerListLoadBalancer:{NFLoadBalancer:name=zz-X-ee-service,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:null
2016-08-19 09:55:33,775 me  app [t=44451130823f7b18,s=16dae6676b681f57,se=true] INFO [DynamicServerListLoadBalancer] Using serverListUpdater PollingServerListUpdater
2016-08-19 09:55:33,794 me  app [t=44451130823f7b18,s=16dae6676b681f57,se=true] INFO [ChainedDynamicProperty] Flipping property: zz-X-ee-service.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2016-08-19 09:55:33,795 me  app [t=44451130823f7b18,s=16dae6676b681f57,se=true] INFO [DynamicServerListLoadBalancer] DynamicServerListLoadBalancer for client zz-X-ee-service initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=zz-X-ee-service,current list of Servers=[192.168.0.208:8081],Load balancer stats=Zone stats: {defaultzone=[Zone:defaultzone;       Instance count:1;       Active connections count: 0;    Circuit breaker tripped count: 0;       Active connections per server: 0.0;]
},Server stats: [[Server:192.168.0.208:8081;    Zone:defaultZone;       Total Requests:0;       Successive connection failure:0;        Total blackout seconds:0;       Last connection made:Wed Dec 31 17:00:00 MST 1969;      First connection made: Wed Dec 31 17:00:00 MST 1969;    Active Connections:0;   total failure count in last (1000) msecs:0;     average resp time:0.0;  90 percentile resp time:0.0;    95 percentile resp time:0.0;    min resp time:0.0;      max resp time:0.0;      stddev resp time:0.0]
]}ServerList:org.springframework.cloud.netflix.ribbon.eureka.DomainExtractingServerList@33946948
2016-08-19 09:55:34,480 me  app [t=44451130823f7b18,s=34b8173bab92975e,se=true] WARN [DoNothingCountryClientFallback] FALLBACK Invoked: getCountries()
2016-08-19 09:55:34,749 me  app [t=44451130823f7b18,s=16dae6676b681f57,se=true] DEBUG [CountryClient] [CountryClient#getCountries] <--- HTTP/1.1 200 (1209ms)
2016-08-19 09:55:34,779 me  app [t=,s=,se=] INFO [ChainedDynamicProperty] Flipping property: zz-X-ee-service.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
bitsofinfo
@bitsofinfo
Aug 19 2016 16:10
almost like some sort of timeout is being tripped realated to first initialization of the load balancer?
Ryan Baxter
@ryanjbaxter
Aug 19 2016 16:31
@marcingrzejszczak I merged the pull request and will watch Jenkins
Ryan Baxter
@ryanjbaxter
Aug 19 2016 19:04
FYI jenkins has looked fine since merging the pull request, thanks @stephlag!