diff --git a/.github/workflows/populate-it-data.yml b/.github/workflows/populate-it-data.yml index 0238c7c574..7d30c848e4 100644 --- a/.github/workflows/populate-it-data.yml +++ b/.github/workflows/populate-it-data.yml @@ -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" diff --git a/build.sbt b/build.sbt index 1ec2ec6678..5740889266 100644 --- a/build.sbt +++ b/build.sbt @@ -435,6 +435,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"), diff --git a/project/JavaOptions.scala b/project/JavaOptions.scala index 7cbf465d2a..3a4798c086 100644 --- a/project/JavaOptions.scala +++ b/project/JavaOptions.scala @@ -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))) + ) }