Commit Graph

46 Commits (921691284db95dd67ab9190879390cf601e05238)

Author SHA1 Message Date
Andy Wilkinson 3ef1738a5e Remove containers after use in Docker Compose integration tests
Closes gh-36104
1 year ago
Andy Wilkinson 660dbb9afd Fix Maven-built native images with Docker Compose dependency
Previously, we tried to prevent spring-boot-docker-compose from
causing problems with AOT and native images by excluding it from
the AOT processing classpath. This allowed AOT processing to
succeed. We cannot apply the same exclusion to the native image
classpath so spring-boot-docker-compose was still included in the
native image. This results in a failure at runtime due to missing
reflection hints.

This commit reverts that changes that excluded
spring-boot-docker-compose from the AOT processing classpath. This
allows AOT processing to generate reflection hints but reintroduces
the failure caused by the connection details bean definitions using
an instance supplier callback. To overcome this problem we disable
DockerComposeLifecycleManager during AOT processing and in a native
image. This ensures that no attempt is made to call docker compose up
and no connection details beans are defined.

Fixes gh-35676
1 year ago
Scott Frederick 8f31a5772e Set authSource in MongoDB Docker Compose connection details
When authentication credentials are provided in environment variables
for the official MongoDB Docker image, the authentication source must
also be set to the `admin` database.

Fixes gh-35777
1 year ago
Moritz Halbritter 157b71b333 Add missing defaults for docker compose properties
Closes gh-35598
2 years ago
Scott Frederick 0ca3ab7249 Polish Javadoc
See gh-35545
2 years ago
Andy Wilkinson 6ad71c9b0c Reduce number of CLI calls to improve startup time with devtools
Update `DockerComposeLifecycleManager` so that `docker ps` is
not called multiple times.

See gh-35435
2 years ago
Phillip Webb b0c76c1f79 Cache docker commands to improve startup time with devtools
Update `DockerCli` so that the docker commands are cached. This helps
improve startup time when using devtools with docker compose.

See gh-35435
2 years ago
Phillip Webb a8602a1814 Allow docker compose service readiness checks to be bypassed
Add `spring.docker.compose.readiness.wait` property that can be used to
determine how Spring Boot should wait for docker compose services to
become ready.

Fixes gh-35545
2 years ago
Phillip Webb 6b0b6ccf49 Move docker compose readiness code and make it package-private
The `ReadinessCheck` interface has been removed making the dedicated
package less necessary. By relocating the code we can make more of it
pacakge-private.

See gh-35544
2 years ago
Phillip Webb 060581d078 Remove pluggable docker compose ReadinessCheck
Remove pluggable `ReadinessCheck` interface and only use the
`TcpConnectServiceReadinessCheck` implementation for now. We
may re-introduce pluggable checks in a future version.

See gh-35544
2 years ago
Andy Wilkinson 3d41e41b94 Polish
Make logger a static field.
2 years ago
Johnny Lim 54f85b1181 Fix since version for ImageReference
See gh-35459
2 years ago
Phillip Webb ae90add7c7 Polish 2 years ago
Scott Frederick 8377306668 Improve error when Docker Compose file not found
Fixes gh-35383
2 years ago
Moritz Halbritter 441ed30ee4 Polish "Replace Mockito argument captors with assertArg"
Co-authored-by: Andy Wilkinson <wilkinsona@vmware.com>

See gh-35015
2 years ago
Andy Wilkinson 4f9616c2f9 Change DockerComposeProperties shut down default to stop
Closes gh-35239
2 years ago
Andy Wilkinson 6a39b497ad Make Oracle Docker Compose integration tests more robust
Closes gh-35285
2 years ago
Phillip Webb a890323758 Merge branch '3.0.x' 2 years ago
Moritz Halbritter 9a545727b9 Disable SQL server and Oracle database compose tests on ARM
See gh-35229
2 years ago
Andy Wilkinson 8fe20c5d63 Derive LiquibaseConnectionDetails from JdbcConnectionDetails
Closes gh-35141
2 years ago
Andy Wilkinson d293df6617 Derive FlywayConnectionDetails from JdbcConnectionDetails
Rather than implementing factories for FlywayConnectionDetails for
each supported SQL database, we instead use a factory to takes
JdbcConnectionDetails as a source and produces
FlywayConnectionDetails.

