-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Jib not using image name when using variables #33552
Comments
/cc @geoand (jib) |
@cescoffier that's the expected behavior because If you use |
Yes, that's my point; it should NOT go back to the default without telling anything. Either fail (you're dumb - that property does not exist) or replace it using an empty string. |
(I would prefer a failure - as mandatory properties are ... mandatory) |
That's how Smallrye Config works ATM. If we want to change the expected behavior, we would need to make the change there - we would need @radcortez for this. |
Yes, I agree. At least having a BIG warning telling me that something is wrong and I may do something really wrong (which was the case, as now I've lots of images in my docker registry) |
BTW, why is this log printed twice?
|
Dunno, I am not seeing this |
The issue is not with SmallRyeConfig. It is how is mapped. If you map it as a The Line 27 in 9e3b813
And the extension does silently fallback to the application name if there is no value: Lines 91 to 93 in 177ddeb
|
Thanks @radcortez for the analysis! I'll have a closer look. |
BTW, since the Lines 25 to 27 in 9e3b813
There is not much value in mapping this with an |
So if we did: @ConfigItem(defaultValue = "${quarkus.application.name:unset}")
@ConvertWith(TrimmedStringConverter.class)
public String name; the expected behavior would be for |
Yes, you should get a |
Understood, thanks for the help. I opened #33560 |
Wow! Thanks @radcortez for the explanation! It makes sense! We should document that somewhere, as I'm sure lots of extension author do not see the difference of behavior! |
+100 for documenting it! |
Don't ignore invalid config in quarkus.container-image.name
Describe the bug
If I use Jib to build a container with the following property (voluntarily without value):
It ignores the value and uses the artifactId as the default image name.
If I use:
It works.
Expected behavior
It should use the set image name, at least try to resolve it, and fails, or at least report something instead of switching silently to the default name.
Actual behavior
It does not.
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: