-
Notifications
You must be signed in to change notification settings - Fork 202
JibBuildConfiguration ignores BuildImageConfiguration.registry #1738
Comments
😞 It was a part of Google Summer of Code. Yeah, we can't just blame that for that much bugs. |
@rohanKanojia : Please do understand me correctly: The Java Image Builder feature is an extremely nice addition to f-m-p. I just think the quality should be better. 😪 |
@erikgb : I really apologize for the inconvenience caused. I agree it is fault on my side. Let me fix all jib issues before cutting release tomorrow. I think we only thought of a basic use case. We didn't consider other use cases 😢 . |
Could you please provide some more feedback on how this can be made better(for now, for you use case)? I can try to provide a better version of this support in 4.3.1 |
@rohanKanojia : Good, thanks! I just hope there isn't more bugs "hiding" down the line. Do you still want me to prepare a PR for #1737, or are you fixing that too now? We risk Git conflicts modifying the same code..... |
I haven't started working on these yet. But I can try in a hour or two. If you have time, please do 👍 . Otherwise I would fix both of these issues by tonight. |
Of course @rohanKanojia , I can add some general ideas/inputs:
|
I have raised a PR to fix this issue. I tried pushing to quay.io using this, but seems like quay doesn't support container image manifest pushed by current version of jib. But at least, it attempted to push at the correct registry.
I've skipped adding/improving tests for now since I'm not sure how would we verify whether image has been pushed to the registry or not. We might need to hit some API related to that registry. JIB also has an offline mode(which just builds a tarball of image). But that's right now being used as a fallback option(in case registry is inaccessible). We can maybe do offline builds and verify tarball(not sure about this either). |
I'm keeping this open until we get your use case resolved. |
@rohanKanojia : F-m-p 4.3.1 does not appear to solve my issues on our CI server:
I will try to look more closely at these issues later this week. But I still feel that that the Jib feature in f-m-p was released too early, and needs a lot of care (work) to be really usable - except in very basic setups.... |
@erikgb : ah, It seems to be pulling from dockerhub only atm. Let me also try to find some option to configure pull registry. |
Yes, indeed, and that has been the problem since I filed this issue. A user (like me) would expect all the f-m-p registry settings to apply for the Jib feature as well. Currently it doesn't. 😉 |
@erikgb : Do setting up these environment variables help? |
@rohanKanojia : It is not a simple proxy that sits between our CI servers and Docker Hub. It is a Docker Repository (smart) proxy: Artifactory. I probably need to set absolute docker images for now. The f-m-p registry settings does not currently work for Jib builds. |
ah, ok 😞 |
@rohanKanojia : This week became a bit more busy than anticipated, but I had a closer look at the newly added Jib feature today. As I see it, the main issue is that the fabric8:build goal does both image build and image push. The fabric8:push goal should push the image. So I opened a Jib issue; GoogleContainerTools/jib#2104, and got immediate response. I will give the suggestion a try, and plan to submit a PR to improve the Jib feature in f-m-p. |
I also had the same concern while reviewing this feature(see my comment on #1675) . Unfortunately, I was unable to convince @dev-gaur and @theexplorist to get adapt as per my idea. Right now tarball is built as a fallback option in case the push fails. While porting this to docker-maven plugin, I separated build and push steps (fabric8io/docker-maven-plugin#1277 (comment)) I would like to separate these two steps in fmp also. Code is already there to build tarball, but that's just not the default way. Happy to modify this if @dev-gaur agrees. |
Totally agree, we need to improve test coverage.
I created a seperate object model for Jib image build to help with abstractions. Even though docker and jib does the same thing here (build images), but the set of parameters they require have a slight differences in names, etc. JibBuildConfiguration object helps in mapping DMP specific parameters to Jib specific parameter set. Its just to ease developer's understanding of things. And the conversion from ImageConfiguration objects to JibBuildConfiguration objects is confined within JibBuildServiceUtil class. |
…onfiguration.registry" This reverts commit 9b2a241.
…onfiguration.registry" This reverts commit 9b2a241.
…onfiguration.registry" This reverts commit 9b2a241.
…onfiguration.registry" This reverts commit 9b2a241.
…onfiguration.registry" This reverts commit 9b2a241.
…onfiguration.registry" This reverts commit 9b2a241.
Description
JibBuildConfiguration MUST take into account all relevant properties from BuildImageConfiguration.
We do not have access to Docker Hub (registry-1.docker.io) in our CI pipelines, but have to go through a corporate Docker image "proxy". Normally this should be doable with the correct registry configuration in f-m-p. But currently this is not possible for a Jib build because the JibBuildConfiguration created from BuildImageConfiguration seems to ignore a lot of the image configuration in this method:
fabric8-maven-plugin/core/src/main/java/io/fabric8/maven/core/util/JibBuildServiceUtil.java
Line 218 in f75d09b
This is a blocker that needs to be fixed.
@rohanKanojia @dev-gaur A general (critical) question: Why are you accepting pull request with no, or very little test coverage? In the long run this will definitely discourage developers from using f-m-p. 😏
I feel a bit sad now, as I was looking forward to use the new Java Image Builder support in f-m-p, just realizing that it seems to be full of basic bugs....
The text was updated successfully, but these errors were encountered: