-
Notifications
You must be signed in to change notification settings - Fork 0
Add check for java 11 when building gcp jars and add sbt clean #233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe pull request modifies the Changes
Possibly related PRs
Suggested reviewers
Poem
Warning Review ran into problems🔥 ProblemsGitHub Actions: Resource not accessible by integration - https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository. Please grant the required permissions to the CodeRabbit GitHub App under the organization or repository settings. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (6)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (1)
distribution/build_and_upload_gcp_artifacts.sh
(2 hunks)
🔇 Additional comments (1)
distribution/build_and_upload_gcp_artifacts.sh (1)
46-46
: LGTM!Good addition of
sbt clean
before assembly commands.
# Check for java 11 because gcp requires java 11 | ||
MAJOR_JAVA_VERSION=$(javac --version | cut -d " " -f2 | cut -d "." -f 1) | ||
EXPECTED_JAVA_VERSION=11 | ||
if [[ $MAJOR_JAVA_VERSION -gt $EXPECTED_JAVA_VERSION ]] ; then | ||
echo "Failed java major version of $MAJOR_JAVA_VERSION. Expecting java version of at least $EXPECTED_JAVA_VERSION." | ||
exit 1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix Java version check logic.
The check fails for Java versions > 11, contradicting the requirement of "Java 11 or higher".
-if [[ $MAJOR_JAVA_VERSION -gt $EXPECTED_JAVA_VERSION ]] ; then
- echo "Failed java major version of $MAJOR_JAVA_VERSION. Expecting java version of at least $EXPECTED_JAVA_VERSION."
+if [[ $MAJOR_JAVA_VERSION -lt $EXPECTED_JAVA_VERSION ]] ; then
+ echo "Failed java major version of $MAJOR_JAVA_VERSION. Expecting java version of at least $EXPECTED_JAVA_VERSION."
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
# Check for java 11 because gcp requires java 11 | |
MAJOR_JAVA_VERSION=$(javac --version | cut -d " " -f2 | cut -d "." -f 1) | |
EXPECTED_JAVA_VERSION=11 | |
if [[ $MAJOR_JAVA_VERSION -gt $EXPECTED_JAVA_VERSION ]] ; then | |
echo "Failed java major version of $MAJOR_JAVA_VERSION. Expecting java version of at least $EXPECTED_JAVA_VERSION." | |
exit 1 | |
fi | |
# Check for java 11 because gcp requires java 11 | |
MAJOR_JAVA_VERSION=$(javac --version | cut -d " " -f2 | cut -d "." -f 1) | |
EXPECTED_JAVA_VERSION=11 | |
if [[ $MAJOR_JAVA_VERSION -lt $EXPECTED_JAVA_VERSION ]] ; then | |
echo "Failed java major version of $MAJOR_JAVA_VERSION. Expecting java version of at least $EXPECTED_JAVA_VERSION." | |
exit 1 | |
fi |
if [[ $MAJOR_JAVA_VERSION -gt $EXPECTED_JAVA_VERSION ]] ; then | ||
echo "Failed java major version of $MAJOR_JAVA_VERSION. Expecting java version of at least $EXPECTED_JAVA_VERSION." | ||
exit 1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [[ $MAJOR_JAVA_VERSION -gt $EXPECTED_JAVA_VERSION ]] ; then | |
echo "Failed java major version of $MAJOR_JAVA_VERSION. Expecting java version of at least $EXPECTED_JAVA_VERSION." | |
exit 1 | |
fi | |
if [[ ! $MAJOR_JAVA_VERSION -eq $EXPECTED_JAVA_VERSION ]] ; then | |
echo "Failed java major version of $MAJOR_JAVA_VERSION. Expecting java version $EXPECTED_JAVA_VERSION." | |
exit 1 | |
fi |
.tool-versions
Outdated
@@ -1,4 +1,4 @@ | |||
java corretto-17.0.9.8.1 | |||
java corretto-17.0.13.11.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actaully why do we have this change? and shouldn't we be using java 11 corretto?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm yeah we should be keeping java 17 there.
as for using java 11, yeah we should but it's been set to 17 though since beginning i guess
@@ -24,6 +24,14 @@ if [[ EXPECTED_MINIMUM_MINOR_PYTHON_VERSION -gt MINOR_PYTHON_VERSION ]] ; then | |||
exit 1 | |||
fi | |||
|
|||
# Check for java 11 because gcp requires java 11 | |||
MAJOR_JAVA_VERSION=$(javac --version | cut -d " " -f2 | cut -d "." -f 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just checking this would work for java 8 where the versioning looks like 1.8.X
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah no... dang it.
davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/gbu_driver_run) $ javac --version
javac 11.0.25
cut -d " " -f2
-> would return the second keyword 11.0.25
and then
cut -d "." -f 1
-> would return just the 11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can remove this check since i'm enforcing java11 in the build.sbt
@@ -24,6 +24,14 @@ if [[ EXPECTED_MINIMUM_MINOR_PYTHON_VERSION -gt MINOR_PYTHON_VERSION ]] ; then | |||
exit 1 | |||
fi | |||
|
|||
# Check for java 11 because gcp requires java 11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be worth enforcing etc in the build.sbt as well - wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. adding
488a53a
to
0f8acf7
Compare
## 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 -->
## 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 -->
## 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 -->
## 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 -->
…an (#233) ## Summary ## Cheour clientslist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update Tested: ``` (dev_chronon) davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/cheour clients_for_java11) $ asdf local java corretto-17.0.13.11.1 (dev_chronon) davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/cheour clients_for_java11) $ asdf reshim java corretto-17.0.13.11.1 j(dev_chronon) davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/cheour clients_for_java11) $ javac --version javac 17.0.13 (dev_chronon) davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/cheour clients_for_java11) $ python api/py/ai/chronon/repo/run.py --mode upload --conf production/group_bys/quiour clientsstart/purchases.v1 --ds 2023-12-01 --dataproc (dev_chronon) davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/cheour clients_for_java11) $ (dev_chronon) davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/cheour clients_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 -->
Summary
Checklist
Tested:
Summary by CodeRabbit
New Features
Chores