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

Improved support for defaults and indexed properties in ConfigMappings. #550

Merged
merged 3 commits into from
Apr 27, 2021

Conversation

radcortez
Copy link
Member

No description provided.

@hrstoyanov
Copy link

@radcortez can I help in any way to move this review forward?

@radcortez
Copy link
Member Author

@radcortez can I help in any way to move this review forward?

I usually leave the PRs open for a couple of day for people to have the chance to comment / review. Feel free to review and add any comments. If we don't get any review, I'll merge it tomorrow. Thanks!

@radcortez radcortez merged commit 2075b10 into smallrye:main Apr 27, 2021
@radcortez radcortez added the backport-1.x Backport a PR to 1.x branch label Apr 27, 2021
radcortez added a commit to radcortez/smallrye-config that referenced this pull request Apr 27, 2021
radcortez added a commit that referenced this pull request Apr 27, 2021
* Support snake case naming strategy. (#539)

* Apply the same NamingStrategy to all groups in a ConfigMapping root. (#545)

* Improved support for defaults and indexed properties in ConfigMappings. (#550)

* Readd public API to keep compatiblity with Quarkus 1.13.x.
@radcortez
Copy link
Member Author

@hrstoyanov I've released SR Config 1.13.0. You should be able to manually update it with the latest Quarkus version to get the fix. I'm not sure if we are going to do more Quarkus releases in the 1.x branch, so you don't have to update manually, but I'll check.

@radcortez radcortez deleted the mappings branch April 27, 2021 17:38
@hrstoyanov
Copy link

will test asap. thanks!

@hrstoyanov
Copy link

@radcortez I saw Quarkus 1.13.3.Final released yesterday. Did the change make it or is it still separate?

@hrstoyanov
Copy link

ok, looks like not included. No problem.

@radcortez
Copy link
Member Author

No, sorry. It was not in time, but it should work if you overwrite the dependency.

@hrstoyanov
Copy link

@radcortez
Unfortunately I cannot test this unless it becomes part of Quarkus release.
Adding the dependency in my gradle build file:

dependencies {

    //Smallrye config
    implementation 'io.smallrye.config:smallrye-config:1.13.0'

    //Quarkus
    implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
    implementation 'io.quarkus:quarkus-config-yaml'
    implementation 'io.quarkus:quarkus-cache'
    implementation 'io.quarkus:quarkus-hibernate-validator'
    implementation 'io.quarkus:quarkus-smallrye-context-propagation'
    implementation 'io.quarkus:quarkus-resteasy'
    testImplementation(platform("org.junit:junit-bom:${junitVersion}"))
    testImplementation("org.junit.jupiter:junit-jupiter")
    testImplementation("com.microsoft.sqlserver:mssql-jdbc:${mssqlJdbcVersion}")
}

on top of Quarkus 1.13.3.Final has some very strange effect - launching Quarkus in developer mode crashes at the JVM level with no indication of what is wrong:

Caused by: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/liberica-jdk-16.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
	at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:414)
	at org.gradle.process.internal.DefaultExecAction.execute(DefaultExecAction.java:38)
	at org.gradle.process.internal.DefaultExecActionFactory.exec(DefaultExecActionFactory.java:205)
	at org.gradle.api.internal.project.DefaultProject.exec(DefaultProject.java:1155)
	at io.quarkus.gradle.tasks.QuarkusDev.startDev(QuarkusDev.java:181)

I enabled debug logging in Gradle and it turns out in Dev mode it does this under the hood:

 /Library/Java/JavaVirtualMachines/liberica-jdk-16.jdk/Contents/Home/bin/java -javaagent:/Users/hristostoyanov/.gradle/caches/modules-2/files-2.1/io.quarkus/quarkus-class-change-agent/1.13.3.Final/6ea76c9243bc297a2ecc3550aa6cafb3fbba5eea/quarkus-class-change-agent-1.13.3.Final.jar -Dquarkus-internal.serialized-app-model.path=/Users/hristostoyanov/projects/gitlab/dynamind.ai/dbproxy/dbproxy/build/tmp/quarkusDev/quarkus-app-model.dat -XX:TieredStopAtLevel=1 -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:5005,server=y,suspend=n -Djava.util.logging.manager=org.jboss.logmanager.LogManager --enable-preview -jar /Users/hristostoyanov/projects/gitlab/dynamind.ai/dbproxy/dbproxy/build/dbproxy-dev.jar 
Listening for transport dt_socket at address: 5005

when I run the above outside Gradle, the JVM dies indeed, with no indication whatsoever. Unfortunately, there is too much Quarkus "magic" for me to discern if the issues is coming from adding the smallrye-config or problem with Quarkus and Java 16 in general or something else.

@radcortez
Copy link
Member Author

Ok, let me check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-1.x Backport a PR to 1.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants