Skip to content

Conversation

@gliptak
Copy link
Contributor

@gliptak gliptak commented Aug 19, 2015

WIP

@JoshRosen
Copy link
Contributor

Jenkins, this is ok to test.

@SparkQA
Copy link

SparkQA commented Aug 19, 2015

Test build #41290 has finished for PR 8323 at commit d93e7cd.

  • This patch fails RAT tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class _DelegateIO(object):
    • class _TestInfo(object):
    • class _XMLTestResult(_TextTestResult):
    • class XMLTestRunner(TextTestRunner):

@gliptak
Copy link
Contributor Author

gliptak commented Aug 19, 2015

https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/41290/console
Recording test results
ERROR: Publisher 'Publish JUnit test result report' failed: No test report files were found. Configuration error?
Test FAILed.

Can somebody comment on how is Jenkins configured to look for JUnit results (or did this build fail on RAT)? Thanks

@JoshRosen
Copy link
Contributor

The build failed on RAT:

Could not find Apache license headers in the following files:
 !????? /home/jenkins/workspace/SparkPullRequestBuilder/dev/xmlrunner/__init__.py
 !????? /home/jenkins/workspace/SparkPullRequestBuilder/dev/xmlrunner/xmlrunner.py
[error] running /home/jenkins/workspace/SparkPullRequestBuilder/dev/check-license ; received return code 1

@gliptak
Copy link
Contributor Author

gliptak commented Aug 19, 2015

I just added the headers, xmlrunner is LGPL (and only used to run the tests).

@SparkQA
Copy link

SparkQA commented Aug 19, 2015

Test build #41291 has finished for PR 8323 at commit d4f48ba.

  • This patch fails RAT tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class _DelegateIO(object):
    • class _TestInfo(object):
    • class _XMLTestResult(_TextTestResult):
    • class XMLTestRunner(TextTestRunner):

@gliptak
Copy link
Contributor Author

gliptak commented Aug 20, 2015

Is this a no-go because of the license? Thanks

@mengxr
Copy link
Contributor

mengxr commented Sep 22, 2015

@gliptak Is https://pypi.python.org/pypi/unittest-xml-reporting/1.12.0 an alternative? It is BSD license. We can install the package on Jenkins machines, instead of including the source code in the codebase.

@gliptak
Copy link
Contributor Author

gliptak commented Sep 23, 2015

@mengxr Would installing on Jenkins be independent from the codebase (the import xmlrunner just be available)? Thanks

@mengxr
Copy link
Contributor

mengxr commented Sep 23, 2015

If this new library works, I think we could install it on Spark Jenkins. Could you test it locally and see whether it works?

@gliptak
Copy link
Contributor Author

gliptak commented Sep 23, 2015

I tried this locally and the files were generated. Somebody with visibility on Jenkins might need to comment on file locations ...

@SparkQA
Copy link

SparkQA commented Sep 23, 2015

Test build #42930 has finished for PR 8323 at commit a6b3a5b.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 23, 2015

Test build #42933 has finished for PR 8323 at commit 05e5a37.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 23, 2015

Test build #42935 has finished for PR 8323 at commit 18f5901.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mengxr
Copy link
Contributor

mengxr commented Sep 24, 2015

Please fix Python style issue:

./python/pyspark/streaming/tests.py:1303:13: E128 continuation line under-indented for visual indent

Copy link
Contributor

Choose a reason for hiding this comment

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

this should be aligned with tests,. you can run dev/lint-python to check style locally.

@gliptak
Copy link
Contributor Author

gliptak commented Sep 24, 2015

@mengxr Thanks for the local lint pointer

@SparkQA
Copy link

SparkQA commented Sep 24, 2015

Test build #42980 has finished for PR 8323 at commit e9a711e.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mengxr
Copy link
Contributor

mengxr commented Sep 24, 2015

@shaneknapp Could you take a look at this PR and see whether we can install https://pypi.python.org/pypi/unittest-xml-reporting/1.12.0 on Jenkins?

