Skip to content

Commit 313655a

Browse files
committed
Merge branch 'main' into FDN-4416-add-openapi-importer
2 parents a38e28f + c7ea47e commit 313655a

7 files changed

Lines changed: 26 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ jobs:
1414
strategy:
1515
matrix:
1616
java: [ '17' ]
17-
scala: [ '3.4.2' ]
17+
scala: [ '3.7.3' ]
1818
steps:
1919
- uses: actions/checkout@v2
2020
- name: Set up JDK
2121
uses: actions/setup-java@v2
2222
with:
2323
java-version: ${{ matrix.java }}
2424
distribution: 'zulu'
25+
- name: Install sbt
26+
uses: sbt/setup-sbt@v1
2527
- name: Build
2628
run: |
2729
docker run -d -p 127.0.0.1:5432:5432 flowcommerce/apibuilder-postgresql:latest-pg15

api/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ WORKDIR /opt/play
44
RUN sbt 'project api' clean stage
55

66
FROM flowcommerce/play_java17:latest
7+
RUN wget -q https://cdn.flow.io/util/environment-provider/environment-provider.jar -O /root/environment-provider.jar && test -s /root/environment-provider.jar
78
COPY --from=builder /opt/play /opt/play
89
WORKDIR /opt/play/api/target/universal/stage
910
ENTRYPOINT ["java", "-jar", "/root/environment-provider.jar", "--service", "play", "apibuilder-api", "bin/apibuilder-api"]

api/app/processor/ScheduleMigrateVersionsProcessor.scala

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,20 @@ class ScheduleMigrateVersionsProcessor @Inject()(
2828
s"""
2929
|select v.guid
3030
| from versions v
31-
| join applications apps on apps.guid = v.application_guid and apps.deleted_at is null
31+
| join applications apps on apps.guid = v.application_guid
32+
| and apps.deleted_at is null
3233
| left join cache.services on services.deleted_at is null
33-
| and services.version_guid = v.guid
34-
| and services.version = {service_version}
34+
| and services.version_guid = v.guid
35+
| and services.version = {service_version}
3536
| where v.deleted_at is null
3637
| and services.guid is null
37-
| and v.guid not in (select type_id::uuid from tasks where type = {task_type})
38-
|limit $Limit
38+
| and not exists (
39+
| select 1
40+
| from tasks
41+
| where type = {task_type}
42+
| and type_id = v.guid::text
43+
| )
44+
| limit $Limit
3945
|""".stripMargin
4046
).bind("service_version", MigrateVersion.ServiceVersionNumber)
4147
.bind("task_type", TaskType.MigrateVersion.toString)

app/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ WORKDIR /opt/play
44
RUN sbt 'project app' clean stage
55

66
FROM flowcommerce/play_java17:latest
7+
RUN wget -q https://cdn.flow.io/util/environment-provider/environment-provider.jar -O /root/environment-provider.jar && test -s /root/environment-provider.jar
78
COPY --from=builder /opt/play /opt/play
89
WORKDIR /opt/play/app/target/universal/stage
910
ENTRYPOINT ["java", "-jar", "/root/environment-provider.jar", "--service", "play", "apibuilder-app", "bin/apibuilder-app"]

app/app/lib/MemberDownload.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package lib
22

3-
import com.github.tototoshi.csv.{CSVFormat, CSVWriter}
4-
import com.github.tototoshi.csv.defaultCSVFormat
3+
import com.github.tototoshi.csv.{CSVFormat, CSVWriter, DefaultCSVFormat}
54

65
import java.io.File
76
import io.apibuilder.api.v0.models.Membership
@@ -17,7 +16,8 @@ case class MemberDownload(
1716
def csv()(implicit ec: ExecutionContext): Future[File] = Future {
1817
val file = File.createTempFile(s"member-download-$orgKey", "csv")
1918

20-
val writer = CSVWriter.open(file)(using defaultCSVFormat)
19+
given CSVFormat = new DefaultCSVFormat {}
20+
val writer = CSVWriter.open(file)
2121
writer.writeRow(Seq("guid", "role", "user_guid", "user_email", "user_nickname", "user_name"))
2222

2323
Pager.eachPage[Membership] { offset =>

build.sbt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ lazy val generated = project
106106
libraryDependencies ++= Seq(
107107
ws,
108108
jdbc,
109-
"com.github.mbryzek" % "lib-query" % "0.0.5",
110-
"com.github.mbryzek" % "lib-util" % "0.0.16",
109+
"com.github.mbryzek" % "lib-query" % "0.0.14",
110+
"com.github.mbryzek" % "lib-util" % "0.0.24",
111111
"joda-time" % "joda-time" % "2.14.0",
112112
"org.playframework.anorm" %% "anorm-postgres" % "2.7.0",
113113
"org.postgresql" % "postgresql" % "42.7.7",
@@ -140,10 +140,10 @@ lazy val api = project
140140
"com.google.inject" % "guice" % "5.1.0",
141141
"com.google.inject.extensions" % "guice-assistedinject" % "5.1.0",
142142
"org.projectlombok" % "lombok" % "1.18.42" % "provided",
143-
("com.github.mbryzek" % "lib-cipher" % "0.0.8").cross(CrossVersion.for3Use2_13),
144-
"com.github.mbryzek" % "lib-util" % "0.0.16",
143+
"com.github.mbryzek" % "lib-cipher" % "0.0.13",
144+
"com.github.mbryzek" % "lib-util" % "0.0.24",
145145
"com.sendgrid" % "sendgrid-java" % "4.10.3",
146-
"com.github.mbryzek" % "lib-query" % "0.0.5",
146+
"com.github.mbryzek" % "lib-query" % "0.0.14",
147147
"com.rollbar" % "rollbar-java" % "2.0.0",
148148
"org.scalatestplus.play" %% "scalatestplus-play" % "7.0.1" % Test,
149149
"com.github.tomakehurst" % "wiremock-standalone" % "3.0.1" % Test

generated/app/db/GeneratorInvocationsDao.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ class GeneratorInvocationsDao @javax.inject.Inject() (override val db: play.api.
196196

197197
import anorm.postgresql.*
198198

199-
private val pkeyGenerator: com.mbryzek.util.IdGenerator = {
200-
com.mbryzek.util.IdGenerator("gni")
199+
private val pkeyGenerator: com.bryzek.util.IdGenerator = {
200+
com.bryzek.util.IdGenerator("gni")
201201
}
202202

203203
def randomPkey: String = {

0 commit comments

Comments
 (0)