HIVE-28937: Static analysis issues fixed in shell scripts#5797
Conversation
More info: - https://github.com/koalaman/shellcheck/wiki/SC2086 - https://github.com/koalaman/shellcheck/wiki/SC2125 - https://github.com/koalaman/shellcheck/wiki/SC2223 Signed-off-by: Raviteja Lokineni <raviteja.lokineni@verint.com>
|
okumin
left a comment
There was a problem hiding this comment.
I tested it in the following way.
Build a snapshot Hive
mvn clean package -Dmaven.javadoc.skip=true -DskipTests -Pdist
Build an image
./packaging/src/docker/build.sh
Test HS2
docker run -it --rm --env SERVICE_NAME=hiveserver2 --name hive apache/hive:4.1.0-SNAPSHOT
|
@okumin thanks, who is going to be merging this PR? |
|
I'll ignore the CI failure because this PR is very unrelated to our unit or integration tests |
|
@bond- Merged. Thanks for your contributions! It looks like you're trying to create a minimal Docker image to expose HMS. I personally think it is an important step to have production-grade images of Hive. I'm willing to help you. Thanks. |
|
@okumin sure more the better, let me know how you would like to collaborate? Slack? |
|
@bond- |



What changes were proposed in this pull request?
This pull request addresses several static analysis issues identified in the shell scripts located in the
packagingfolder. The issues were detected using ShellCheck and include:Why are the changes needed?
These changes are necessary to ensure that the shell scripts in the
packagingfolder adhere to best practices and avoid potential issues related to globbing, word splitting, brace expansion, and string concatenation. Addressing these issues will improve the reliability and maintainability of the scripts.Does this PR introduce any user-facing change?
No, this PR does not introduce any user-facing changes. It solely focuses on improving the internal shell scripts.
How was this patch tested?
The patch was tested by running ShellCheck on the modified shell scripts to ensure that the identified issues were resolved. Additionally, the scripts were manually tested to verify that they function correctly after the changes.