From b3e9daad50ea0d2774f5736cddbc5161934ac521 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 18:50:18 +0000 Subject: [PATCH 1/2] chore(deps): bump the minor group across 1 directory with 5 updates Bumps the minor group with 5 updates in the /backend directory: | Package | From | To | | --- | --- | --- | | org.flywaydb:flyway-database-postgresql | `10.20.1` | `10.21.0` | | [org.jetbrains.exposed:exposed-spring-boot-starter](https://github.com/JetBrains/Exposed) | `0.55.0` | `0.56.0` | | [org.jetbrains.exposed:exposed-jdbc](https://github.com/JetBrains/Exposed) | `0.55.0` | `0.56.0` | | [org.jetbrains.exposed:exposed-json](https://github.com/JetBrains/Exposed) | `0.55.0` | `0.56.0` | | [org.jetbrains.exposed:exposed-kotlin-datetime](https://github.com/JetBrains/Exposed) | `0.55.0` | `0.56.0` | Updates `org.flywaydb:flyway-database-postgresql` from 10.20.1 to 10.21.0 Updates `org.jetbrains.exposed:exposed-spring-boot-starter` from 0.55.0 to 0.56.0 - [Release notes](https://github.com/JetBrains/Exposed/releases) - [Changelog](https://github.com/JetBrains/Exposed/blob/main/CHANGELOG.md) - [Commits](https://github.com/JetBrains/Exposed/compare/0.55.0...0.56.0) Updates `org.jetbrains.exposed:exposed-jdbc` from 0.55.0 to 0.56.0 - [Release notes](https://github.com/JetBrains/Exposed/releases) - [Changelog](https://github.com/JetBrains/Exposed/blob/main/CHANGELOG.md) - [Commits](https://github.com/JetBrains/Exposed/compare/0.55.0...0.56.0) Updates `org.jetbrains.exposed:exposed-json` from 0.55.0 to 0.56.0 - [Release notes](https://github.com/JetBrains/Exposed/releases) - [Changelog](https://github.com/JetBrains/Exposed/blob/main/CHANGELOG.md) - [Commits](https://github.com/JetBrains/Exposed/compare/0.55.0...0.56.0) Updates `org.jetbrains.exposed:exposed-kotlin-datetime` from 0.55.0 to 0.56.0 - [Release notes](https://github.com/JetBrains/Exposed/releases) - [Changelog](https://github.com/JetBrains/Exposed/blob/main/CHANGELOG.md) - [Commits](https://github.com/JetBrains/Exposed/compare/0.55.0...0.56.0) --- updated-dependencies: - dependency-name: org.flywaydb:flyway-database-postgresql dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor - dependency-name: org.jetbrains.exposed:exposed-spring-boot-starter dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor - dependency-name: org.jetbrains.exposed:exposed-jdbc dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor - dependency-name: org.jetbrains.exposed:exposed-json dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor - dependency-name: org.jetbrains.exposed:exposed-kotlin-datetime dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor ... Signed-off-by: dependabot[bot] --- backend/build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/build.gradle b/backend/build.gradle index e7ee3f5fa..9c0484161 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -37,11 +37,11 @@ dependencies { implementation "org.postgresql:postgresql:42.7.4" implementation "org.apache.commons:commons-csv:1.12.0" implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0" - implementation "org.flywaydb:flyway-database-postgresql:10.20.1" - implementation "org.jetbrains.exposed:exposed-spring-boot-starter:0.55.0" - implementation "org.jetbrains.exposed:exposed-jdbc:0.55.0" - implementation "org.jetbrains.exposed:exposed-json:0.55.0" - implementation "org.jetbrains.exposed:exposed-kotlin-datetime:0.55.0" + implementation "org.flywaydb:flyway-database-postgresql:10.21.0" + implementation "org.jetbrains.exposed:exposed-spring-boot-starter:0.56.0" + implementation "org.jetbrains.exposed:exposed-jdbc:0.56.0" + implementation "org.jetbrains.exposed:exposed-json:0.56.0" + implementation "org.jetbrains.exposed:exposed-kotlin-datetime:0.56.0" implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.6.1" implementation "org.hibernate.validator:hibernate-validator:8.0.1.Final" implementation "org.keycloak:keycloak-admin-client:23.0.7" From b8d01b9806ab008a758f3e9530a13264eb669082 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Tue, 19 Nov 2024 02:57:28 +0100 Subject: [PATCH 2/2] fix breaking changes and lints --- .../seqsetcitations/SeqSetCitationsDatabaseService.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/src/main/kotlin/org/loculus/backend/service/seqsetcitations/SeqSetCitationsDatabaseService.kt b/backend/src/main/kotlin/org/loculus/backend/service/seqsetcitations/SeqSetCitationsDatabaseService.kt index 6c3de15b2..6a6ddddd3 100644 --- a/backend/src/main/kotlin/org/loculus/backend/service/seqsetcitations/SeqSetCitationsDatabaseService.kt +++ b/backend/src/main/kotlin/org/loculus/backend/service/seqsetcitations/SeqSetCitationsDatabaseService.kt @@ -85,7 +85,7 @@ class SeqSetCitationsDatabaseService( .insert { it[SeqSetRecordsTable.accession] = record.accession it[SeqSetRecordsTable.type] = record.type - it[SeqSetRecordsTable.isFocal] = record.isFocal ?: true + it[SeqSetRecordsTable.isFocal] = record.isFocal } SeqSetToRecordsTable .insert { @@ -119,6 +119,7 @@ class SeqSetCitationsDatabaseService( .where { SeqSetsTable.seqSetId eq seqSetId and (SeqSetsTable.createdBy eq username) } .firstOrNull() ?.get(SeqSetsTable.seqSetVersion.max()) + as Long? if (maxVersion == null) { throw NotFoundException("SeqSet $seqSetId does not exist") @@ -158,7 +159,7 @@ class SeqSetCitationsDatabaseService( .insert { it[SeqSetRecordsTable.accession] = record.accession it[SeqSetRecordsTable.type] = record.type - it[SeqSetRecordsTable.isFocal] = record.isFocal ?: true + it[SeqSetRecordsTable.isFocal] = record.isFocal } insertedRecord[SeqSetRecordsTable.seqSetRecordId] } else { @@ -469,7 +470,7 @@ class SeqSetCitationsDatabaseService( val (accession, version) = it.accession.split('.') AccessionVersion(accession, version.toLong()) } - } catch (e: NumberFormatException) { + } catch (_: NumberFormatException) { throw UnprocessableEntityException("Accession versions must be integers") }