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

3rd
Oct 2018
Sarvesh Dubey
@Sarvesh-D
Oct 03 2018 11:40
Is it possible to get spring cloud version (Dalston, Finchley etc) programmatically? Something like SpringBootVersion.getVersion()
Marcin Grzejszczak
@marcingrzejszczak
Oct 03 2018 12:10
why would you want to do that?
the easiest way would be to find a class available in one release train and not present in another one. Also Dalston vs Finchley is easy cause Dalston is Boot 1.5 and Finchley is Boot 2.0
Eric Deandrea
@edeandrea
Oct 03 2018 12:13
Aren’t the spring cloud names (Dalston, Finchley, etc) just that - names? There aren’t any actual artifacts with that label, other than the BOM correct?
Whereas with the spring boot version, there are artifacts that actually have that version
Tim Ysewyn
@TYsewyn
Oct 03 2018 12:15
@marcingrzejszczak actually, that would be quite interesting to expose in the /info actuator endpoint imo
Marcin Grzejszczak
@marcingrzejszczak
Oct 03 2018 12:16
what would you do with that knowledge?
Tim Ysewyn
@TYsewyn
Oct 03 2018 12:16
visualize it in some kind of dashboard maybe :D
also, for "compliancy" reasons
Marcin Grzejszczak
@marcingrzejszczak
Oct 03 2018 12:18

Aren’t the spring cloud names (Dalston, Finchley, etc) just that - names? There aren’t any actual artifacts with that label, other than the BOM correct?

valid point

Tim Ysewyn
@TYsewyn
Oct 03 2018 12:19
you could have a compliancy checker which validates if you're not using older versions with security leaks or smth
Eric Deandrea
@edeandrea
Oct 03 2018 12:20
To @TYsewyn ’s point though, I work in a very large organization that is very critical about CVEs/etc, and from a monitoring/auditing perspective that could be useful
I think though @TYsewyn this information could be gathered pretty easily. At build time you have that information statically. Through the buildInfo you could add it as a property and then expose it via an InfoContributor
probably wouldn’t take much effort
Sarvesh Dubey
@Sarvesh-D
Oct 03 2018 12:22
@marcingrzejszczak I would like to push the into the /info url for visualizing.. @TYsewyn you got that right, we want to visualize that on spring boot admin server
Eric Deandrea
@edeandrea
Oct 03 2018 12:24

https://docs.spring.io/spring-boot/docs/2.0.5.RELEASE/gradle-plugin/reference/html/#integrating-with-actuator-build-info - see the section on "Additional properties can also be added to the build information”

in build.gradle:

springBoot {
    buildInfo {
        properties {
            additional = [
                'a': 'alpha',
                'b': 'bravo'
            ]
        }
    }
}
Tim Ysewyn
@TYsewyn
Oct 03 2018 12:25
correct but then all teams need to implement or add a custom jar for this "functionality", so it would be easier to have this in spring-cloud-commons. but that just my 2 cents :)
Eric Deandrea
@edeandrea
Oct 03 2018 12:26
Agreed it would be nice to have in the library itself. We have our own internal Gradle plugin which sits on top of the Spring Boot Gradle Plugin where we do some configuration of stuff (the buildInfo one of those things). That way every application in our organization has the same stuff.
We also do things like wiring in JUnit Jupiter Gradle support with vintage runners, generating the Git properties, ec
that way each & every team doesn’t have to worry about it
and then we can also control the version of spring boot teams are on
add references to our own internal BOMs, etc
Tim Ysewyn
@TYsewyn
Oct 03 2018 12:35
@Sarvesh-D can you create an issue on the spring-cloud-commons repo? if I find the time I'll try to make an implementation as proposal
Marcin Grzejszczak
@marcingrzejszczak
Oct 03 2018 12:47

@Sarvesh-D can you create an issue on the spring-cloud-commons repo? if I find the time I'll try to make an implementation as proposal

maybe before implementing anything it first it’s better to dicscuss if it makes sense at all

Eric Deandrea
@edeandrea
Oct 03 2018 12:48
At what point in the startup lifecycle should configService PropertySources become available? Should they be available in the "main" application's ApplicationEnvironmentPreparedEvent if it is set with lowest precedence?
@marcingrzejszczak I think you have at least 3 votes for it in here :)
Marcin Grzejszczak
@marcingrzejszczak
Oct 03 2018 12:56
:running:
Sarvesh Dubey
@Sarvesh-D
Oct 03 2018 13:01
Ziemowit
@Ziemowit
Oct 03 2018 13:05

Hey guys recently we have switched from spring-zuul to spring-gateway.
The thing which we have noticed is when spring gate receives request about static resources like css file then content-encoding: gzip is missing in response. Which was previously there (using spring-zull solution). Because of that file can't be loaded correctly by the browser.

Did you face up with such problem already?

Tim Ysewyn
@TYsewyn
Oct 03 2018 13:19
@Ziemowit which version are you using?
Ziemowit
@Ziemowit
Oct 03 2018 18:26

Hi @TYsewyn.
Versions:
spring-boot-starter-parent = 2.0.4.RELEASE
spring-cloud-dependencies = Finchley.SR1

So gateway libraries like gateway-mvc, gateway-core are = 2.0.1.RELEASE

Tim Ysewyn
@TYsewyn
Oct 03 2018 18:28
I tested this using 2.1.0.BUILD-SNAPSHOT and didn't have any issue. The HTTP header was correctly forwarded upstream.
There aren't any RemoveResponseHeader filters defined by default, so it should work.
Can you check if the header is being sent while calling the downstream service directly?
Ziemowit
@Ziemowit
Oct 03 2018 18:33
So my case is: Request comes to Gateway which forwards it to other Service.
When I fall back to previous ZUUL gateway it works. But ZUUL was working with Tomcat + AJP protocol.
So a few places when sth might change.
Thank you for your interest!
I will try then tomorrow to sniff step by step where the header is lost.
Thank you once more @TYsewyn .
Tim Ysewyn
@TYsewyn
Oct 03 2018 18:35
my pleasure, I hope you will find where the issue resides! :)
I would start with the service itself and work my way up in the chain