quarkusio / quarkus-workshops

Hosts Quarkus related workshops
https://quarkus.io/quarkus-workshops/super-heroes/
Apache License 2.0
179 stars 175 forks source link

Migrate extension Config to `@ConfigMapping` #600

Closed gastaldi closed 2 months ago

gastaldi commented 2 months ago

/cc @geoand @gsmet @holly-cummins @radcortez

gastaldi commented 2 months ago

It fails with

Caused by: java.lang.ClassNotFoundException: io.quarkus.workshop.superheroes.version.deployment.VersionConfig
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
    at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:533)
    at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:481)
    at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:533)
    at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:481)
    at io.quarkus.runtime.configuration.AbstractConfigBuilder.withMapping(AbstractConfigBuilder.java:64)
    ... 21 more

Not sure what's causing this, investigating

dmlloyd commented 2 months ago

Run time config interfaces must be in the runtime artifact, not the deployment artifact; could it be that simple?

radcortez commented 2 months ago

That is the most likely issue :)

gastaldi commented 2 months ago

Weird how that always worked with @ConfigRoot, but that makes sense

github-actions[bot] commented 2 months ago

😭 Deploy PR Preview failed.

dmlloyd commented 2 months ago

Previously it was not explicitly bound to a phase, so I guess it defaulted to "build time", which is probably why it worked before.

geoand commented 2 months ago

+1

gastaldi commented 2 months ago

Looks like it's ready to be merged now