Skip to content

Commit 23892a5

Browse files
authored
Add check for java 11 when building gcp jars and add sbt clean (#233)
## Summary ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update Tested: ``` (dev_chronon) davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/check_for_java11) $ asdf local java corretto-17.0.13.11.1 (dev_chronon) davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/check_for_java11) $ asdf reshim java corretto-17.0.13.11.1 j(dev_chronon) davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/check_for_java11) $ javac --version javac 17.0.13 (dev_chronon) davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/check_for_java11) $ python api/py/ai/chronon/repo/run.py --mode upload --conf production/group_bys/quickstart/purchases.v1 --ds 2023-12-01 --dataproc (dev_chronon) davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/check_for_java11) $ (dev_chronon) davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/check_for_java11) $ bash distribution/build_and_upload_gcp_artifacts.sh canary Working in /Users/davidhan/zipline/chronon Building wheel Failed major version of 17. Expecting java version of at least 11. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added commands for generating Python code from Thrift files in the build script. - Introduced a clean command to prepare the build environment before assembly tasks. - Added validation for the existence of the Zipline wheel file after building. - **Chores** - Updated build configuration to target Java 11 compiler settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 00eec62 commit 23892a5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

build.sbt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@ lazy val flink = project
244244
)
245245

246246
// GCP requires java 11, can't cross compile higher
247+
248+
javacOptions ++= Seq("-source", "11", "-target", "11")
249+
247250
lazy val cloud_gcp = project
248251
.dependsOn(api % ("compile->compile;test->test"), online, spark % ("compile->compile;test->test"))
249252
.settings(

distribution/build_and_upload_gcp_artifacts.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ if [[ EXPECTED_MINIMUM_MINOR_PYTHON_VERSION -gt MINOR_PYTHON_VERSION ]] ; then
2424
exit 1
2525
fi
2626

27+
2728
thrift --gen py -out api/py/ api/thrift/common.thrift
2829
thrift --gen py -out api/py/ api/thrift/api.thrift
2930
thrift --gen py -out api/py/ api/thrift/observability.thrift
@@ -35,6 +36,7 @@ if [ ! -f "$EXPECTED_ZIPLINE_WHEEL" ]; then
3536
fi
3637

3738
echo "Building jars"
39+
sbt clean
3840
sbt cloud_gcp/assembly
3941
sbt cloud_gcp_submitter/assembly
4042

0 commit comments

Comments
 (0)