Skip to content

Commit

Permalink
Fix populate it data (#5260)
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones authored Feb 20, 2024
1 parent d122b1d commit 713842d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/populate-it-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
CLOUDSQL_SQLSERVER_PASSWORD: ${{ secrets.CLOUDSQL_SQLSERVER_PASSWORD }}

- name: Populate GCS test data
run: sbt integration/runMain com.spotify.scio.PopulateTestData
run: sbt "integration/runMain com.spotify.scio.PopulateTestData"

- name: Populate BQ test data
run: sbt integration/runMain com.spotify.scio.bigquery.PopulateTestData
run: sbt "integration/runMain com.spotify.scio.bigquery.PopulateTestData"

- name: Populate SQL test data
run: sbt integration/runMain com.spotify.scio.jdbc.PopulateTestData
run: sbt "integration/runMain com.spotify.scio.jdbc.PopulateTestData"
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ val commonSettings = Def.settings(
resolvers ++= Resolver.sonatypeOssRepos("public"),
fork := true,
run / outputStrategy := Some(OutputStrategy.StdoutOutput),
run / javaOptions ++= JavaOptions.runDefaults(javaMajorVersion),
Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat,
Test / javaOptions ++= JavaOptions.testDefaults(javaMajorVersion),
Test / testOptions += Tests.Argument("-oD"),
Expand Down
16 changes: 16 additions & 0 deletions project/JavaOptions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,20 @@ object JavaOptions {
"cloudsql.sqlserver.password"
).flatMap(prop => sys.props.get(prop).map(value => property(prop, value)))
)

def runDefaults(javaVersion: Int): Seq[String] =
tokensForVersion(
javaVersion,
Set(
minHeapSize("512m"),
maxHeapSize("2G"),
advanced("+UseParallelGC"),
property("scio.ignoreVersionWarning", "true"),
property("org.slf4j.simpleLogger.defaultLogLevel", "info")
) ++ Set(
"bigquery.project",
"bigquery.secret",
"cloudsql.sqlserver.password"
).flatMap(prop => sys.props.get(prop).map(value => property(prop, value)))
)
}

0 comments on commit 713842d

Please sign in to comment.