Skip to content
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

[Improvement] Add validation checks to the startup scripts to prevent incorrect usage #5976

Open
liuchunhao opened this issue Dec 24, 2024 · 1 comment
Assignees
Labels
0.8.0 Release v0.8.0 improvement Improvements on everything

Comments

@liuchunhao
Copy link
Contributor

What would you like to be improved?

For users who are new to Gravitino, many attempt to launch Gravitino services using the script located at /gravitino/bin, such as /gravitino/bin/gravitino.sh, which is only a script template.

The correct way is to run ./gradlew clean build -x test compileDistribution, which will compile and generate all artifacts into the directory /gravitino/distribution/package, including /gravitino/distribution/package/bin/gravitino.sh.
Then you can use /gravitino/distribution/package/bin/gravitino.sh to launch the services.

How should we improve?

To avoid the above misuse, we have a few suggestions to prevent mistakes:

  1. Add a .template extension to the scripts bin/gravitino.sh, gravitino-iceberg-rest-server.sh, and common.sh to ensure they cannot be run by accident.
  2. Add a check for the GRAVITINO_VERSION environment variable in the gravitino.sh.template and gravitino-iceberg-rest-server.sh.template scripts. If GRAVITINO_VERSION is not assigned, print an error message and exit the script.
  3. Ensure that only the scripts in the distribution/package/bin/ directory have the GRAVITINO_VERSION environment variable set.
@liuchunhao liuchunhao added the improvement Improvements on everything label Dec 24, 2024
@liuchunhao
Copy link
Contributor Author

I would like to work on this

liuchunhao added a commit to liuchunhao/gravitino that referenced this issue Dec 24, 2024
liuchunhao added a commit to liuchunhao/gravitino that referenced this issue Dec 24, 2024
@xunliu xunliu added the 0.8.0 Release v0.8.0 label Dec 25, 2024
liuchunhao added a commit to liuchunhao/gravitino that referenced this issue Dec 25, 2024
…failures /Adjust the version check /Revert the root build.gradle.kts files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.8.0 Release v0.8.0 improvement Improvements on everything
Projects
None yet
Development

No branches or pull requests

2 participants