chore(deps): update releases-docker.jfrog.io/jfrog/artifactory-oss docker tag to v7.98.9#1933
Conversation
3db6b50 to
3b785f7
Compare
3b785f7 to
ceae15c
Compare
ceae15c to
5643b1f
Compare
7677b17 to
37380a2
Compare
37380a2 to
8f198f0
Compare
359c5ab to
8cf4633
Compare
📝 WalkthroughWalkthroughWires embedded PostgreSQL into embedded-artifactory: adds dependency and BOM entry, sources network alias from properties, injects PostgreSQLContainer and properties into Artifactory bootstrap (shared Network, generated system.yaml), updates default Artifactory image to 7.98.9, and adds tests and metadata. ChangesPostgreSQL Integration for Embedded Artifactory
Sequence Diagram(s)sequenceDiagram
participant Bootstrap as EmbeddedArtifactoryBootstrapConfiguration
participant PG as PostgreSQLContainer
participant AF as ArtifactoryContainer
participant Env as ConfigurableEnvironment
participant Net as Network
Bootstrap->>PG: receive injected PostgreSQLContainer & PostgreSQLProperties
Bootstrap->>Bootstrap: build JDBC URL using properties.networkAlias + database
Bootstrap->>Bootstrap: render system.yaml (url, username, password)
Bootstrap->>AF: attach AF to injected Network (Net)
Bootstrap->>AF: copy generated system.yaml into container
Bootstrap->>AF: apply artifactoryWaitStrategy (.waitingFor)
Bootstrap->>Env: register Artifactory host/ports/credentials (MapPropertySource)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
embedded-artifactory/README.adoc (1)
17-37: ⚡ Quick winDocument the new
embedded.artifactory.postgresql.*configuration.This PR introduces
PostgreSQLProperties(embedded.artifactory.postgresql.user|password|database|initScriptPath|dockerImage|...) which is part of the consumer-facing surface but isn't reflected anywhere in the README. Please add a "Consumes" subsection describing the new keys and their defaults so users know they exist and can override the postgres image/credentials/init script.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@embedded-artifactory/README.adoc` around lines 17 - 37, Add a "Consumes" subsection to the README documenting the new PostgreSQLProperties consumer-facing keys introduced for embedded.artifactory.postgresql (include keys: embedded.artifactory.postgresql.user, embedded.artifactory.postgresql.password, embedded.artifactory.postgresql.database, embedded.artifactory.postgresql.initScriptPath, embedded.artifactory.postgresql.dockerImage and any other properties on PostgreSQLProperties) and list their defaults (e.g., default user, password, database name, default init script path if none, and default docker image), mention that these can be overridden by users, and reference the PostgreSQLProperties class name and the embedded.artifactory.postgresql prefix so readers can locate the implementation.embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/PostgreSQLProperties.java (1)
12-21: ⚡ Quick winField-visibility / dead-config nits.
A couple of small things worth tightening before merge:
BEAN_NAME_EMBEDDED_POSTGRESQLis declared but not used anywhere in the bootstrap config (the postgres container isn't even exposed as a Spring bean). Either expose the container as a bean using this constant, or drop the constant.startupLogCheckRegexis declared but never consumed inEmbeddedArtifactoryBootstrapConfiguration(noWait.forLogMessage(...)is wired). Either honor it in the bootstrap (recommended) or remove it to avoid misleading config.- Lombok
@Dataalready generates getters; consider matchingArtifactoryPropertiesstyle and accessing viagetUser()/getPassword()/... in the bootstrap.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/PostgreSQLProperties.java` around lines 12 - 21, Remove or expose BEAN_NAME_EMBEDDED_POSTGRESQL and either wire or remove startupLogCheckRegex: in EmbeddedArtifactoryBootstrapConfiguration either register the Postgres container as a Spring bean using the BEAN_NAME_EMBEDDED_POSTGRESQL constant or delete the unused constant, and if you intend to support startupLogCheckRegex, pass properties.getStartupLogCheckRegex() into the container wait strategy (e.g., Wait.forLogMessage(...)) when creating/configuring the Postgres container; also update usages in the bootstrap to call the Lombok-generated getters (getUser(), getPassword(), getDatabase(), getInitScriptPath()) on PostgreSQLProperties instead of accessing fields directly to match ArtifactoryProperties style.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@embedded-artifactory/pom.xml`:
- Around line 26-29: The pom has the wrong artifactId for Testcontainers
Postgres; update the dependency block used for Testcontainers (groupId
org.testcontainers) to use artifactId "testcontainers-postgresql" instead of
"postgresql" (i.e., change the dependency entry referenced in your POM so the
dependency for Testcontainers Postgres is
org.testcontainers:testcontainers-postgresql to match the BOM/parent).
In
`@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java`:
- Around line 22-26: Remove the duplicate import of ToxiproxyContainer: keep the
correct import org.testcontainers.toxiproxy.ToxiproxyContainer and delete the
unused/conflicting import org.testcontainers.containers.ToxiproxyContainer so
the class name isn’t imported twice and the file will compile.
- Around line 79-91: Replace the inline, raw-typed Postgres container with a
managed bean and fix aliasing/initialization: instantiate PostgreSQLContainer<?>
(not raw type), assign a Postgres-specific network alias (instead of using
Artifactory aliases and remove the duplicate withNetworkAliases call) so
Artifactory can resolve it, only call withInitScript(...) when
postgresqlProperties.getInitScriptPath() is non-null, use the Lombok getters
(e.g. getInitScriptPath()) consistently, avoid hard-coding Network.SHARED
(respect the optional network: use network.ifPresent(...) or a clear default)
and expose the container as a Spring bean (use
PostgreSQLProperties.BEAN_NAME_EMBEDDED_POSTGRESQL) with destroyMethod="stop" so
Spring manages lifecycle; keep calling configureCommonsAndStart(postgresql,
postgresqlProperties, log) after these fixes.
- Around line 97-102: Replace the lowercase env names with Artifactory 7.x DB
env vars and use the PostgreSQL container network alias instead of localhost:
change the withEnv calls currently using
"username"/"password"/"url"/"type"/"driver" to "JF_SHARED_DATABASE_USERNAME",
"JF_SHARED_DATABASE_PASSWORD", "JF_SHARED_DATABASE_URL",
"JF_SHARED_DATABASE_TYPE", "JF_SHARED_DATABASE_DRIVER" and build the URL using
the new POSTGRESQL_NETWORK_ALIAS constant (e.g., "jdbc:postgresql://" +
POSTGRESQL_NETWORK_ALIAS + ":5432/" + postgresqlProperties.database) rather than
"localhost"; add a class-level constant POSTGRESQL_NETWORK_ALIAS (near
ARTIFACTORY_NETWORK_ALIAS) with the suggested value
"postgresql.testcontainer.docker" and leave the rest of the block
(postgresqlProperties.user/password/database, artifactoryWaitStrategy)
unchanged.
---
Nitpick comments:
In `@embedded-artifactory/README.adoc`:
- Around line 17-37: Add a "Consumes" subsection to the README documenting the
new PostgreSQLProperties consumer-facing keys introduced for
embedded.artifactory.postgresql (include keys:
embedded.artifactory.postgresql.user, embedded.artifactory.postgresql.password,
embedded.artifactory.postgresql.database,
embedded.artifactory.postgresql.initScriptPath,
embedded.artifactory.postgresql.dockerImage and any other properties on
PostgreSQLProperties) and list their defaults (e.g., default user, password,
database name, default init script path if none, and default docker image),
mention that these can be overridden by users, and reference the
PostgreSQLProperties class name and the embedded.artifactory.postgresql prefix
so readers can locate the implementation.
In
`@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/PostgreSQLProperties.java`:
- Around line 12-21: Remove or expose BEAN_NAME_EMBEDDED_POSTGRESQL and either
wire or remove startupLogCheckRegex: in
EmbeddedArtifactoryBootstrapConfiguration either register the Postgres container
as a Spring bean using the BEAN_NAME_EMBEDDED_POSTGRESQL constant or delete the
unused constant, and if you intend to support startupLogCheckRegex, pass
properties.getStartupLogCheckRegex() into the container wait strategy (e.g.,
Wait.forLogMessage(...)) when creating/configuring the Postgres container; also
update usages in the bootstrap to call the Lombok-generated getters (getUser(),
getPassword(), getDatabase(), getInitScriptPath()) on PostgreSQLProperties
instead of accessing fields directly to match ArtifactoryProperties style.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 12691fb1-44fc-44ec-9ed5-ed9b9c48703e
📒 Files selected for processing (5)
embedded-artifactory/README.adocembedded-artifactory/pom.xmlembedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/ArtifactoryProperties.javaembedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.javaembedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/PostgreSQLProperties.java
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java (1)
85-92: 💤 Low valueUse a parameterized
PostgreSQLContainer<?>instead of the raw type.
PostgreSQLContaineris generic (PostgreSQLContainer<SELF extends PostgreSQLContainer<SELF>>); declaring it as a raw type at the bean parameter (line 87) and at the helper signature (line 112) generates unchecked warnings and is inconsistent with the rest of the codebase that usesGenericContainer<?>.♻️ Proposed refactor
public GenericContainer<?> artifactory(ConfigurableEnvironment environment, ArtifactoryProperties properties, - PostgreSQLContainer postgreSQLContainer, + PostgreSQLContainer<?> postgreSQLContainer, PostgreSQLProperties postgresqlProperties, WaitStrategy artifactoryWaitStrategy, Network network) { @@ private static `@NonNull` String getSystemYaml(PostgreSQLProperties postgresqlProperties, - PostgreSQLContainer postgreSQLContainer) { + PostgreSQLContainer<?> postgreSQLContainer) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java` around lines 85 - 92, The artifactory bean and its helper getSystemYaml currently accept a raw PostgreSQLContainer which causes unchecked warnings; update the method parameter in artifactory (symbol: artifactory) and the helper signature (symbol: getSystemYaml) to use the parameterized type PostgreSQLContainer<?> instead of the raw PostgreSQLContainer, and adjust any corresponding local variable declarations/signatures that reference the raw type to use PostgreSQLContainer<?> so the code is consistent with GenericContainer<?> usage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java`:
- Around line 111-125: getSystemYaml is building a JDBC URL using
postgreSQLContainer.getNetwork(), which returns a Network object not a hostname;
replace that with the container's network alias/host (e.g., use the configured
network alias from the PostgreSQLContainer instance) so the URL becomes
jdbc:postgresql://<networkAlias>:<port>/<database>; ensure the
PostgreSQLContainer is configured with .withNetworkAliases(...) (verify in
EmbeddedPostgreSQLBootstrapConfiguration) and use
postgreSQLContainer.getContainerInfo()/getNetworkSettings() or the stored alias
value instead of postgreSQLContainer.getNetwork() when composing the jdbcUrl
inside getSystemYaml.
---
Nitpick comments:
In
`@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java`:
- Around line 85-92: The artifactory bean and its helper getSystemYaml currently
accept a raw PostgreSQLContainer which causes unchecked warnings; update the
method parameter in artifactory (symbol: artifactory) and the helper signature
(symbol: getSystemYaml) to use the parameterized type PostgreSQLContainer<?>
instead of the raw PostgreSQLContainer, and adjust any corresponding local
variable declarations/signatures that reference the raw type to use
PostgreSQLContainer<?> so the code is consistent with GenericContainer<?> usage.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 91efd709-6993-4795-aff8-1b615cb498e4
📒 Files selected for processing (6)
embedded-artifactory/README.adocembedded-artifactory/pom.xmlembedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/ArtifactoryProperties.javaembedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.javaembedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.javatestcontainers-spring-boot-parent/pom.xml
✅ Files skipped from review due to trivial changes (4)
- testcontainers-spring-boot-parent/pom.xml
- embedded-artifactory/README.adoc
- embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/ArtifactoryProperties.java
- embedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.java
🚧 Files skipped from review as they are similar to previous changes (1)
- embedded-artifactory/pom.xml
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java (2)
87-87: ⚡ Quick winUse parameterized type for PostgreSQLContainer parameter.
The
PostgreSQLContainerparameter uses a raw type. UsePostgreSQLContainer<?>for type safety.♻️ Proposed fix
public GenericContainer<?> artifactory(ConfigurableEnvironment environment, ArtifactoryProperties properties, - PostgreSQLContainer postgreSQLContainer, + PostgreSQLContainer<?> postgreSQLContainer, PostgreSQLProperties postgresqlProperties, WaitStrategy artifactoryWaitStrategy, Network network) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java` at line 87, Change the raw PostgreSQLContainer parameter to a parameterized type for type safety: in EmbeddedArtifactoryBootstrapConfiguration update the constructor/method signature that accepts postgreSQLContainer to use PostgreSQLContainer<?> instead of the raw PostgreSQLContainer; adjust any matching parameter references (postgreSQLContainer) and imports if needed so the code compiles with the generic type.
111-112: ⚡ Quick winUse parameterized type for PostgreSQLContainer parameter.
The
PostgreSQLContainerparameter uses a raw type. UsePostgreSQLContainer<?>for consistency and type safety.♻️ Proposed fix
- static `@NonNull` String getSystemYaml(PostgreSQLProperties postgresqlProperties, - PostgreSQLContainer postgreSQLContainer) { + static `@NonNull` String getSystemYaml(PostgreSQLProperties postgresqlProperties, + PostgreSQLContainer<?> postgreSQLContainer) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java` around lines 111 - 112, The method signature for getSystemYaml uses a raw PostgreSQLContainer type; update the parameter declaration to use the parameterized type PostgreSQLContainer<?> for postgreSQLContainer to restore type safety and consistency with PostgreSQLProperties; adjust any callers or generics if necessary and ensure imports remain unchanged.embedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.java (1)
59-64: ⚡ Quick winUse parameterized type for PostgreSQLContainer.
The
PostgreSQLContaineris used as a raw type. For type safety and consistency with modern Java practices, usePostgreSQLContainer<?>instead.♻️ Proposed fix
`@Bean`(name = BEAN_NAME_EMBEDDED_POSTGRESQL, destroyMethod = "stop") - public PostgreSQLContainer postgresql(ConfigurableEnvironment environment, + public PostgreSQLContainer<?> postgresql(ConfigurableEnvironment environment, PostgreSQLProperties properties, Optional<Network> network) { - PostgreSQLContainer postgresql = - new PostgreSQLContainer(ContainerUtils.getDockerImageName(properties)) + PostgreSQLContainer<?> postgresql = + new PostgreSQLContainer<>(ContainerUtils.getDockerImageName(properties)) .withUsername(properties.getUser()) .withPassword(properties.getPassword()) .withDatabaseName(properties.getDatabase())Also update line 80:
- postgresql = (PostgreSQLContainer) configureCommonsAndStart(postgresql, properties, log); + postgresql = (PostgreSQLContainer<?>) configureCommonsAndStart(postgresql, properties, log);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@embedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.java` around lines 59 - 64, The method postgresql uses the raw type PostgreSQLContainer; change its declaration and any variable declarations to use the parameterized form PostgreSQLContainer<?> for type safety (update the returned variable named postgresql and its instantiation where new PostgreSQLContainer(...) is called, and also adjust any later references/assignments that assume the raw type such as the subsequent configuration calls on the postgresql variable). Ensure imports remain the same and compile after replacing raw PostgreSQLContainer with PostgreSQLContainer<?> throughout the method.embedded-artifactory/src/test/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfigurationSystemYamlTest.java (1)
17-17: ⚡ Quick winUse parameterized type for PostgreSQLContainer.
The test uses a raw type
PostgreSQLContainer. UsePostgreSQLContainer<?>for type safety and consistency with the main code.♻️ Proposed fix
- PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer("postgres:18-alpine") + PostgreSQLContainer<?> postgreSQLContainer = new PostgreSQLContainer<>("postgres:18-alpine") .withNetworkAliases("postgresql.internal") .withUsername("artifactory") .withPassword("secret");🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@embedded-artifactory/src/test/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfigurationSystemYamlTest.java` at line 17, The test declares a raw PostgreSQLContainer instance; update the declaration to use the parameterized type PostgreSQLContainer<?> for type safety and consistency with production code—locate the variable creation of PostgreSQLContainer in EmbeddedArtifactoryBootstrapConfigurationSystemYamlTest (the line creating new PostgreSQLContainer("postgres:18-alpine")) and change its type to PostgreSQLContainer<?>; no other logic changes needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java`:
- Line 100: Replace the hardcoded octal literal and tighten file permissions for
the Transferable creation: in the call
Transferable.of(systemYaml.getBytes(StandardCharsets.UTF_8), 0666) change the
permission argument to a Java-friendly literal (e.g., 0o600 or decimal 384) and
use restrictive permissions (0600) instead of 0666 so the config with
credentials is owner-readable/writable only; update the argument where
Transferable.of(...) is invoked and ensure you use the systemYaml symbol and
StandardCharsets reference already present.
---
Nitpick comments:
In
`@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java`:
- Line 87: Change the raw PostgreSQLContainer parameter to a parameterized type
for type safety: in EmbeddedArtifactoryBootstrapConfiguration update the
constructor/method signature that accepts postgreSQLContainer to use
PostgreSQLContainer<?> instead of the raw PostgreSQLContainer; adjust any
matching parameter references (postgreSQLContainer) and imports if needed so the
code compiles with the generic type.
- Around line 111-112: The method signature for getSystemYaml uses a raw
PostgreSQLContainer type; update the parameter declaration to use the
parameterized type PostgreSQLContainer<?> for postgreSQLContainer to restore
type safety and consistency with PostgreSQLProperties; adjust any callers or
generics if necessary and ensure imports remain unchanged.
In
`@embedded-artifactory/src/test/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfigurationSystemYamlTest.java`:
- Line 17: The test declares a raw PostgreSQLContainer instance; update the
declaration to use the parameterized type PostgreSQLContainer<?> for type safety
and consistency with production code—locate the variable creation of
PostgreSQLContainer in EmbeddedArtifactoryBootstrapConfigurationSystemYamlTest
(the line creating new PostgreSQLContainer("postgres:18-alpine")) and change its
type to PostgreSQLContainer<?>; no other logic changes needed.
In
`@embedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.java`:
- Around line 59-64: The method postgresql uses the raw type
PostgreSQLContainer; change its declaration and any variable declarations to use
the parameterized form PostgreSQLContainer<?> for type safety (update the
returned variable named postgresql and its instantiation where new
PostgreSQLContainer(...) is called, and also adjust any later
references/assignments that assume the raw type such as the subsequent
configuration calls on the postgresql variable). Ensure imports remain the same
and compile after replacing raw PostgreSQLContainer with PostgreSQLContainer<?>
throughout the method.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d74db867-2ef9-4323-92d9-3d29995b4476
📒 Files selected for processing (8)
embedded-artifactory/README.adocembedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.javaembedded-artifactory/src/test/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfigurationSystemYamlTest.javaembedded-artifactory/src/test/resources/bootstrap.propertiesembedded-postgresql/README.adocembedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.javaembedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/PostgreSQLProperties.javaembedded-postgresql/src/main/resources/META-INF/additional-spring-configuration-metadata.json
✅ Files skipped from review due to trivial changes (5)
- embedded-postgresql/src/main/resources/META-INF/additional-spring-configuration-metadata.json
- embedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/PostgreSQLProperties.java
- embedded-postgresql/README.adoc
- embedded-artifactory/src/test/resources/bootstrap.properties
- embedded-artifactory/README.adoc
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1933 +/- ##
=============================================
+ Coverage 82.51% 82.56% +0.04%
- Complexity 693 695 +2
=============================================
Files 205 205
Lines 3145 3154 +9
Branches 146 146
=============================================
+ Hits 2595 2604 +9
Misses 482 482
Partials 68 68 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…cker tag to v7.98.9 | datasource | package | from | to | | ---------- | ---------------------------------------------- | ------- | ------ | | docker | releases-docker.jfrog.io/jfrog/artifactory-oss | 7.77.12 | 7.98.9 |
- Replace direct PostgreSQL container with embedded-postgresql dependency - Remove PostgreSQLProperties class in favor of shared module - Add system.yaml configuration for database connection - Increase default wait timeout from 120 to 300 seconds - Update README with PostgreSQL configuration options
a3dc09a to
8c1fcba
Compare
- Add `embedded.postgresql.networkAlias` property (default: 'postgresql.testcontainer.docker') - Use configured network alias in Artifactory system.yaml JDBC URL - Add test to verify network alias configuration in system.yaml - Update README documentation with new property
8c1fcba to
1060b5a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java (2)
111-112: ⚡ Quick winUse parameterized type
PostgreSQLContainer<?>for type safety.The parameter uses the raw type
PostgreSQLContainer. UsePostgreSQLContainer<?>to maintain generic type safety, consistent with the recommendation for line 87.♻️ Proposed fix
- static `@NonNull` String getSystemYaml(PostgreSQLProperties postgresqlProperties, - PostgreSQLContainer postgreSQLContainer) { + static `@NonNull` String getSystemYaml(PostgreSQLProperties postgresqlProperties, + PostgreSQLContainer<?> postgreSQLContainer) { String jdbcUrl = "jdbc:postgresql://%s:%d/%s"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java` around lines 111 - 112, Change the raw PostgreSQLContainer parameter to a parameterized type in the getSystemYaml method signature: update the second parameter from PostgreSQLContainer postgreSQLContainer to PostgreSQLContainer<?> postgreSQLContainer to restore generic type safety; modify any related declarations or usages of postgreSQLContainer within getSystemYaml accordingly to preserve compilation.
87-87: ⚡ Quick winUse parameterized type
PostgreSQLContainer<?>instead of raw type.The parameter uses the raw type
PostgreSQLContainer, which bypasses generic type safety. UsePostgreSQLContainer<?>to maintain type safety.♻️ Proposed fix
public GenericContainer<?> artifactory(ConfigurableEnvironment environment, ArtifactoryProperties properties, - PostgreSQLContainer postgreSQLContainer, + PostgreSQLContainer<?> postgreSQLContainer, PostgreSQLProperties postgresqlProperties, WaitStrategy artifactoryWaitStrategy, Network network) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java` at line 87, The constructor/method in EmbeddedArtifactoryBootstrapConfiguration is using the raw type PostgreSQLContainer for the parameter postgreSQLContainer; change its signature to use the parameterized type PostgreSQLContainer<?> to restore generic type safety (update any related variable declarations and method signatures that reference postgreSQLContainer to the same <?> wildcard as needed).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/ArtifactoryProperties.java`:
- Line 30: The default image version returned in ArtifactoryProperties (the
string "releases-docker.jfrog.io/jfrog/artifactory-oss:7.98.9") does not match
the PR title (v7.84.14); update the value returned by the method in class
ArtifactoryProperties to the intended version (e.g., change the tag to
":7.84.14") or correct the PR title/description so both match, ensuring the
unique literal in ArtifactoryProperties is the single source of truth.
---
Nitpick comments:
In
`@embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java`:
- Around line 111-112: Change the raw PostgreSQLContainer parameter to a
parameterized type in the getSystemYaml method signature: update the second
parameter from PostgreSQLContainer postgreSQLContainer to PostgreSQLContainer<?>
postgreSQLContainer to restore generic type safety; modify any related
declarations or usages of postgreSQLContainer within getSystemYaml accordingly
to preserve compilation.
- Line 87: The constructor/method in EmbeddedArtifactoryBootstrapConfiguration
is using the raw type PostgreSQLContainer for the parameter postgreSQLContainer;
change its signature to use the parameterized type PostgreSQLContainer<?> to
restore generic type safety (update any related variable declarations and method
signatures that reference postgreSQLContainer to the same <?> wildcard as
needed).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 837d4d59-a192-40fb-a645-15ae14200134
📒 Files selected for processing (11)
embedded-artifactory/README.adocembedded-artifactory/pom.xmlembedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/ArtifactoryProperties.javaembedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.javaembedded-artifactory/src/test/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfigurationSystemYamlTest.javaembedded-artifactory/src/test/resources/bootstrap.propertiesembedded-postgresql/README.adocembedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.javaembedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/PostgreSQLProperties.javaembedded-postgresql/src/main/resources/META-INF/additional-spring-configuration-metadata.jsontestcontainers-spring-boot-parent/pom.xml
✅ Files skipped from review due to trivial changes (4)
- embedded-postgresql/README.adoc
- embedded-artifactory/README.adoc
- testcontainers-spring-boot-parent/pom.xml
- embedded-artifactory/src/test/resources/bootstrap.properties
🚧 Files skipped from review as they are similar to previous changes (5)
- embedded-postgresql/src/main/resources/META-INF/additional-spring-configuration-metadata.json
- embedded-artifactory/pom.xml
- embedded-artifactory/src/test/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfigurationSystemYamlTest.java
- embedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/PostgreSQLProperties.java
- embedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.java
This PR contains the following updates:
7.77.12->v7.98.9Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.
Summary by CodeRabbit
New Features
Updates
Documentation
Tests