nchammas commented on code in PR #57770:
URL: https://github.com/apache/spark/pull/57770#discussion_r3752351384


##########
dev/run-tests.py:
##########
@@ -69,43 +69,42 @@ def determine_java_executable():
 # 
-------------------------------------------------------------------------------------------------
 
 
-def set_title_and_block(title, err_block):
-    os.environ["CURRENT_BLOCK"] = str(ERROR_CODES[err_block])
-    line_str = "=" * 72
-
-    print("")
-    print(line_str)
-    print(title)
-    print(line_str)
+_in_titled_block = False
 
 
 @contextmanager
-def group_in_github_actions(title):
+def titled_block(title):
+    global _in_titled_block

Review Comment:
   Hmm, that's a neat technique. I see [asyncio uses it][1], though for class 
instances. If you insist, I'll adopt your suggestion.
   
   [1]: 
https://github.com/python/cpython/blob/433c842b39a9b930b7e2d6aafeca722fd68a3323/Lib/asyncio/taskgroups.py#L57-L59
   
   But isn't a global variable more suitable here? It's a much more common 
technique in user code, and in this case we are controlling a "top-level" 
invariant of the script.



-- 
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]

Reply via email to