-
Notifications
You must be signed in to change notification settings - Fork 382
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
[#5976] Improvement(bin):Add validation checks to the startup scripts to prevent incorrect usage #5977
base: main
Are you sure you want to change the base?
Conversation
…cripts to prevent incorrect usage
… from bin/common.sh
This smells like an over engineering effort although I do appreciate the intention. |
@liuchunhao Thank you for your improve user experience. |
bin/common.sh
Outdated
echo "GRAVITINO_VERSION is not set. Please make sure you are running the script from the distribution/package/bin and before running the script, run './gradle clean build -x test compileDistribution'" | ||
exit 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.
Please update the prompt message:
No GRAVITINO_VERSION was found, you may need to:
1. Run the gravitino.sh script on the compiled Gravitino.
2. Run the gravitino.sh script in the release package.
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.
Thank you for the feedback. I will make the updates as required:
- Update the error message for startup failures
- Adjust the version check
- Revert the root build.gradle.kts files
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.
"Run the gravitino.sh script in the release package." this may not be the best instructions, as an ASF release package is source, not binary.
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.
What does 'release package' mean? Should it instead be referred to as a 'distribution package'?
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.
@justinmclean The problem is that there are some users who run gravitino.sh scripts without compiling, causing them to fail. We want to give them some tips. Do you have any better suggestions?
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.
Ask them to use a binary distribution or compile it first? i.e:
- Run the gravitino.sh script in a compiled version of Gravitino.
- Run the gravitino.sh script from a binary release package.
…failures /Adjust the version check /Revert the root build.gradle.kts files
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 will use your PR to test, because gravitino.sh
is very important.
So, I need some time to review this PR. Thanks.
I ran |
hi @liuchunhao
|
What changes were proposed in this pull request?
#5976
Add file suffix ‘template’ to the following scripts:
Add a validation check on
GRAVITINO_VERSION
in the script bin/common.sh ( renamed to bin/common.sh.template ) with the followings :Update the following tasks in the root build.gradle.kts as described below :
Why are the changes needed?
To prevent incorrect usage with startup scripts
Does this PR introduce any user-facing change?
No
How was this patch tested?
cd bin gravitino.sh.template start gravitino-iceberg-rest-server.sh.template start