-
Notifications
You must be signed in to change notification settings - Fork 642
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
Fix #986 : Create volumes with proper configuration during "docker:start" #1007
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1007 +/- ##
============================================
+ Coverage 51.3% 51.81% +0.51%
- Complexity 1429 1441 +12
============================================
Files 150 150
Lines 7755 7775 +20
Branches 1151 1156 +5
============================================
+ Hits 3979 4029 +50
+ Misses 3384 3350 -34
- Partials 392 396 +4
|
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.
Looks good to me, except that we should move the method to the RunService (and some comments on the style, too).
Some test would be awesome, too (which is easier todo when specified in the RunService).
This PR is still marked as WIP
. Is this still true ?
@@ -331,6 +336,26 @@ public StartedContainer call() throws Exception { | |||
return imagesWaitingToStart; | |||
} | |||
|
|||
private void createVolumesAsPerVolumeBinds(ServiceHub hub, List<String> volumeBinds, List<VolumeConfiguration> volumesConfigs) |
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.
can we move this out of the StartMojo into the RunService ? The Mojo should stay as slim as possible.
private void createVolumesAsPerVolumeBinds(ServiceHub hub, List<String> volumeBinds, List<VolumeConfiguration> volumesConfigs) | ||
throws DockerAccessException { | ||
Map<String, Integer> aIndexMap = new HashMap(); | ||
for(Integer aIndex = 0; aIndex < volumesConfigs.size(); aIndex++) |
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.
please add braces
if(aVolumeBind.contains(":")) { | ||
aVolumeBind = aVolumeBind.substring(0, aVolumeBind.indexOf(":")); | ||
} | ||
Integer nVolumeConfigIndex = aIndexMap.get(aVolumeBind); |
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.
What's the difference between an n
and a a
prefix for your variables names ? tbh, I would avoid that kind of prefixing as we don't do it nowhere else in this code base. It's always good to adapt to a given codestyle instead of introducing ones own (like avoid braces or spaces after for
or if
). This helps to keep the code consistently readable.
0e45351
to
a770153
Compare
d86b78d
to
67563cb
Compare
@rhuss : Could you please take a look at it again? I've modified it according to your comments :) |
thanks, will do ASAP ! |
187acea
to
ca2a8f0
Compare
@rohanKanojia Thanks ! Going to merge now ... |
I'm afraid it caused regression: |
It's OK, I'm fine with downgrading for now. It just took time to analyze what's going on. |
np, its was a bad reviewer ;-) 'going to release 0.27.1 this evening ... |
#986