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

Add access log handler to the main router if non-app root-path is different from root-path #26783

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

xstefank
Copy link
Member

@xstefank xstefank commented Jul 18, 2022

Fixes #26782

I wanted to write a test but in test mode the framework router is not created and everything is under HTTP root router so I think that adding an if case for test mode would be overkill.

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 18, 2022

Thanks for your pull request!

The title of your pull request does not follow our editorial rules. Could you have a look?

  • title should not end up with ellipsis (make sure the title is complete)

This message is automatically generated by a bot.

@xstefank xstefank changed the title Add access log handler to the main router if non-app root-path is dif… Add access log handler to the main router if non-app root-path is different from root-path Jul 18, 2022
@gsmet
Copy link
Member

gsmet commented Aug 3, 2022

@ebullient could you have a look at this one? I think it makes sense but would prefer you having a look.

@gsmet gsmet requested a review from ebullient August 3, 2022 08:02
@xstefank xstefank force-pushed the i-26782-access-log-non-app branch from d4abc33 to 767eeda Compare August 10, 2022 07:05
@xstefank
Copy link
Member Author

xstefank commented Aug 10, 2022

@ebullient @gsmet I did this over a morning coffee to have fresh eyes. So original was wrong IMO because the root router included in case both root path and non-root path was specified also 404s logs of any accesses, which is not something we have now and probably don't want. So I rather changed it to pull created framework router into the recorder and just add the handler to the framework router if it's not mounted under the root path router. Here I did some more extensive testing - https://gist.github.com/xstefank/036ad52c5e40644ad1228915f22f5369 which shows the behavior of this PR, which I think is correct.

@quarkus-bot
Copy link

quarkus-bot bot commented Aug 10, 2022

Failing Jobs - Building 767eeda

Status Name Step Failures Logs Raw logs
Gradle Tests - JDK 11 Build Failures Logs Raw logs
✔️ Gradle Tests - JDK 11 Windows
✔️ JVM Tests - JDK 11
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
✔️ JVM Tests - JDK 17
✔️ JVM Tests - JDK 18

Full information is available in the Build summary check run.

Failures

⚙️ Gradle Tests - JDK 11 #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.devmode.CompositeBuildWithDependenciesDevModeTest.main line 24 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.test.devmode.util.DevModeTestUtils that uses java.util.function.Supplier, java.util.function.Supplierjava.util.concurrent.atomic.AtomicReference, java.util.concurrent.atomic.AtomicReferencejava.lang.String, java.lang.Stringboolean was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

io.quarkus.gradle.devmode.DotEnvQuarkusDevModeConfigurationTest.main line 13 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.test.devmode.util.DevModeTestUtils that uses java.util.function.Supplier, java.util.function.Supplierjava.util.concurrent.atomic.AtomicReference, java.util.concurrent.atomic.AtomicReferencejava.lang.String, java.lang.Stringboolean was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/vertx-http/deployment 
! Skipped: extensions/agroal/deployment extensions/amazon-lambda-http/deployment extensions/amazon-lambda-rest/deployment and 309 more

📦 extensions/vertx-http/deployment

io.quarkus.vertx.http.http2.Http2Test.testHttp2EnabledSsl line 57 - More details - Source on GitHub

java.util.concurrent.ExecutionException: javax.net.ssl.SSLHandshakeException: Failed to create SSL connection
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)

@gsmet gsmet merged commit 5677f43 into quarkusio:main Aug 23, 2022
@quarkus-bot quarkus-bot bot added this to the 2.13 - main milestone Aug 23, 2022
@xstefank xstefank deleted the i-26782-access-log-non-app branch August 23, 2022 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants