-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set spring.cloud.bootstrap.enabled=true by default #582
Set spring.cloud.bootstrap.enabled=true by default #582
Conversation
ed093b5
to
315d0ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@corneil thanks for the PR. I have some concerns around the properties. PTAL.
create-matrices.sh
Outdated
@@ -17,34 +17,38 @@ popd > /dev/null | |||
pushd applications/source > /dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are these changes related to "Disable spring.cloud.config by default"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to separate PR.
@@ -0,0 +1,3 @@ | |||
management.defaults.metrics.export.enabled=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR desc says nothing about management.defaults.metrics.export.enabled
. Why is this change in here?
We already disable the supported metrics registries via
stream-applications/applications/stream-applications-core/pom.xml
Lines 146 to 150 in df9fedb
<management.wavefront.metrics.export.enabled>false</management.wavefront.metrics.export.enabled> | |
<management.influx.metrics.export.enabled>false</management.influx.metrics.export.enabled> | |
<management.datadog.metrics.export.enabled>false</management.datadog.metrics.export.enabled> | |
<management.prometheus.metrics.export.enabled>false</management.prometheus.metrics.export.enabled> | |
<management.prometheus.metrics.export.rsocket.enabled>false</management.prometheus.metrics.export.rsocket.enabled> |
I would prefer we remove this in this patch version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The management.defaults.metrics.export.enabled is generated with you do a build on an app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made change to root pom only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The management.defaults.metrics.export.enabled is generated with you do a build on an app.
It should not be. Where is it coming from? Strange, I see it locally as well.
@@ -0,0 +1,3 @@ | |||
management.defaults.metrics.export.enabled=false | |||
spring.cloud.config.enabled=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
To add a shared property we should do it here rather than proliferate a new application.yml in all of the apps.
-
We do not want to add this property as it disables the config server for all apps. Explanation follows:
The reason you are seeing the failures is because
Spring Boot 2.4 introduced a new way to import configuration data via the spring.config.import property. This is now the default way to bind to Config Server.
Details.
However, the stream-apps currently use the Config First Bootstrap approach.
To enable this we have to do one of the following:
- set
spring.cloud.bootstrap.enabled=true
- add dep to the spring-cloud-starter-bootstrap
- set
spring.config.use-legacy-processing=true
The first is the least intrusive approach.
What you have done here in this PR is disable the config server altogether for all apps - we do not want to do that.
The "Config First Bootstrap" approach is considered legacy and we should probably have got off of it in 5.0.0 but it is too late in the 5.0.x line to change this behavior. For now, lets simply add the spring.cloud.bootstrap.enabled=true
to the shared application properties in
<properties> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting spring.cloud.bootstrap.enabled=true in the common properties seems to have done the trick.
Added spring.cloud.bootstrap.enabled=true to common properties for all applications generated.
315d0ed
to
83f7ac9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @corneil - LGTM.
Set spring.cloud.bootstrap.enabled=true by default which allows the containers for the ITs to properly start.