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

Register ConfigSources directly with the builder #17483

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

radcortez
Copy link
Member

@radcortez radcortez commented May 26, 2021

The idea here is to register sources directly with the SmallRyeConfigBuilder instead of relying on the ServiceLoader. One of the main motivations is to better control what we add to Config, avoid adding problematic sources and avoid discovery at runtime.

One other issue is related with #5492. Even with the guard added by

final List<String> list = names.stream()
// todo: see https://github.com/quarkusio/quarkus/issues/5492
.filter(s -> !s.startsWith("org.jboss.resteasy.microprofile.config.")).collect(Collectors.toList());

Graal is still able to reach the source entries but fails because they are not registered for reflection. Check smallrye/smallrye-config#580 and https://groups.google.com/g/quarkus-dev/c/yP7QsNRgYxY

The PR adds a check if servlet APIs and implementations are available to either include the RESTEasy config sources or rewrite them to not use their servlet-based implementation. Ideally, the RESTEasy config sources should be fixed.

It also adds the @StaticInitSafe annotation to mark sources that can be safely added and started during static init.

@quarkus-bot
Copy link

quarkus-bot bot commented May 27, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 7634509

Status Name Step Test failures Logs Raw logs
JVM Tests - JDK 11 Build Test failures Logs Raw logs
✔️ JVM Tests - JDK 16
Maven Tests - JDK 11 Build Test failures Logs Raw logs
Native Tests - Data3 Build ⚠️ Check → Logs Raw logs
Native Tests - Data4 Build Test failures Logs Raw logs
Native Tests - HTTP Build Test failures Logs Raw logs
Native Tests - Messaging1 Build Test failures Logs Raw logs
Native Tests - Messaging2 Build Test failures Logs Raw logs
Native Tests - Misc1 Build Test failures Logs Raw logs
Native Tests - Misc2 Build Test failures Logs Raw logs
Native Tests - Misc3 Build Test failures Logs Raw logs
Native Tests - Security1 Build Test failures Logs Raw logs
Native Tests - Security2 Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 #

📦 integration-tests/grpc-streaming

io.quarkus.grpc.example.streaming.StreamingEndpointTest.testPipe line 30 - More details - Source on GitHub


⚙️ Maven Tests - JDK 11 #

📦 integration-tests/maven

io.quarkus.maven.it.DevMojoIT.testThatNewResourcesAreServed line 849 - More details - Source on GitHub


⚙️ Native Tests - Data4 #

📦 integration-tests/neo4j

io.quarkus.it.neo4j.Neo4jFunctionalityInGraalITCase.testBlockingNeo4jFunctionality - More details - Source on GitHub


⚙️ Native Tests - HTTP #

📦 integration-tests/elytron-resteasy

io.quarkus.it.resteasy.elytron.BaseAuthIT.testGet - More details - Source on GitHub


⚙️ Native Tests - Messaging1 #

📦 integration-tests/kafka-avro-apicurio2

io.quarkus.it.kafka.KafkaAvroIT.testApicurioAvroProducer - More details - Source on GitHub

📦 integration-tests/kafka-avro

io.quarkus.it.kafka.KafkaAvroIT.testApicurioAvroProducer - More details - Source on GitHub

📦 integration-tests/kafka-sasl

io.quarkus.it.kafka.SaslKafkaConsumerIT.testReception - More details - Source on GitHub

📦 integration-tests/kafka-snappy

io.quarkus.it.kafka.KafkaSnappyCodecITCase.testJacksonCodec - More details - Source on GitHub

📦 integration-tests/kafka-ssl

io.quarkus.it.kafka.SslKafkaConsumerITCase.testReception - More details - Source on GitHub

📦 integration-tests/kafka-streams

io.quarkus.it.kafka.streams.KafkaStreamsITCase.testKafkaStreams - More details - Source on GitHub

📦 integration-tests/kafka

io.quarkus.it.kafka.KafkaConsumerITCase.test - More details - Source on GitHub

📦 integration-tests/reactive-messaging-kafka

io.quarkus.it.kafka.KafkaConnectorIT.test - More details - Source on GitHub


⚙️ Native Tests - Messaging2 #

📦 integration-tests/reactive-messaging-amqp

io.quarkus.it.amqp.AmqpConnectorIT.test - More details - Source on GitHub


⚙️ Native Tests - Misc1 #

📦 integration-tests/jgit

io.quarkus.it.jgit.NativeJGitIT.shouldClone - More details - Source on GitHub


⚙️ Native Tests - Misc2 #

📦 integration-tests/mailer

io.quarkus.it.mailer.MailerIT.sendHtmlEmail - More details - Source on GitHub


⚙️ Native Tests - Misc3 #

📦 integration-tests/smallrye-graphql-client

io.quarkus.it.smallrye.graphql.client.TypesafeClientIT.testTypesafeClient - More details - Source on GitHub


⚙️ Native Tests - Security1 #

📦 integration-tests/elytron-security-jdbc

io.quarkus.elytron.security.jdbc.it.ElytronSecurityJdbcIT.anonymous - More details - Source on GitHub

📦 integration-tests/elytron-security-ldap

io.quarkus.elytron.security.ldap.it.ElytronSecurityLdapIT.anonymous - More details - Source on GitHub

📦 integration-tests/elytron-security-oauth2

io.quarkus.it.elytron.oauth2.ElytronOauth2ExtensionResourceITCase.anonymous - More details - Source on GitHub

