-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
feat: Update to Spring Boot 3, stabilize, project & organization delete performance (soft deleting) #1938
Conversation
3424625
to
36f3416
Compare
98967e7
to
9092afc
Compare
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.
Gave a quick look, changes to security config seem all good to me. I didn't look at everything in detail but I picked up some nitpicks that were worth writing down 😅
@@ -30,6 +30,9 @@ jobs: | |||
~/.gradle/wrapper | |||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |||
|
|||
- name: Compile kotlin | |||
run: ./gradlew compileTestKotlin --parallel |
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.
When I tried making CI faster the other day doing this I recall it turned out to significantly increase the time it took to do the initial build job without a clear speed gain on the test run jobs, making everything overall slower. 🤷🏻♀️
} | ||
|
||
private fun List<Language>.toViews(): List<LanguageViewImpl> { | ||
val baseLanguage = projectHolder.projectEntity.baseLanguage |
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.
Couldn't the base language be cached too to avoid pulling the entity from database?
fun deleteAllByProject(projectId: Long) { | ||
findAll(projectId).forEach { | ||
deleteLanguage(it.id) | ||
} | ||
translationService.deleteAllByProject(projectId) | ||
autoTranslationService.deleteConfigsByProject(projectId) | ||
entityManager.createNativeQuery( | ||
"delete from language_stats " + | ||
"where language_id in (select id from language where project_id = :projectId)" | ||
) | ||
.setParameter("projectId", projectId) | ||
.executeUpdate() | ||
entityManager.createNativeQuery("DELETE FROM language WHERE project_id = :projectId") | ||
.setParameter("projectId", projectId) | ||
.executeUpdate() | ||
} |
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.
Shouldn't this belong to repository-level logic?
@@ -204,7 +205,9 @@ class InvitationService @Autowired constructor( | |||
} | |||
|
|||
fun getForOrganization(organization: Organization): List<Invitation> { | |||
return invitationRepository.getAllByOrganizationRoleOrganizationOrderByCreatedAt(organization) | |||
return traceLogMeasureTime("get invitations for organization") { |
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.
Is this intentionally left here?
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.
Yeah, why not :)
45e8d1a
to
87cb59f
Compare
e983ca8
to
844659f
Compare
0e3ac1e
to
0424c51
Compare
e1eae09
to
f8ff623
Compare
ff42e56
to
7d9cd1b
Compare
# [3.41.0](v3.40.0...v3.41.0) (2023-12-15) ### Features * Update to Spring Boot 3, stabilize, project & organization delete performance (soft deleting) ([#1938](#1938)) ([3147302](3147302))
🎉 This PR is included in version 3.41.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.