This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 4ef5ec92ef70 [SPARK-48424][INFRA] Make dev/is-changed.py to return 
true it it fails
4ef5ec92ef70 is described below

commit 4ef5ec92ef70fffa231b422c7da17c4438e95d0d
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Mon May 27 10:28:06 2024 +0900

    [SPARK-48424][INFRA] Make dev/is-changed.py to return true it it fails
    
    ### What changes were proposed in this pull request?
    
    This PR proposes to make dev/is-changed.py to return true it it fails
    
    ### Why are the changes needed?
    
    To make the test robust. GitHub Actions sometimes fail to set the hash for 
commit properly, e.g., 
https://github.com/apache/spark/actions/runs/9244026522/job/25435224163?pr=46747
    
    ### Does this PR introduce _any_ user-facing change?
    
    ### How was this patch tested?
    
    Manually tested:
    
    ```bash
    GITHUB_SHA=a29c9653f3d48d97875ae446d82896bdf0de61ca 
GITHUB_PREV_SHA=0000000000000000000000000000000000000000 ./dev/is-changed.py -m 
root
    ```
    
    ```bash
    a=`GITHUB_SHA=a29c9653f3d48d97875ae446d82896bdf0de61ca 
GITHUB_PREV_SHA=0000000000000000000000000000000000000000 ./dev/is-changed.py -m 
root`
    echo $a
    ```
    
    ```bash
    GITHUB_SHA=a29c9653f3d48d97875ae446d82896bdf0de61ca 
GITHUB_PREV_SHA=3346afd4b250c3aead5a237666d4942018a463e0 ./dev/is-changed.py -m 
root
    ```
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #46749 from HyukjinKwon/SPARK-48424.
    
    Authored-by: Hyukjin Kwon <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 dev/is-changed.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dev/is-changed.py b/dev/is-changed.py
index 85f0d3cda6df..1962e244d5dd 100755
--- a/dev/is-changed.py
+++ b/dev/is-changed.py
@@ -17,6 +17,8 @@
 # limitations under the License.
 #
 
+import warnings
+import traceback
 import os
 import sys
 from argparse import ArgumentParser
@@ -82,4 +84,8 @@ def main():
 
 
 if __name__ == "__main__":
-    main()
+    try:
+        main()
+    except Exception:
+        warnings.warn(f"Ignored exception:\n\n{traceback.format_exc()}")
+        print("true")


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

Reply via email to