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

Print error log to stderr output #4436

Merged
merged 1 commit into from
Jan 5, 2022
Merged

Conversation

res-life
Copy link
Collaborator

Signed-off-by: Chong Gao res_life@163.com

Signed-off-by: Chong Gao <res_life@163.com>
@res-life
Copy link
Collaborator Author

build

Copy link
Collaborator

@firestarman firestarman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I know why need to do this ?

echo
echo "Check Failed: git revisions between shims are not equal"
echo "Please check the revisions of each shim to see which one is inconsistent. Note, if building with Databricks those jars are built separately."
echo >&2 "Check Failed: git revisions between shims are not equal"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing the original empty echo, who will print a space line.

Copy link
Collaborator Author

@res-life res-life Dec 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a empty line for show, can be removed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add more diagnostics to the log while we are at it? What are the git rev values that are different? What shim_version_path do they originate from?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll update it.

@res-life
Copy link
Collaborator Author

The msg in stderr will be saved in the parameter ${build-parallel-worlds.checkRevisionsErrorMsg}. If not print to stderr, the parameter ${build-parallel-worlds.checkRevisionsErrorMsg} is empty.

See the following:

        <!-- check shims revisions -->
        <exec executable="${project.basedir}/scripts/check-shims-revisions.sh"
              dir="${project.build.directory}"
              resultproperty="build-parallel-worlds.checkRevisionsExitCode"
              errorproperty="build-parallel-worlds.checkRevisionsErrorMsg"
              failonerror="false">
            <arg value="${included_buildvers}"/>
        </exec>
        <fail message="exec check-shims-revisions.sh failed, exit code is ${build-parallel-worlds.checkRevisionsExitCode}, error msg is ${build-parallel-worlds.checkRevisionsErrorMsg}">
            <condition>
                <not>
                    <equals arg1="${build-parallel-worlds.checkRevisionsExitCode}" arg2="0"/>
                </not>
            </condition>
        </fail>

@sameerz sameerz added the build Related to CI / CD or cleanly building label Dec 29, 2021
@gerashegalov
Copy link
Collaborator

The msg in stderr will be saved in the parameter ${build-parallel-worlds.checkRevisionsErrorMsg}. If not print to stderr, the parameter ${build-parallel-worlds.checkRevisionsErrorMsg} is empty.

I missed that in the review too, although I thought I saw this working. Did you test it?

@res-life
Copy link
Collaborator Author

res-life commented Dec 31, 2021

I missed that in the review too, although I thought I saw this working. Did you test it?

Yes, tested, it works. If versions are inconsistent , the error is

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.0.0:run (create-parallel-world) on project rapids-4-spark_2.12: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /home/chong/code/spark-rapids/dist/maven-antrun/build-parallel-worlds.xml:134: exec check-shims-revisions.sh failed, exit code is 1, error msg is Check Failed: git revisions between shims are not equal
[ERROR] Please check the revisions of each shim to see which one is inconsistent. Note, if building with Databricks those jars are built separately.
[ERROR] around Ant part ...<ant antfile="/home/chong/code/spark-rapids/dist/maven-antrun/build-parallel-worlds.xml" target="build-parallel-worlds" />... @ 9:127 in /home/chong/code/spark-rapids/dist/target/antrun/build-main.xml
[ERROR] -> [Help 1]

@res-life
Copy link
Collaborator Author

res-life commented Jan 4, 2022

build

1 similar comment
@res-life
Copy link
Collaborator Author

res-life commented Jan 4, 2022

build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to CI / CD or cleanly building
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants