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

Spring cloud config server does not return properties after upgrade to 2.4.2 spring boot #30775

Closed
kboczek opened this issue Apr 22, 2022 · 2 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@kboczek
Copy link

kboczek commented Apr 22, 2022

Environment:

Spring Boot: 2.4.2
Spring Cloud: 2020.0.0

Spring cloud config server configuration for service configuration repository

spring:
  cloud:
    config:
      server:
        git:
          repos:
            service:
              uri: ssh://${git.url}/service-config.git/

Repository service-config.git has following structure of files on master branch:

application.yml
service-alfa.yml
service-beta.yml

Using spring boot 2.4.1 config service returns properties using following url: https://${configServiceUrl}/service/alfa

{
  "name": "service",
  "profiles": [
    "alfa"
  ],
  "label": null,
  "state": null,
  "propertySources": [
    {
      "name": "ssh://git.url/service_config.git//service-alfa.yml",
      "source": {
        "property": "value"
      }
    },
    {
      "name": "ssh://git.url/service_config.git//application.yml",
      "source": {
        "pro": "val"
      }
    }
  ]
}

but after upgrade to 2.4.2 spring cloud config service does not return properties and no exception is thrown like:

{
  "name": "service",
  "profiles": [
    "alfa"
  ],
  "label": null,
  "state": null,
  "propertySources": []
}

Based on release notes I can see that this change #24504 could introduce such behaviour.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 22, 2022
@snicoll
Copy link
Member

snicoll commented Apr 23, 2022

@kboczek Spring Boot 2.4.x is out of OSS support so please upgrade first to a supported version. If you can still experience the problem at that point, we'll need a bit more detail to investigate.

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label Apr 23, 2022
@kboczek
Copy link
Author

kboczek commented Apr 23, 2022

Thank you @snicoll for the reply. I forgot to mention that at first I upgraded to the latest spring boot version 2.6.7 with latest spring cloud 2021.0.1 and then start to downgrade version by version to see from which version this behaviour was introduced. In the meantime I found the solution. I have removed spring.profiles.active=alfa property from service-alfa.yml and then config service start to serve properties the same as with spring boot 2.4.1 version. I found that it is related to https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-Config-Data-Migration-Guide. Im closing the issue and sorry for bothering you

@kboczek kboczek closed this as completed Apr 23, 2022
@scottfrederick scottfrederick added status: invalid An issue that we don't feel is valid and removed status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

4 participants