Skip to content
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

In application.yml deprecated 'spring.profiles' is not showing a warning #615

Closed
kdvolder opened this issue Mar 22, 2021 · 3 comments
Closed

Comments

@kdvolder
Copy link
Member

Describe the bug
In application.yml deprecated 'spring.profiles' is not showing a warning.

The 'spring.profiles' property is deprecated in spring boot 2.4.x. In properties file it shows a yellow squigly and shows a warning for that. But not in .yml. Some other deprecated properties do show warnings, so not really sure what makes that property 'special'.

To Reproduce

Create a new starter project using spring boot 2.4

In application.yml put:

spring:
  profiles: frodod,aaacc
  config:
    activate:
      on-profile:
      - frodood

Notice there are no errors or warnings. However if we hover over profiles we see that this property is in fact deprecated. So the correct behavior for the editor would be to show a warning for this.

@martinlippert
Copy link
Member

I added this to the list of things to fix for the upcoming 4.10.1 release, so it would be great if you could take a look here, @kdvolder .

@kdvolder
Copy link
Member Author

Taking a look at this now.

@martinlippert martinlippert modified the milestones: 4.10.1.RELEASE, 4.11.0.RELEASE Apr 25, 2021
kdvolder added a commit that referenced this issue May 4, 2021
@kdvolder
Copy link
Member Author

kdvolder commented May 4, 2021

The cause of this was corner case' in the reconciler around handling when a metadata for a property like:

  • 'spring.profiles' exists
  • and at the same time also properties that 'extend' that property prefix further into sub-properties like 'spring.profiles.activate-on'.

That case just wasn't being handled (reconciler detects it but just bails on it).

After adding some extra checks to disambiguate this situation and handle it properly, it seems to work fine now.

@kdvolder kdvolder closed this as completed May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants