With the merge of #43176 Profile names were heavily restricted. While I can understand that this change is required due to the errors of parsing mentioned in a separate issue, it was a surprise to suddenly have . be invalid in the Profile.

In trying to debug this I cross referenced the following. - Spring Boot Profiles Docs - Spring Framework Profile Mentions - Spring Boot Release Summary - The full wiki page does list the breaking change. - Even Profile Javadocs

Another developer found it was 3.5.0's changes that caused the break.

With automatic dependency updates this resulted in sudden break for a few teams. It would have been beneficial to have a version which logs a very loud warning before a breaking version. Breaking in 3.5.1 or 3.6.0 would have been fine. Additionally the profile restrictions should have been documented in at least the main documentation before the release.


TLDR : Warning Version and then a Breaking Version would have been appreciated.

Comment From: philwebb

Thanks for the feedback @Crain-32. It looks like we might have been too aggressive with this feature and it's causing more issues than we anticipated. It's especially unfortunate that there's no easy way to opt-out of profile validation.

I'm going to investigate options to see if we can improve things for 3.5.1

Comment From: philwebb

@Crain-32 @iparadiso I've just pushed a fix that I hope will address the more common characters like . that might appear in the profile names. I've also added a spring.profiles.validate property that you can set to false if you want to disable validation entirely.

I'd like to leave validation on by default since I think it's the better option for folks to adopt.

I've also push an update to the docs.

Please let me know if those updates are enough for your situations.

Comment From: Crain-32

Hey @philwebb,

Thanks for the quick turnaround! I agree that on by default is the best approach, thank you for giving us a way to disable it in case of emergencies.

The doc updates look good. With those two changes I think we are good on our end.

Comment From: iparadiso

@philwebb Excellent. Thank you for the quick turnaround and flexibility. It's jus what we need.