Skip to content

Validate that the injected config class has to be the entry point of the @ConfigMapping #39431

@michalvavrik

Description

@michalvavrik

Describe the bug

I'm trying to migrate Elytron Security extensions and I can see that inside buildstep io.quarkus.elytron.security.properties.deployment.ElytronPropertiesProcessor#configureFileRealmAuthConfig values are fine, but when I put breakpoint inside recorded method io.quarkus.elytron.security.runtime.ElytronPropertiesFileRecorder#loadRealm(io.quarkus.runtime.RuntimeValue<org.wildfly.security.auth.server.SecurityRealm>, io.quarkus.elytron.security.runtime.PropertiesRealmConfig) values are gone.

This is commit that causes the issue 840ac57

UPDATE: see Roberto explanation below.

Expected behavior

Worked for config classes.

Actual behavior

Passed config interface is not null, however when methods are called, they provide none or false (for booleans). I tried to add the RuntimeConfigSetupCompleteBuildItem without success. Inside buildstep, values are correct.

How to Reproduce?

Reproducer:

  1. git clone
  2. cd quarkus
  3. git checkout feature/migrate-elytron-config-classes
  4. mvn -Dquickly
  5. mvn clean test -f extensions/elytron-security-properties-file/deployment/ -Dtest=BasicAuthTestCase

Please note there are other failures as result of config migration when you run all the tests in the deployment module, but I'm yet to analyze them. I checked code several times and I can't see what is wrong in my migration.

Output of uname -a or ver

Fedora 38

Output of java -version

21

Quarkus version or git rev

999-SNAPSHOT

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.3

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions