-
Notifications
You must be signed in to change notification settings - Fork 224
Supporting placement and scheduler custom images #1450
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
Merged
cicoyle
merged 9 commits into
dapr:master
from
salaboy:1449-placement-scheduler-custom-img
Jul 15, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0f13cec
supporting placement and scheduler custom images
salaboy 3fd4b1e
Bump org.apache.commons:commons-lang3 from 3.9 to 3.18.0 (#1446)
dependabot[bot] 722a7c5
Update dapr docs for Hugo upgrade (#1443)
marcduiker 31e9c29
Adds note about workflow start time (#1444)
JoshVanL e94efdd
adding test to validate canonical names with substitutes
salaboy ee3babb
Migrate PubSub removing flaky test (#1407)
mcruzdev 9257432
adding tests for coverage
salaboy 8940a6a
Merge branch 'master' into 1449-placement-scheduler-custom-img
salaboy 5d63bee
Merge branch 'master' into 1449-placement-scheduler-custom-img
cicoyle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
testcontainers-dapr/src/test/java/io/dapr/testcontainers/DaprContainerTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package io.dapr.testcontainers; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.testcontainers.utility.DockerImageName; | ||
|
||
import static io.dapr.testcontainers.DaprContainerConstants.DAPR_RUNTIME_IMAGE_TAG; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class DaprContainerTest { | ||
|
||
@Test | ||
public void schedulerAndPlacementCustomImagesTest() { | ||
|
||
DaprContainer dapr = new DaprContainer(DAPR_RUNTIME_IMAGE_TAG) | ||
.withAppName("dapr-app") | ||
.withSchedulerImage(DockerImageName.parse("custom/scheduler:1.15.4") | ||
.asCompatibleSubstituteFor("daprio/scheduler:1.15.4")) | ||
.withPlacementImage(DockerImageName.parse("custom/placement:1.15.4") | ||
.asCompatibleSubstituteFor("daprio/placement:1.15.4")) | ||
.withAppPort(8081) | ||
.withDaprLogLevel(DaprLogLevel.DEBUG) | ||
.withAppChannelAddress("host.testcontainers.internal"); | ||
|
||
|
||
assertEquals("custom/placement:1.15.4", dapr.getPlacementDockerImageName().asCanonicalNameString()); | ||
assertEquals("custom/scheduler:1.15.4", dapr.getSchedulerDockerImageName().asCanonicalNameString()); | ||
|
||
} | ||
|
||
@Test | ||
public void schedulerAndPlacementCustomImagesStringTest() { | ||
|
||
DaprContainer dapr = new DaprContainer(DAPR_RUNTIME_IMAGE_TAG) | ||
.withAppName("dapr-app") | ||
.withSchedulerImage("daprio/scheduler:1.15.4") | ||
.withPlacementImage("daprio/placement:1.15.4") | ||
.withAppPort(8081) | ||
.withDaprLogLevel(DaprLogLevel.DEBUG) | ||
.withAppChannelAddress("host.testcontainers.internal"); | ||
|
||
|
||
assertEquals("daprio/placement:1.15.4", dapr.getPlacementDockerImageName().asCanonicalNameString()); | ||
assertEquals("daprio/scheduler:1.15.4", dapr.getSchedulerDockerImageName().asCanonicalNameString()); | ||
|
||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there a reason for changing away from the
String
type?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cicoyle yes, this is needed to be able to provide compatible image names. By using the DockerImageName class we now support flexible image names, that are compatible with the default one that we provide.