Skip to content

Commit

Permalink
Bump dependencies and fix test that fails locally (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
geir-waagboe authored Jan 26, 2024
1 parent d8f594c commit cc4e449
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 57 deletions.
4 changes: 2 additions & 2 deletions .nais/naiserator-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ spec:
limits:
memory: 1024Mi
requests:
cpu: 200m
memory: 512Mi
cpu: 10m
memory: 128Mi
replicas:
min: 2
max: 4
Expand Down
2 changes: 1 addition & 1 deletion .nais/naiserator-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
limits:
memory: 1024Mi
requests:
cpu: 200m
cpu: 100m
memory: 512Mi
replicas:
min: 2
Expand Down
67 changes: 16 additions & 51 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ object Versions {
const val isdialogmoteSchema = "1.0.5"
const val jacksonDataType = "2.15.3"
const val jedis = "5.0.1"
const val kafka = "3.6.0"
const val json = "20231013"
const val kafka = "3.6.1"
const val kafkaEmbedded = "3.2.3"
const val kluent = "1.73"
const val ktor = "2.3.5"
const val logback = "1.4.11"
const val ktor = "2.3.7"
const val logback = "1.4.14"
const val logstashEncoder = "7.4"
const val mockk = "1.13.8"
const val micrometerRegistry = "1.11.5"
const val nimbusjosejwt = "9.37"
const val micrometerRegistry = "1.12.0"
const val nimbusjosejwt = "9.37.2"
val postgresEmbedded = if (Os.isFamily(Os.FAMILY_MAC)) "1.0.0" else "0.13.4"
const val postgres = "42.5.1"
const val postgres = "42.6.0"
const val redisEmbedded = "0.7.3"
const val scala = "2.13.12"
const val spek = "2.0.19"
}

plugins {
kotlin("jvm") version "1.9.10"
kotlin("jvm") version "1.9.22"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.jlleitschuh.gradle.ktlint") version "11.6.0"
id("com.github.davidmc24.gradle.plugin.avro") version "1.8.0"
Expand Down Expand Up @@ -67,6 +67,7 @@ dependencies {
// Logging
implementation("ch.qos.logback:logback-classic:${Versions.logback}")
implementation("net.logstash.logback:logstash-logback-encoder:${Versions.logstashEncoder}")
implementation("org.json:json:${Versions.json}")

// Metrics and Prometheus
implementation("io.ktor:ktor-server-metrics-micrometer:${Versions.ktor}")
Expand All @@ -91,50 +92,19 @@ dependencies {
}
implementation("org.apache.kafka:kafka_2.13:${Versions.kafka}", excludeLog4j)
implementation("io.confluent:kafka-avro-serializer:${Versions.confluent}", excludeLog4j)
implementation("io.confluent:kafka-schema-registry:${Versions.confluent}", excludeLog4j)
constraints {
implementation("org.scala-lang:scala-library") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2022-36944")
version {
strictly(Versions.scala)
}
}
implementation("org.yaml:snakeyaml") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://nvd.nist.gov/vuln/detail/CVE-2022-1471")
version {
require("2.0")
}
}
implementation("org.glassfish:jakarta.el") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://advisory.checkmarx.net/advisory/vulnerability/CVE-2021-28170/")
version {
require("3.0.4")
}
}
implementation("com.google.protobuf:protobuf-java") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2021-22569")
version {
require("3.21.7")
}
}
implementation("com.google.code.gson:gson") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2022-25647")
version {
require("2.8.9")
}
}
implementation("org.json:json") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://nvd.nist.gov/vuln/detail/CVE-2022-45688")
version {
require("20231013")
}
}
implementation("org.apache.zookeeper:zookeeper") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-44981")
version {
require("3.9.1")
}
}
implementation("org.apache.avro:avro") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2023-39410")
version {
require("1.11.3")
}
}
}
implementation("no.nav.syfo.dialogmote.avro:isdialogmote-schema:${Versions.isdialogmoteSchema}")
testImplementation("no.nav:kafka-embedded-env:${Versions.kafkaEmbedded}", excludeLog4j)
Expand All @@ -145,12 +115,6 @@ dependencies {
require("9.4.48.v20220622")
}
}
implementation("com.google.protobuf:protobuf-java") {
because("io.confluent:kafka-schema-registry:${Versions.confluent} -> https://www.cve.org/CVERecord?id=CVE-2021-22569")
version {
require("3.21.7")
}
}
}

testImplementation("com.nimbusds:nimbus-jose-jwt:${Versions.nimbusjosejwt}")
Expand Down Expand Up @@ -186,6 +150,7 @@ tasks {

withType<KotlinCompile> {
dependsOn(":generateAvroJava")
dependsOn(":generateTestAvroJava")
}

withType<Test> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ object ReaperCronjobSpek : Spek({
}

it("reset tildelt veileder for personer with tilfelle that ended three months ago") {
val threeMonthsAgo = LocalDate.now().minusMonths(3)
val threeMonthsAgo = LocalDate.now().minusMonths(3).minusDays(1)
val personOversiktStatus = generatePersonOversiktStatusWithTilfelleEnd(threeMonthsAgo)
database.createPersonOversiktStatus(personOversiktStatus)
database.setSistEndret(
fnr = personOversiktStatus.fnr,
sistEndret = Timestamp.from(OffsetDateTime.now().minusMonths(3).toInstant()),
sistEndret = Timestamp.from(OffsetDateTime.now().minusMonths(3).minusDays(1).toInstant()),
)

runBlocking {
Expand Down Expand Up @@ -100,7 +100,7 @@ fun generatePersonOversiktStatusWithTilfelleEnd(tilfelleEnd: LocalDate): PersonO
veilederIdent = "Z999999",
oppfolgingstilfelleUpdatedAt = OffsetDateTime.now(),
oppfolgingstilfelleGeneratedAt = OffsetDateTime.now(),
oppfolgingstilfelleStart = LocalDate.now(),
oppfolgingstilfelleStart = tilfelleEnd.minusDays(14),
oppfolgingstilfelleEnd = tilfelleEnd,
oppfolgingstilfelleBitReferanseInntruffet = OffsetDateTime.now(),
oppfolgingstilfelleBitReferanseUuid = UUID.randomUUID(),
Expand Down

0 comments on commit cc4e449

Please sign in to comment.