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

Allow comma separated list of container names in dependsOn elements #810

Merged
merged 2 commits into from
Jul 11, 2017
Merged

Allow comma separated list of container names in dependsOn elements #810

merged 2 commits into from
Jul 11, 2017

Conversation

chonton
Copy link
Contributor

@chonton chonton commented Jul 8, 2017

Description

Allow comma separated list of elements. (Similar to #558)

Info

  • Feature request: Allow something like:
<dependsOn>
   <container>mongo,identity</container>
</dependsOn>

@codecov
Copy link

codecov bot commented Jul 8, 2017

Codecov Report

Merging #810 into master will not change coverage.
The diff coverage is 0%.

@@            Coverage Diff            @@
##             master     #810   +/-   ##
=========================================
  Coverage     47.52%   47.52%           
  Complexity     1069     1069           
=========================================
  Files           134      134           
  Lines          6923     6923           
  Branches        910      910           
=========================================
  Hits           3290     3290           
  Misses         3351     3351           
  Partials        282      282
Impacted Files Coverage Δ Complexity Δ
...ain/java/io/fabric8/maven/docker/util/EnvUtil.java 62.96% <ø> (ø) 39 <0> (ø) ⬇️
...ic8/maven/docker/config/RunImageConfiguration.java 86.13% <0%> (ø) 36 <0> (ø) ⬇️
...abric8/maven/docker/config/ImageConfiguration.java 44.92% <0%> (ø) 11 <0> (ø) ⬇️

Copy link
Collaborator

@rhuss rhuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (with some minor comments).

@@ -97,7 +97,7 @@ private void addVolumes(RunImageConfiguration runConfig, List<String> ret) {

private void addLinks(RunImageConfiguration runConfig, List<String> ret) {
// Custom networks can have circular links, no need to be considered for the starting order.
if (runConfig.getLinks() != null && !runConfig.getNetworkingConfig().isCustomNetwork()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that getLinks() is never null ?

Copy link
Contributor Author

@chonton chonton Jul 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added @Nonnull annotations to show the deduction chain. EnvUtil.splitAtCommasAndTrim(Iterable<String> input) never returns null.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'm settled then ;-)

@@ -114,7 +114,7 @@ private void addContainerNetwork(RunImageConfiguration runConfig, List<String> r

private void addDependsOn(RunImageConfiguration runConfig, List<String> ret) {
// Only used in custom networks.
if (runConfig.getDependsOn() != null && runConfig.getNetworkingConfig().isCustomNetwork()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't getDependsOn() be null ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

likewise.

@rhuss rhuss merged commit e771c09 into fabric8io:master Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants