Skip to content

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

Closed

Description

@kdvolder

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.

Activity

  1. added this to the milestone on Mar 23, 2021
  2. martinlippert commented on Mar 23, 2021

    @martinlippert
    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 .

  3. kdvolder commented on Mar 29, 2021

    @kdvolder
    MemberAuthor

    Taking a look at this now.

  4. modified the milestones: , 4.11.0.RELEASE on Apr 25, 2021
  5. added a commit that references this issue on May 4, 2021
  6. kdvolder commented on May 4, 2021

    @kdvolder
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions