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

feat: Update to Spring Boot 3, stabilize, project & organization delete performance (soft deleting) #1938

Merged
merged 123 commits into from
Dec 15, 2023

Conversation

JanCizmar
Copy link
Contributor

No description provided.

@JanCizmar JanCizmar changed the title fix: Disable open in view, update tomcat fix: Update to Spring 3, stabilize Oct 10, 2023
@JanCizmar JanCizmar force-pushed the jancizmar/stabilize branch 2 times, most recently from 3424625 to 36f3416 Compare October 20, 2023 17:10
@JanCizmar JanCizmar force-pushed the jancizmar/stabilize branch 2 times, most recently from 98967e7 to 9092afc Compare October 27, 2023 14:12
Copy link
Collaborator

@cyyynthia cyyynthia left a 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
Copy link
Collaborator

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
Copy link
Collaborator

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?

Comment on lines 175 to 187
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()
}
Copy link
Collaborator

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") {
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, why not :)

@JanCizmar JanCizmar changed the title fix: Update to Spring 3, stabilize fix: Update to Spring Boot 3 Nov 21, 2023
@JanCizmar JanCizmar marked this pull request as draft November 24, 2023 14:07
@JanCizmar JanCizmar force-pushed the jancizmar/stabilize branch 2 times, most recently from 0e3ac1e to 0424c51 Compare December 7, 2023 12:39
@JanCizmar JanCizmar force-pushed the jancizmar/stabilize branch 2 times, most recently from e1eae09 to f8ff623 Compare December 12, 2023 15:10
@JanCizmar JanCizmar changed the title fix: Update to Spring Boot 3 feat: Update to Spring Boot 3, stabilize, project & organization delete performance (soft deleting) Dec 14, 2023
@JanCizmar JanCizmar marked this pull request as ready for review December 15, 2023 08:21
@JanCizmar JanCizmar merged commit 3147302 into main Dec 15, 2023
28 checks passed
@JanCizmar JanCizmar deleted the jancizmar/stabilize branch December 15, 2023 08:21
TolgeeMachine pushed a commit that referenced this pull request Dec 15, 2023
# [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))
Copy link
Contributor

🎉 This PR is included in version 3.41.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants