Closed robblargent closed 5 years ago
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/166170694
The labels on this github issue will be updated when the story is started.
This is a serious problem for real production scenarios.
@robblargent : Hey .. looking at this ... what version of Steeltoe CloudFoundry and ConfigServer are you seeing this with? Dave
[cid:image001.jpg@01D5113D.58C265F0]
We’ll happily test any solutions.
From: Dave Tillman notifications@github.com Sent: Thursday, May 23, 2019 7:54 AM To: SteeltoeOSS/steeltoe steeltoe@noreply.github.com Cc: williams, Stuart stuwilliams@corelogic.com; Comment comment@noreply.github.com Subject: Re: [SteeltoeOSS/steeltoe] Application name in manifest.yml is overriding spring:application:name in appsettings.json (#34)
[External Content] This message is from an external source. Please exercise caution when opening attachments or links.
@robblargenthttps://github.com/robblargent : Hey .. looking at this ... what version of Steeltoe CloudFoundry and ConfigServer are you seeing this with? Dave
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/SteeltoeOSS/steeltoe/issues/34?email_source=notifications&email_token=AINNSLHVBW4KA4GKWWZWMTLPW2VZ3A5CNFSM4HOPAV72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWCPQ5I#issuecomment-495253621, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AINNSLED5GEDFPYPX2IQNZ3PW2VZ3ANCNFSM4HOPAV7Q.
This message may contain confidential or proprietary information intended only for the use of the
addressee(s) named above or may contain information that is legally privileged. If you are
not the intended addressee, or the person responsible for delivering it to the intended addressee,
you are hereby notified that reading, disseminating, distributing or copying this message is strictly
prohibited. If you have received this message by mistake, please immediately notify us by
replying to the message and delete the original message and any copies immediately thereafter.
Thank you.
CLLD
@stuwilliams-clgx @robblargent : Trying to recreate this problem.. and I'm not seeing it right now with my test using 2.2 of Steeltoe... not saying it doesn't exist.. just trying recreate it so I can fix it. Dave
We’ll make a repo and post it to public github and you can grab it and use it as a test.
-S
From: Dave Tillman notifications@github.com Sent: Thursday, May 23, 2019 8:01 AM To: SteeltoeOSS/steeltoe steeltoe@noreply.github.com Cc: williams, Stuart stuwilliams@corelogic.com; Mention mention@noreply.github.com Subject: Re: [SteeltoeOSS/steeltoe] Application name in manifest.yml is overriding spring:application:name in appsettings.json (#34)
[External Content] This message is from an external source. Please exercise caution when opening attachments or links.
@stuwilliams-clgxhttps://github.com/stuwilliams-clgx @robblargenthttps://github.com/robblargent : Trying to recreate this problem.. and I'm not seeing it right now with my test using 2.2 of Steeltoe... not saying it doesn't exist.. just trying recreate it so I can fix it. Dave
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/SteeltoeOSS/steeltoe/issues/34?email_source=notifications&email_token=AINNSLH2XCANGZ3BNAU33ALPW2WUJA5CNFSM4HOPAV72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWCQIPY#issuecomment-495256639, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AINNSLBTFTSHGPBWNVSXUETPW2WUJANCNFSM4HOPAV7Q.
This message may contain confidential or proprietary information intended only for the use of the
addressee(s) named above or may contain information that is legally privileged. If you are
not the intended addressee, or the person responsible for delivering it to the intended addressee,
you are hereby notified that reading, disseminating, distributing or copying this message is strictly
prohibited. If you have received this message by mistake, please immediately notify us by
replying to the message and delete the original message and any copies immediately thereafter.
Thank you.
CLLD
@stuwilliams-clgx : Thanks Stuart!
@dtillman : According to our foundation folks we are running the following: PAS -> 2.3.9 PAS Windows -> 2.3.8 SCS -> 2.0.2
On that note, I have been able to reproduce this issue on whatever is currently running on Pivotal Web Services.
An example that reproduces the issue is located at https://github.com/robblargent/bg-config-server . Please let me know if those instructions are clear and/or if I can provide any additional information.
I am also able to reproduce this issue when I am consuming Steeltoe.Extensions.Configuration.ConfigServerCore v2.2.0. With this version, while deploying to PCF it is using the PCF app name in "spring.application.name".
Downgrading the version to Steeltoe.Extensions.Configuration.ConfigServerCore to v2.1.1 resolved the issue for me.
@stuwilliams-clgx @robblargent @urvin08 : Thanks ... looking this... we'll get a fix out as soon as we can. Dave
With this change, spring:application:name will no longer be set/overriden by the Steeltoe libraries. Config Server client will use the following name(s), in the following order, when retrieving configuration values from a server:
spring:cloud:config:name
if foundspring:application:name
if foundvcap:application:name
if found (typically provided by Steeltoe CloudFoundry configuration provider)
4: IHostingEnvironment.ApplicationName
as default
To support Blue/Green deployments we apply a version number suffix on the application name in the
manifest.yml
when pushing to PCF:We do not apply a version number suffix on the application name in
appsettings.json
:We have a yml configuration file called
{application}-{environment}.yml
(e.g.appname-sandbox.yml
).The issue is that the name of the application in
manifest.yml
/VCAP_APPLICATION
is being used rather than the application name inappsettings.json
, by the Steeltoe Configuration libraries, when attempting to locate a yml configuration file.We have also attempted to explicitly set the application name in code via the
Steeltoe.Extensions.Configuration.ConfigServer.ConfigServerConfigurationBuilderExtensions.AddConfigServer(environment, ApplicationName, LogFactory)
extension method, but the application name is not propagated properly. The application name from themanifest.yml
is still being used.This behavior seems to be inconsistent with Java Spring Boot.
This looks to be the same, or very similar, to the issue reported at: https://github.com/SteeltoeOSS/Configuration/issues/37
In that same issue it was stated:
Any idea when this will be fixed?