-
Notifications
You must be signed in to change notification settings - Fork 8
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
Spring Boot 3 #1623
base: master
Are you sure you want to change the base?
Spring Boot 3 #1623
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1623 +/- ##
============================================
+ Coverage 70.22% 70.27% +0.04%
- Complexity 2007 2010 +3
============================================
Files 254 254
Lines 7902 7908 +6
Branches 745 745
============================================
+ Hits 5549 5557 +8
Misses 2070 2070
+ Partials 283 281 -2 ☔ View full report in Codecov by Sentry. |
// By setting the csrfRequestAttributeName to null, the CsrfToken must first be loaded to determine what | ||
// attribute name to use. This causes the CsrfToken to be loaded on every request. | ||
CsrfTokenRequestAttributeHandler requestHandler = new CsrfTokenRequestAttributeHandler(); | ||
requestHandler.setCsrfRequestAttributeName(null); |
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.
Noting that this change was in response to a change made in Spring 3 that defers the csrf tokens lookup until needed optimising reads of HttpSession
. Although that breaks all requests to FP as 403 error due to csrf token coming as undefined
in request headers. In response, I first implemented the opt out steps mentioned here, that didn't solve the problem completely (Half the times requests were with csrf undefined
and got errored with 403 while on trying again the csrf was there in request payloads, but I could not get to the bottom of why it was happening). Ultimately I decided to completely opt out of deferred tokens behaviour by follow the steps listed here.
@@ -26,7 +26,6 @@ management.health.diskspace.threshold=1073742000 | |||
|
|||
# metrics | |||
management.statsd.metrics.export.flavor=datadog | |||
management.metrics.web.server.request.autotime.enabled=false |
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.
the migration guide mentions "Should be applied at the ObservationRegistry level.". Do we need to do that?
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.
Do you have a reference to this ? I just saw that it's been removed.
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.
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.
More info here: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#micrometer-and-metrics-changes and here: spring-projects/spring-boot#41745
Overall I think this is OK though I don't recall why we turned that metric off.
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.
Overall this looks good to me.
@@ -26,7 +26,6 @@ management.health.diskspace.threshold=1073742000 | |||
|
|||
# metrics | |||
management.statsd.metrics.export.flavor=datadog | |||
management.metrics.web.server.request.autotime.enabled=false |
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.
More info here: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#micrometer-and-metrics-changes and here: spring-projects/spring-boot#41745
Overall I think this is OK though I don't recall why we turned that metric off.
formSessionRepo.saveAndFlush(loaded); | ||
assertThat(loaded.getDateCreated()).isEqualTo(dateCreated); | ||
assertThat(loaded.getVersion()).isEqualTo(2); | ||
assertThat(loaded.getVersion()).isEqualTo(1); |
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.
Can you explain these changes. They don't seem related to the Spring upgrade.
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.
I could not really find the related change documentation for this in hibernate but after upgrading to SB 3, the version doesn't increment unless you make a change to the object. My guess is that the change is caused by shifting to the Jakarta persistence apis from javax but I don't really have a supportive reference here that can explain this change.
…ferred csrf token
…o load the full application context
…be able to check exception messages in tests
This has been on staging for a week and I have not seen anything related, as such I am planning to merge this after tomorrow's deploy so that it will get to prod in next week's deploy. |
Has someone tested SMS forms? |
Not really, are you concerned because of the security changes ? |
yes, that's one place where auth differs from webapps |
Great to know, I will make sure we get that tested. Thanks. |
Technical Summary
JIRA
Update to Spring Boot 3
Safety Assurance
Safety story
QA Plan
https://dimagi.atlassian.net/browse/QA-7246
Special deploy instructions
Rollback instructions
Review