@gliptak We shouldn't make xmlrunner a requirement on local machines. If it is installed, we output XML. Otherwise, we should fallback to the default behavior. This could be done by catching exceptions at the import line.

@shaneknapp
Copy link
Contributor

could you create a spark issue for the plugin and assign it to me?

also, i won't be able to do this until monday, as i'm about to leave town
for the weekend.

On Thu, Sep 24, 2015 at 2:50 PM, Xiangrui Meng [email protected]
wrote:

@shaneknapp https://github.com/shaneknapp Could you take a look at this
PR and see whether we can install
https://pypi.python.org/pypi/unittest-xml-reporting/1.12.0 on Jenkins?

@gliptak https://github.com/gliptak We shouldn't make xmlrunner a
requirement on local machines. If it is installed, we output XML.
Otherwise, we should fallback to the default behavior. This could be done
by catching exceptions at the import line.


Reply to this email directly or view it on GitHub
#8323 (comment).

@gliptak
Copy link
Contributor Author

gliptak commented Sep 25, 2015

@mengxr Revised.

@SparkQA
Copy link

SparkQA commented Sep 25, 2015

Test build #42996 has finished for PR 8323 at commit 66bdb2b.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mengxr
Copy link
Contributor

mengxr commented Sep 25, 2015

@shaneknapp I created https://issues.apache.org/jira/browse/SPARK-10830 and assigned it to you.

@mengxr
Copy link
Contributor

mengxr commented Sep 25, 2015

test this please

@SparkQA
Copy link

SparkQA commented Sep 25, 2015

Test build #43015 has finished for PR 8323 at commit 66bdb2b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mengxr
Copy link
Contributor

mengxr commented Sep 28, 2015

test this please

@mengxr
Copy link
Contributor

mengxr commented Sep 28, 2015

unittest-xml-reporting is installed on AMPLab Jenkins. So let's call Jenkins again.

@SparkQA
Copy link

SparkQA commented Sep 29, 2015

Test build #1821 has finished for PR 8323 at commit 66bdb2b.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gliptak
Copy link
Contributor Author

gliptak commented Sep 29, 2015

https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/1810/testReport/

doesn't seem to list the Python tests.

Can somebody with access to Jenkins configuration review?

Thanks

@shaneknapp
Copy link
Contributor

i'll take a look at the config tomorrow

On Mon, Sep 28, 2015 at 6:02 PM, gliptak [email protected] wrote:

https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/1810/testReport/

doesn't seem to list the Python tests.

Can somebody with access to Jenkins configuration review?

Thanks


Reply to this email directly or view it on GitHub
#8323 (comment).

@mengxr
Copy link
Contributor

mengxr commented Sep 30, 2015

test this please

@SparkQA
Copy link

SparkQA commented Sep 30, 2015

Test build #43109 has finished for PR 8323 at commit cd654c7.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mengxr
Copy link
Contributor

mengxr commented Sep 30, 2015

test this please

@SparkQA
Copy link

SparkQA commented Sep 30, 2015

Test build #43113 has finished for PR 8323 at commit cd654c7.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gliptak
Copy link
Contributor Author

gliptak commented Sep 30, 2015

@mengxr Thank you for guiding this

@mengxr
Copy link
Contributor

mengxr commented Oct 2, 2015

test this please

@mengxr
Copy link
Contributor

mengxr commented Oct 2, 2015

it seems that this PR has a higher-than-normal failure rate .. I don't know why. +@davies

@SparkQA
Copy link

SparkQA commented Oct 2, 2015

Test build #43176 has finished for PR 8323 at commit cd654c7.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mengxr
Copy link
Contributor

mengxr commented Oct 5, 2015

test this please

@SparkQA
Copy link

SparkQA commented Oct 5, 2015

Test build #43252 has finished for PR 8323 at commit cd654c7.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@JoshRosen
Copy link
Contributor

Huh, looks like the last two failures were for the same PySpark test:

