Skip to content
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

quarkus.uuid is missing in 2.12.0 #27630

Closed
Eng-Fouad opened this issue Aug 31, 2022 · 13 comments · Fixed by #27660
Closed

quarkus.uuid is missing in 2.12.0 #27630

Eng-Fouad opened this issue Aug 31, 2022 · 13 comments · Fixed by #27660
Labels
area/config kind/bug Something isn't working
Milestone

Comments

@Eng-Fouad
Copy link
Contributor

Eng-Fouad commented Aug 31, 2022

Describe the bug

ConfigProvider.getConfig().getValue("quarkus.uuid", UUID.class);

This works well in Quarkus 2.11.3. However, it throws an exception in Quarkus 2.12.0:

2022-08-31 17:43:28,918 [] ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): java.util.NoSuchElementException: SRCFG00014: The config property quarkus.uuid is required but it could not be found in any config source
	at io.smallrye.config.SmallRyeConfig.convertValue(SmallRyeConfig.java:282)
	at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:239)
	at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:167)
	...

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

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 or gradlew --version)

No response

Additional information

No response

@Eng-Fouad Eng-Fouad added the kind/bug Something isn't working label Aug 31, 2022
@gsmet
Copy link
Member

gsmet commented Aug 31, 2022

@radcortez I don't think we have removed it so I suspect a config issue. Feel free to redirect to someone else if it's not.

@gsmet
Copy link
Member

gsmet commented Aug 31, 2022

And we should probably have a test for that too.

@radcortez
Copy link
Member

I was not able to reproduce the issue. I've tried with a sample project with 2.12.0.Final and it worked as expected. I've also added a test in #27634 and it also works.

@Eng-Fouad can you please provide us with a reproducer? Thank you.

@radcortez radcortez added the triage/needs-reproducer We are waiting for a reproducer. label Aug 31, 2022
@Eng-Fouad
Copy link
Contributor Author

@Eng-Fouad
Copy link
Contributor Author

Even this simple resource class does not let the server to start normally:

@Path("/uuid")
public class UuidResource {

    @ConfigProperty(name = "quarkus.uuid")
    UUID uuid;

    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public UUID uuid() {
        return uuid;
    }
}

Failed to load config value of type class java.util.UUID for: quarkus.uuid

changing Quarkus version back to 2.11.3.Final makes it working well.

@radcortez
Copy link
Member

Caused by #26967.

@ia3andy
Copy link
Contributor

ia3andy commented Sep 2, 2022

I also had this bug on some of my apps, let me know if you need another reproducer

@radcortez
Copy link
Member

No worries. I was already able to reproduce it. It only happens with RESTEasy Reactive, and I was using RESTEasy Classic. Thanks!

@geoand geoand removed the triage/needs-reproducer We are waiting for a reproducer. label Sep 2, 2022
@geoand
Copy link
Contributor

geoand commented Sep 2, 2022

It only happens with RESTEasy Reactive, and I was using RESTEasy Classic

Very interesting... Why the difference?

@radcortez
Copy link
Member

We had an issue with DefaultValuesConfigSource. If a namespace was already present it was being overridden if we needed to update it. So what happened was that we write quarkus.uuid with SmallRyeConfigBuilder.withDefault and then mappings will also write their defaults. In this step, the quarkus.uuid was discarded.

This was caused when we added the mapping for RESTEasy Reactive Security: It was because #26967. The issue was already there, just not very visible because you needed a combination of using extension mappings and quarkus.uuid, and we don't have many extensions using mappings yet :)

@geoand
Copy link
Contributor

geoand commented Sep 2, 2022

Gotcha, thanks for the explanation!

@quarkus-bot quarkus-bot bot added this to the 2.13 - main milestone Sep 4, 2022
@sstefano
Copy link

sstefano commented Sep 6, 2022

I have the same issue with the latest version of quarkus 2.12.0 + RESTEasy Reactive so, we need to wait for the next release, is it correct?

@gsmet
Copy link
Member

gsmet commented Sep 6, 2022

We have a 2.12.1.Final planned for tomorrow. I will check if I can backport the SmallRye Config upgrade.

@gsmet gsmet modified the milestones: 2.13 - main, 2.12.1.Final Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config kind/bug Something isn't working
Projects
None yet
6 participants