Skip to content

Conversation

@HyukjinKwon
Copy link
Member

What changes were proposed in this pull request?

This PR proposes to exclude unittest-xml-reporting in Python 3.12 image

Why are the changes needed?

unittest-xml-reporting seems not supporting, and this seems hiding the real error:

  File "/__w/spark/spark/python/pyspark/streaming/tests/test_kinesis.py", line 118, in <module>
    unittest.main(testRunner=testRunner, verbosity=2)
  File "/usr/lib/python3.12/unittest/main.py", line 105, in __init__
    self.runTests()
  File "/usr/lib/python3.12/unittest/main.py", line 281, in runTests
    self.result = testRunner.run(self.test)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/xmlrunner/runner.py", line 67, in run
    test(result)
  File "/usr/lib/python3.12/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.12/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/unittest/suite.py", line 122, in run
    test(result)
  File "/usr/lib/python3.12/unittest/case.py", line 692, in __call__
    return self.run(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/unittest/case.py", line 662, in run
    result.stopTest(self)
  File "/usr/local/lib/python3.12/dist-packages/xmlrunner/result.py", line 327, in stopTest
    self.callback()
  File "/usr/local/lib/python3.12/dist-packages/xmlrunner/result.py", line 235, in callback
    test_info.test_finished()
  File "/usr/local/lib/python3.12/dist-packages/xmlrunner/result.py", line 180, in test_finished
    self.test_result.stop_time - self.test_result.start_time
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_XMLTestResult' object has no attribute 'start_time'. Did you mean: 'stop_time'?

This is optional dependency in testing so we can exclude this (see https://github.com/apache/spark/actions/runs/7462843546/job/20306214215)

Does this PR introduce any user-facing change?

No, dev-only.

How was this patch tested?

CI in this PR should test it out.

Was this patch authored or co-authored using generative AI tooling?

Np.

@github-actions github-actions bot added the BUILD label Jan 10, 2024
@HyukjinKwon
Copy link
Member Author

Merged to master.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, late LGTM. Thank you so much, @HyukjinKwon .

@HyukjinKwon HyukjinKwon deleted the SPARK-46645 branch January 15, 2024 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants