-
Notifications
You must be signed in to change notification settings - Fork 41.6k
CloudPlatform.isActive can return true when spring.main.cloud-platform is set to NONE #25455
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
CloudPlatform.isActive can return true when spring.main.cloud-platform is set to NONE #25455
Conversation
32ce250 to
dc90b92
Compare
dc90b92 to
de52e11
Compare
|
Thanks for the pull request, @nguyensach. An alternative approach would be to change the condition. It could get the active CloudPlatform and see if it matches the required platform rather than checking if the required platform is active. I think I prefer what you've proposed here but I want to check with the team to see if the current behaviour of Lines 58 to 65 in 59d8c97
It's making me wonder if there are some subtleties here that I'm overlooking. By calling isEnforced on each CloudPlatform and then falling back to |
|
@wilkinsona Thanks for your response. I think that the code in Lines 37 to 38 in 59d8c97
Therefore, All |
Update `CloudPlatform.isActive` to back-off from detection when any `spring.main.cloud-platform` property is set. See gh-25455
|
Thanks very much @nguyensach for contributing to Spring Boot. This is now in 2.3.x, 2.4.x and 2.5.x |
Fixes #25433
add isAutoDetectionEnabled method to determine that whether it is enabled that the platform is detected by looking for platform-specific environment variables.