[ 
https://issues.apache.org/jira/browse/IMPALA-11366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17556512#comment-17556512
 ] 

ASF subversion and git services commented on IMPALA-11366:
----------------------------------------------------------

Commit 29e91220a2a1fcda0b35cddfa11492312b338743 in impala's branch 
refs/heads/master from stiga-huang
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=29e91220a ]

IMPALA-11366: Fix impala-shell build failure if the build date contains 
Non-ASCII characters

The version string is generated in bin/save-version.sh where the
BUILD_TIME is the result of `date` command. It could contain Non-ASCII
characters depending on the locale. The date string is then used in
generating impala_build_version.py. So we need to explicitly set the
script's encoding to utf-8.

Change-Id: I596121e08a52a4bc6d8668cf7e8b61b6c34eb4b9
Reviewed-on: http://gerrit.cloudera.org:8080/18632
Reviewed-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Gergely Fürnstáhl <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> Impala-shell failed to build if the build date contains Non-ASCII characters
> ----------------------------------------------------------------------------
>
>                 Key: IMPALA-11366
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11366
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Quanlong Huang
>            Assignee: Quanlong Huang
>            Priority: Major
>
> I encountered a build failure locally:
> {code:bash}
> Building package...
> Traceback (most recent call last):
>   File "setup.py", line 30, in <module>
>     from impala_shell import impala_build_version
>   File 
> "/home/quanlong/workspace/Impala/shell/packaging/staging/impala_shell_package/impala_shell/impala_build_version.py",
>  line 26
> SyntaxError: Non-ASCII character '\xe5' in file 
> /home/quanlong/workspace/Impala/shell/packaging/staging/impala_shell_package/impala_shell/impala_build_version.py
>  on line 26, but no encoding declared; see 
> http://python.org/dev/peps/pep-0263/ for details{code}
> line 26 at 
> shell/packaging/staging/impala_shell_package/impala_shell/impala_build_version.py
>  does contain Non-ASCII characters:
> {code:python}
>  19 def get_version():
>  20   return "4.2.0-SNAPSHOT"
>  21 
>  22 def get_git_hash():
>  23   return "2b9d986582198903bac63e9ce8dc31c06742d3ee"
>  24 
>  25 def get_build_date():
>  26   return "2022年 06月 17日 星期五 08:26:01 CST"
> {code}
> It's generated in bin/save-version.sh using the {{date}} command:
> {code}
> BUILD_TIME=`date`
> HEADER="# Generated version information from save-version.sh"
> echo -e \
> "${HEADER}\nVERSION: ${VERSION}\nGIT_HASH: ${GIT_HASH}\nBUILD_TIME: 
> ${BUILD_TIME}"\
> > $IMPALA_HOME/bin/version.info
> {code}
> It's legal to contain Non-ASCII characters depending on the locales.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to