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(#7712): S2i build no longer renames artifacts #7749
Conversation
Found some issues with the PR related to native mode ... It should be ok now. |
as this changes the behavior of kubernetes/openshift setup best to get this fixed before final. |
...age-s2i/deployment/src/main/java/io/quarkus/container/image/s2i/deployment/S2iProcessor.java
Show resolved
Hide resolved
I would like @Ladicek to test this if possible. I agree with @maxandersen that we need this in for |
/me looking |
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 seems to work fine from my perspective. I don't test native binaries in OpenShift yet, but for the JVM mode, this is OK.
(I'm still not sure why we need the full java ...
cmdline, but it can't hurt either, so I'm fine with that.)
Thanks for checking @Ladicek |
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.
Added some minor comments about the config property javadoc (which should be fixed since they end up in the docs)
...-image-s2i/deployment/src/main/java/io/quarkus/container/image/s2i/deployment/S2iConfig.java
Outdated
Show resolved
Hide resolved
...-image-s2i/deployment/src/main/java/io/quarkus/container/image/s2i/deployment/S2iConfig.java
Outdated
Show resolved
Hide resolved
...-image-s2i/deployment/src/main/java/io/quarkus/container/image/s2i/deployment/S2iConfig.java
Outdated
Show resolved
Hide resolved
It's the ubi quarkus native binary image that does rename the artifact. It doesn't affect JVM mode.
Because there is no guarantee that the s2i builder image the user selects will support |
Please squash the commits when you are done :) |
Done! |
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
I have actually noticed that it might hurt, or at least be suboptimal. I filed #7766 for that. |
@geoand please don't assign PRs to 1.3.0.Final. I do it when I backport things. As long as they are not backported, they don't end up in 1.3.0.Final as we already have a branch. Thanks! |
So the milestone should be |
As this is a non-blocker issue, I think that the fix for that particular uses case should be deferred post 1.3.0.Final. |
I agree |
Yea, there's no way how to indicate priority in GitHub issues (except labels, but I can't assign those). If it were, I'd mark that particular issue as not a blocker -- but since you already tried to fix it, I wanted to report that the fix is incomplete :-) |
Ah, one thing. This doesn't mean I didn't find any other issue. I'm still checking. This one was just too easy to find :-) |
@Ladicek I propose we merge now and if you find any issues open them along with an indication of how serious they are for |
I agree with merging (as I didn't spot any other glaring issue yet), but would like to have these 2 questions answered first:
|
This is already the image we use. If your question is if we should, then maybe @maxandersen can answer that.
Let me start by saying that we can't take the registry into consideration, as this would break all private registries. Now, let's see what the implications might be: Security wise, nothing changes. We don't grant any special privileges to known images, we just align our generated manifests (something anyone can do by hand anyway). Other consequences? Yeah, if someone creates an identically named image that doesn't respect the same environment variable conventions as the original one, publish that to a private, and use that instead, then the resulting container will probably fail to start. But I think we can live with that (at least for now). |
No we don't. We currently use the Fabric8 image by default. This PR changes that to the Red Hat image. I'm not sure if that's right. Technically, the image is available for everyone. However, I think that "conditions apply". If you don't have a Red Hat subscription (even the $0 developer subscription), you shouldn't use it. Or something like that.
OK, agree. |
I stand corrected! |
Which leaves us where with regards to @Ladicek 's comment? |
We need to check if we can use |
I don't like us using the Fabric8 image, but I don't think there's a better image that we can use by default. When UBI image with Java comes out, we should switch to that for sure, but until then... |
For the default Dockerfiles, we use ubi and install Java manually. |
We can't do that for s2i however |
long thread and not sure what questions are left but just two things to state:
|
.map(d -> Paths.get(s2iConfig.jarPath).getParent().resolve("lib") | ||
.resolve(d.getArtifact().getGroupId() + "." + d.getArtifact().getPath().getFileName()).toAbsolutePath() | ||
.map(d -> String.valueOf(d.getArtifact().getGroupId() + "." + d.getArtifact().getPath().getFileName())) | ||
.map(s -> Paths.get(s2iConfig.jarDirectory).resolve("lib").resolve(s).toAbsolutePath() |
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 wonder what happens on Windows, would this possibly generate Windows-style paths into the Kubernetes YAML? (Didn't check, just thinking aloud.)
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 works fine for my usecase. There might be follow-up issues, but this is a good base IMHO.
Since we are practically out of time, I'm going to merge this to get the needed fixes into |
Fixes: #7712 #7766 #7740
This pull request changes the way that the artifact is handled during the s2i build process.
JarBuildItem
/NativeBuildItem
unless the user specifies something else (see above).