You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The database-user and database-password are provided by a Kubernetes secret at runtime.
However, a simple mvn package throws:
java.util.NoSuchElementException: SRCFG00011: Could not expand value database-user in property quarkus.datasource.username
at io.smallrye.config.ExpressionConfigSourceInterceptor.lambda$getValue$0(ExpressionConfigSourceInterceptor.java:63)
at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
at io.smallrye.common.expression.Expression.evaluateException(Expression.java:56)
at io.smallrye.common.expression.Expression.evaluate(Expression.java:70)
at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:56)
at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:36)
at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
at io.smallrye.config.PropertyNamesConfigSourceInterceptor.getValue(PropertyNamesConfigSourceInterceptor.java:61)
at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
at io.smallrye.config.SmallRyeConfig.getConfigValue(SmallRyeConfig.java:307)
at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:225)
at io.smallrye.config.SmallRyeConfig.getOptionalValue(SmallRyeConfig.java:324)
at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.devServicesAutoGenerateByDefault(HibernateOrmProcessor.java:199)
During build, we compile with the prod profile. That code is trying to see if the config is present, but that also tries to expand the value. I think we should be able to rewrite it so it doesn't try to expand it.
Describe the bug
In an application using kubernetes-config, I have a prod profile with the following configuration:
The database-user and database-password are provided by a Kubernetes secret at runtime.
However, a simple
mvn package
throws:Expected behavior
It should not fail.
Actual behavior
It fails since 2.3.0.
How to Reproduce?
Clone https://github.com/cescoffier/devnation-quarkus-movies and update the quarkus version to 999-SNAPSHOT (it fails since 2.3.0.Final), and run
mvn package -DskipTests
. You can revert to the original version to see the build succeeds.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: