Apply Changes fails when upgrading to Spring Cloud Services (SCS) version 3.2.x and causes apps to crash:
# From Apply Changes:
Running "/usr/local/bin/bosh --no-color --non-interactive --tty --environment=xx.xx.xx.xx --deployment=p_spring-cloud-services-abcdefghijk1234f67a run-errand upgrade-all-instances --instance spring-cloud-services/first":
Errand 'upgrade-all-instances' completed with error (exit code 1)
Exit code 1
Stderr Error: failed to run job-process: exit status 1 (exit status 1)
# From SCS config-server logs:
Caused by: org.springframework.boot.context.config.InvalidConfigDataPropertyException: Property 'spring.profiles' imported from location ...
is invalid and should be replaced with 'spring.config.activate.on-profile'
If the Sring/SCS version used to create/edit apps is < v3.2.x and the user trys to run said apps in SCS v3.2.x then face the below problem.
spring:
profiles:
PROFILENAME
Update the configuration on the affected config-server as described below and re-run the above mentioned 'upgrade-all-instances' errand:
1. Update the YAML configuration in the config server repository by removing the following:
spring:
profiles:
PROFILENAME
2. If using Spring Boot version 2.4 or higher, add:
spring:
config:
activate:
on-profile: PROFILENAME
3. If using a version lower than 2.4, rename the config file:
# from:
configfilename.yaml
# to:
configfilename-PROFILENAME.yaml