NoahKusaba commented on code in PR #2473:
URL:
https://github.com/apache/datafusion-ballista/pull/2473#discussion_r4077448698
##########
dev/release/run-rat.sh:
##########
@@ -31,7 +31,15 @@ RELEASE_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
# generate the rat report
$RAT $1 > rat.txt
-python $RELEASE_DIR/check-rat-report.py $RELEASE_DIR/rat_exclude_files.txt
rat.txt > filtered_rat.txt
+python3 $RELEASE_DIR/check-rat-report.py $RELEASE_DIR/rat_exclude_files.txt
rat.txt > filtered_rat.txt
+CHECK_STATUS=$?
+
+# 0 = approved, 1 = unapproved files (reported below), anything else = did not
run.
+if [ "${CHECK_STATUS}" -ne 0 ] && [ "${CHECK_STATUS}" -ne 1 ]; then
Review Comment:
Good catch, thanks. That's exactly the silent pass this PR was meant to
remove, just one level down. Rather than adding another exit-code branch, I
changed the check to decide from the exit status and the `NOT APPROVED` lines
together: exit 0 passes, a nonzero exit with `NOT APPROVED` lines reports them,
and a nonzero exit without any is reported as the checker failing. That covers
your case and replaces the earlier "not 0 or 1" branch. While there I also made
it fail when `java -jar` itself fails, and switched the download to `curl
-sSfL`. Without `-f`, a 404 page was saved as the jar and then reused on every
later run, because the file existed. I checked each case (empty report, RAT
failing, `python3` missing, 404 download) against a stubbed RAT.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]