Closes gh-35138
2 years ago
Phillip Webb 403481ff96 Add 'required' parameter to ConnectionDetailsFactories
Update `ConnectionDetailsFactories` so that callers can now declare if
a result is required or not and improve exception hierarchy.

See gh-35168
2 years ago
Andy Wilkinson a75f55aaa5 Try to stabilize SQL Server tests on CI 2 years ago
Moritz Halbritter 4131e7338d Fix LogMessage format 2 years ago
Moritz Halbritter 75207db6be Polish docker compose code 2 years ago
Moritz Halbritter 8abebd75fb Use shutdownHandlers parameter in constructor 2 years ago
Andy Wilkinson cec159110d Do not block indefinitely when querying SQL database 2 years ago
Andy Wilkinson 8bbe894665 Add Docker Compose service connection support for Oracle using JDBC
Closes gh-35145
2 years ago
Andy Wilkinson 5e73047164 Align SQL Server-related class names with existing precedents
Closes gh-35181
2 years ago
Andy Wilkinson 1e785e81f8 Add Docker Compose support for Oracle Database using R2DBC
Closes gh-35143
2 years ago
Andy Wilkinson 8fd36d04e1 Improve MsSqlServerR2dbcDockerComposeConnectionDetailsFactory tests
See gh-35144
2 years ago
Andy Wilkinson b5178afa21 Add Docker Compose support for MS SQL Server using JDBC
Closes gh-35146
2 years ago
Scott Frederick e9a85b91a8 Polish 2 years ago
Scott Frederick 43b42eca49 Add Docker Compose service connection support for Cassandra
Closes gh-35136
2 years ago
Scott Frederick 2bec82ab2f Delete disabled docker compose tests 2 years ago
Andy Wilkinson fd6214e7e3 Remove accidentally committed test classes 2 years ago
Andy Wilkinson dee5217cf0 Add Docker Compose support for MS SQL Server using R2DBC
Closes gh-35144
2 years ago
Phillip Webb 0f032c290a Allow for predicate based checking of image names
Update `DockerComposeConnectionDetailsFactory` to accept a `Predicate`
based check to determine if the source should be accepted.

The existing name based checks have also been improved to allow names
outside of official docker images. The `ImageReference` and `ImageName`
classes have been mainly copied from
`org.springframework.boot.buildpack.platform.docker.type`.

Closes gh-35154
2 years ago
Andy Wilkinson b64adbc34b Fix disabled conditions on AbstractDockerComposeIntegrationTests 2 years ago
Andy Wilkinson 2bccd586ea Fix DockerComposeFileTests on Windows 2 years ago
Stephane Nicoll 8946c761ee Polish 2 years ago
Andy Wilkinson 78242cb794 Skip tests when Docker is unavailable
See gh-34747
2 years ago
Andy Wilkinson 3a01759a3b Protect tests against unstable toString ordering
See gh-34747
2 years ago
Phillip Webb 3657f73b9a Provide more verbose docker compose logging
Update `up` and `start` operations so that real-time logging is
provided. Prior to this commit, lengthy pull operations were not
logged which gave the impression that the application had
crashed.

Closes gh-34994
2 years ago
Phillip Webb efff253d35 Fallback to finding docker image name from compose ps
Earlier versions of docker do not include the image name in the inspect
output. We now fallback to using the `compose ps` response.

Closes gh-34993
2 years ago
Mortitz Halbritter 842e17eced Add Docker Compose support
Add `spring-boot-docker-compose` module with service connection
support.

Closes gh-34747

Co-authored-by: Phillip Webb <pwebb@vmware.com>
Co-authored-by: "Andy Wilkinson <wilkinsona@vmware.com>
2 years ago