-
Notifications
You must be signed in to change notification settings - Fork 202
Conversation
66bca4a
to
3d1541d
Compare
d61d5a0
to
000458b
Compare
7f23557
to
acc895c
Compare
core/src/main/java/io/fabric8/maven/core/service/BuildService.java
Outdated
Show resolved
Hide resolved
core/src/main/java/io/fabric8/maven/core/service/kubernetes/JibBuildService.java
Outdated
Show resolved
Hide resolved
Line 36 in acc895c
This constructor is redundant, please remove (public constructor with parameters automatically removes the possibility of a public no-args constructor for the class) |
Lines 49 to 51 in acc895c
|
core/src/main/java/io/fabric8/maven/core/util/JibServiceUtil.java
Outdated
Show resolved
Hide resolved
cb77c35
to
ccf6bf6
Compare
ccf6bf6
to
fc5424e
Compare
generator/api/src/main/java/io/fabric8/maven/generator/api/support/BaseGenerator.java
Outdated
Show resolved
Hide resolved
02dc4e2
to
9238397
Compare
ea80edb
to
feef207
Compare
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 overall with few minor comments.
Also, it would be nice if we could add some more documentation about this feature's usage.
core/src/main/java/io/fabric8/maven/core/service/Fabric8ServiceHub.java
Outdated
Show resolved
Hide resolved
core/src/main/java/io/fabric8/maven/core/service/kubernetes/jib/JibServiceUtil.java
Show resolved
Hide resolved
plugin/src/main/java/io/fabric8/maven/plugin/mojo/build/PushMojo.java
Outdated
Show resolved
Hide resolved
plugin/src/main/java/io/fabric8/maven/plugin/mojo/build/PushMojo.java
Outdated
Show resolved
Hide resolved
private void jibPush(ImageConfiguration imageConfiguration) throws MojoExecutionException { | ||
BuildImageConfiguration buildImageConfiguration = imageConfiguration.getBuildConfiguration(); | ||
|
||
String outputDir = preapareAbsoluteOutputDirPath(EMPTY_STRING).getAbsolutePath(); |
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.
Something looks fishy here, Why are you passing an empty string to get output directory path?
} | ||
} | ||
|
||
private void jibPush(ImageConfiguration imageConfiguration) throws MojoExecutionException { |
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.
In my opinion, this method should go to JibService or JibServiceUtil since it's doing everything related to JIB here. WDYT?
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.
This function uses a lot of pushmojo class properties here and actually uses the JibServiceUtil.pushImage function.
I don't think there's gonna be improvement in clarity by shifting this function to JibServiceUtil and making it unnecessarily static.
@manusa thoughts?
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.
Ideally PushMojo should be agnostic to the ImageService
that implements it, so it doesn't make sense to have here a method named jibPush
neither dockerPush
neither buildahPush
On the other hand, our PushMojo is extending DMP PushMojo
, so it's difficult to override the current ServiceHubFactory
and its implementations in AbstractDockerMojo
without a major refactor to have something similar to what's in BuildMojo
(Fabric8ServiceHub
).
So, only for FMP, I would make it static and move it to a helper class. This only requires passing 4 fields: MavenProject, ImageConfiguration, RegistryConfig and Logger.
Once we port this to JKube we'll perform a deeper refactor. It doesn't make much sense to work on this for FMP
While testing this feature one thing I noticed is the change in logging during JIB mode. Somehow it seems to be messed up right now. Earlier it was more interactive and dynamic, now it seems redundant: Current behavior(as per on this PR):
|
This is something that I changed because previous logging was relying on JIB's own logger which in order to be instantiated required the creation of fake Executors which is very nasty and dirty. Logging can be improved but will probably need some changed in our own logger implementations. My suggestion is to leave this as is for FMP, port it to JKube, and then improve the UX in a separate issue. |
2083ac1
to
96be717
Compare
…onfiguration.registry" This reverts commit 9b2a241.
…o v12.0.0 due to errors
05c01c4
to
f307496
Compare
f307496
to
d2842f3
Compare
@@ -23,6 +23,9 @@ Usage: | |||
``` | |||
|
|||
### 4.5-SNAPSHOT | |||
* Refactor #1766: Jib Refactor | |||
* Revert #1737 : Reverted "Wrong Jib output directory in Maven multi-module build" |
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.
@rohanKanojia made changes, how about this?
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.
LGTM
@@ -178,6 +179,39 @@ | |||
</fmp-service> | |||
</config> | |||
</enricher> | |||
<!-- sample assembly configuration. make sure all the directories configured exist. --> | |||
<!--<images> | |||
<image> |
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.
Is it okay to leave this code as commented?
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.
I have knowingly added this here in the sample pom. We actually don't have any sample demonstrating AssemblyConfig feature so I thought this will be helpful.
if (value == null) { | ||
value = project.getProperties().getProperty(key); | ||
} | ||
return value; |
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.
This looks like a util function, I think there should already be some method available in EnvUtil for this
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.
This method should be inherited from the AbstractFabric8Mojo
class, but since BuildMojo
and PushMojo
don't inherit the AbstractFabric8Mojo
this method has been defined separately for just these two cases.
blocked on fabric8io/docker-maven-plugin#1309
Edit: Not blocked anymore.