gaogaotiantian commented on code in PR #57770:
URL: https://github.com/apache/spark/pull/57770#discussion_r3749933765
##########
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:
Let's bind this guard to the function itself.
```python
if getattr(titled_block, "_entered", False):
raise XX
titled_block._entered = True
try:
yield
finally:
titled_block._entered = False
```
--
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]