-
Notifications
You must be signed in to change notification settings - Fork 56
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
Use the correct service name #2666
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2666 +/- ##
=======================================
Coverage 92.60% 92.60%
=======================================
Files 85 85
Lines 3164 3164
Branches 775 775
=======================================
Hits 2930 2930
Misses 183 183
Partials 51 51
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Funny that since we moved to servlet 5, no one complained about this, so either:
Then, the question is: Do we actually need it? |
Should maybe also be cherry picked to 24.4.x? |
At least to 24.4. |
Quality Gate passedIssues Measures |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes the EndpointValidator
registration in the servlet container, making it work for the first time. The purpose of this validator is to verify that Hilla endpoints are used in a Spring Boot application, and to throw an exception if endpoints exist and Spring Boot is not in the classpath.
The CSRF tests thus fail because they are not Spring Boot applications, but they do have an endpoint, which is SignalsHandler
.
There are some possible solutions:
- exclude
SignalsHandler
from the check (this is related to feat: add endpoint detection #2938 and the need of correctly identify the internal endpoints, as inhilla/packages/java/endpoint/src/main/java/com/vaadin/hilla/EndpointController.java
Lines 134 to 137 in 0638cb8
endpointBeans.keySet().stream() .filter(name -> !name.equals(SIGNALS_HANDLER_BEAN_NAME)) .findAny().ifPresent(name -> HillaStats.reportHasEndpoint()); - log a warning instead of throwing in
EndpointValidator
; - make
EndpointValidator
optional by configuration.
Some of those changes could not propagate well to some of the cherry-pick target that have been selected for this PR. |
Also, given that it uses a |
I'm in favor of logging a warning instead of throwing in EndpointValidator. A visible enough warning + documentation should be enough. |
I still see this as a sort of duplicate of #2938. While they serve different purposes, the check for the presence of Spring could be added at the same place instead of having to declare a dedicated listener. |
No longer needed after #3167 |
No description provided.