📦 integration-tests/elytron-security

io.quarkus.it.elytron.JCAITCase.testDecodeRSAKey - More details - Source on GitHub


⚙️ Native Tests - Security2 #

📦 integration-tests/oidc

io.quarkus.it.keycloak.BearerTokenAuthorizationInGraalITCase.testAccessAdminResourceCustomHeaderNoBearerScheme - More details - Source on GitHub

@quarkus-bot
Copy link

quarkus-bot bot commented May 31, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 39ce031

Status Name Step Test failures Logs Raw logs
JVM Tests - JDK 11 Build Test failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Test failures Logs Raw logs
JVM Tests - JDK 16 Build Test failures Logs Raw logs
Maven Tests - JDK 11 Build Test failures Logs Raw logs
Native Tests - Main Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 #

📦 integration-tests/main

io.quarkus.it.main.JaxRSTestCase.testGzipConfig line 222 - More details - Source on GitHub


⚙️ JVM Tests - JDK 11 Windows #

📦 integration-tests/main

io.quarkus.it.main.JaxRSTestCase.testGzipConfig line 222 - More details - Source on GitHub


⚙️ JVM Tests - JDK 16 #

📦 integration-tests/main

io.quarkus.it.main.JaxRSTestCase.testGzipConfig line 222 - More details - Source on GitHub


⚙️ Maven Tests - JDK 11 #

📦 integration-tests/maven

io.quarkus.maven.it.DevMojoIT.testThatNewResourcesAreServed line 849 - More details - Source on GitHub


⚙️ Native Tests - Main #

📦 integration-tests/main

io.quarkus.it.main.JaxRSITCase.testGzipConfig - More details - Source on GitHub

@radcortez radcortez force-pushed the sources-with-builder branch 2 times, most recently from 7f46266 to 9ee4749 Compare June 2, 2021 10:43
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 2, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 9ee4749

Status Name Step Test failures Logs Raw logs
Native Tests - Cache Build ⚠️ Check → Logs Raw logs
Native Tests - Data1 Build ⚠️ Check → Logs Raw logs
Native Tests - Data2 Build ⚠️ Check → Logs Raw logs
Native Tests - Data3 Build ⚠️ Check → Logs Raw logs
Native Tests - Data4 Build ⚠️ Check → Logs Raw logs
Native Tests - Data5 Build ⚠️ Check → Logs Raw logs
Native Tests - Data6 Build ⚠️ Check → Logs Raw logs
Native Tests - Data7 Build ⚠️ Check → Logs Raw logs
Native Tests - HTTP Build ⚠️ Check → Logs Raw logs
Native Tests - Messaging2 Build ⚠️ Check → Logs Raw logs
Native Tests - Misc1 Build Test failures Logs Raw logs
Native Tests - Misc2 Build ⚠️ Check → Logs Raw logs
Native Tests - Misc3 Build ⚠️ Check → Logs Raw logs
Native Tests - Misc4 Build ⚠️ Check → Logs Raw logs
Native Tests - Security1 Build ⚠️ Check → Logs Raw logs
Native Tests - Security2 Build ⚠️ Check → Logs Raw logs
Native Tests - Security3 Build ⚠️ Check → Logs Raw logs
Native Tests - Spring Build ⚠️ Check → Logs Raw logs
Native Tests - Windows - hibernate-validator Build ⚠️ Check → Logs Raw logs
Native Tests - gRPC Build ⚠️ Check → Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ Native Tests - Misc1 #

📦 integration-tests/maven

io.quarkus.maven.it.NativeImageIT.testJavaLibraryPathAtRuntime - More details - Source on GitHub

@quarkus-bot
Copy link

quarkus-bot bot commented Jun 22, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building a8e18aa

Status Name Step Test failures Logs Raw logs
Native Tests - Main Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ Native Tests - Main #

📦 integration-tests/main

io.quarkus.it.main.JaxRSITCase.testGzipConfig - More details - Source on GitHub

@gsmet
Copy link
Member

gsmet commented Jun 28, 2021

@radcortez I rebased the PR but the failure in io.quarkus.it.main.JaxRSITCase.testGzipConfig looks a bit suspicious given it could be config-related.

@radcortez
Copy link
Member Author

Sure, let me check.

@quarkus-bot
Copy link

quarkus-bot bot commented Jun 28, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building e675c46

Status Name Step Test failures Logs Raw logs
Native Tests - Main Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ Native Tests - Main #

📦 integration-tests/main

io.quarkus.it.main.JaxRSITCase.testGzipConfig - More details - Source on GitHub

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 8, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 6ad8efd

Status Name Step Test failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 11 Windows Build Test failures Logs Raw logs
✔️ JVM Tests - JDK 16

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 Windows #

📦 integration-tests/resteasy-reactive-rest-client

io.quarkus.it.rest.client.BasicTest.shouldMakeJsonRequest line 40 - More details - Source on GitHub

@geoand
Copy link
Contributor

geoand commented Jul 9, 2021

Interesting!

I'll take a look on Monday

@radcortez
Copy link
Member Author

Thanks! This also includes the work we talked about with the safe static init sources.

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

I added a few comments

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 12, 2021

Failing Jobs - Building d6aee25

Status Name Step Test failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 11 Windows Build ⚠️ Check → Logs Raw logs
✔️ JVM Tests - JDK 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom config source is not working in Quarkus 2.0.0 RestEasy ServletConfigSourceImpl is broken
3 participants