spring-cloud / spring-cloud/spring-cloud-commons
Conflict between org.springframework.cloud:spring-cloud-starter-bootstrap and org.springframework.boot:spring-boot-docker-compose
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 751
- Forks
- 744
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
After adding spring-cloud-starter-bootstrap to my project, spring-boot-docker-compose is unable to locate docker compose file anymore.
I have added an minimal reproducible example project with two commits. First commit is an working example while the second commit leads to the mentioned problem. Just start the application.
https://github.com/Fachher/spring-cloud-issue
What I have found out so far.
org.springframework.boot.docker.compose.lifecycle.DockerComposeListener is executed before org.springframework.boot.env.EnvironmentPostProcessorApplicationListener after adding 'spring-cloud-starter-bootstrap'.
Therefore org.springframework.boot.docker.compose.lifecycle.DockerComposeProperties is uninitialized during the execution of DockerComposeListener.
If a custom value is set for spring.docker.compose.file in application.yml it is ignored.
If I provide the location of the docker compose file via environment variable (SPRING_DOCKER_COMPOSE_FILE=foo/bar/docker-compose.yml), it is working properly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal reproducible project linked in the issue and run the application using its two commits to reproduce the difference. Read DockerComposeListener, DockerComposeProperties, and EnvironmentPostProcessorApplicationListener; done means spring.docker.compose.file from application.yml is honored when spring-cloud-starter-bootstrap is present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, java, spring-boot
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100