======================================================================
FAIL [0.000s]: test_pickling_file_handles (__main__.SerializationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/workspace/SparkPullRequestBuilder/python/pyspark/tests.py", line 259, in test_pickling_file_handles
    self.assertEqual(out1, out2)
AssertionError: <StringIO.StringIO instance at 0x2d65a28> != <StringIO.StringIO instance at 0x2ffdb90>

@JoshRosen
Copy link
Contributor

I guess that this doesn't handle doctests, right? Is there any way to get XML for those, too? If not, could you edit the PR title / description to reflect this?

@JoshRosen
Copy link
Contributor

@gliptak, can you try to reproduce the failure locally? See ./pyspark/run-tests --help for hints on how to run only this test suite under Python 2.6.

@gliptak
Copy link
Contributor Author

gliptak commented Oct 7, 2015

@JoshRosen I do not have python2.6 installed (or available as a package) locally

@gliptak
Copy link
Contributor Author

gliptak commented Oct 8, 2015

@JoshRosen How are the doctest-s triggered on the commandline and in Jenkins?

$ python/run-tests --help
No handlers could be found for logger "root"
Usage: run-tests [options]

Options:
  -h, --help            show this help message and exit
  --python-executables=PYTHON_EXECUTABLES
                        A comma-separated list of Python executables to test
                        against (default: python,python3.4)
  --modules=MODULES     A comma-separated list of Python modules to test
                        (default: pyspark-core,pyspark-ml,pyspark-mllib
                        ,pyspark-sql,pyspark-streaming)
  -p PARALLELISM, --parallelism=PARALLELISM
                        The number of suites to test in parallel (default 4)
  --verbose             Enable additional debug logging

@gliptak
Copy link
Contributor Author

gliptak commented Oct 14, 2015

What is the next step on this pull request? Thanks

@mengxr
Copy link
Contributor

mengxr commented Oct 16, 2015

@gliptak I had an offline discussion with @davies . Let's do the following:

  1. Change L259 in pyspark/tests.py to:

      # Regression test for SPARK-3415
      def test_pickling_file_handles(self):
          # JIRA number here
          if xmlrunner is None:
              ser = CloudPickleSerializer()
              out1 = sys.stderr
              out2 = ser.loads(ser.dumps(out1))
              self.assertEqual(out1, out2)

    Create a JIRA for this so we remember to fix it. The issue is CloudPickeSerializer wraps stderr, which conflicts with xmlrunner. But it might take some time to fix.

  2. Change the PR title to `Python unit tests" since we do not report doctests.

Then we can run Jenkins again and see whether it works.

@gliptak gliptak changed the title SPARK-7021 Add JUnit output for Python tests SPARK-7021 Add JUnit output for Python unit tests Oct 16, 2015
@SparkQA
Copy link

SparkQA commented Oct 16, 2015

Test build #43863 has finished for PR 8323 at commit 177fef9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@davies
Copy link
Contributor

davies commented Oct 16, 2015

Right now, all the Python unit tests are in the package of (root), is there a way to set a package for it (such as pyspark)?

@gliptak
Copy link
Contributor Author

gliptak commented Oct 16, 2015

@davies Not that I see. I opened xmlrunner/unittest-xml-reporting#95 to discuss.

@gliptak
Copy link
Contributor Author

gliptak commented Oct 16, 2015

@JoshRosen I opened xmlrunner/unittest-xml-reporting#94 to discuss doctests processing.

@mengxr
Copy link
Contributor

mengxr commented Oct 22, 2015

This looks good to me. I think we can address the test namespace issue in a later PR. @davies @JoshRosen ?

@davies
Copy link
Contributor

davies commented Oct 22, 2015

LGTM, merging this into master, thanks!

@asfgit asfgit closed this in 163d53e Oct 22, 2015
@gliptak
Copy link
Contributor Author

gliptak commented Oct 22, 2015

As per xmlrunner/unittest-xml-reporting#95 the Python tests do not have packages (or possibly not being recognized by https://github.com/xmlrunner/unittest-xml-reporting/

@gliptak
Copy link
Contributor Author

gliptak commented Oct 24, 2015

Adding packages to XMLs at #9263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants