Skip to content

[SPARK-31153][BUILD][3.0] Cleanup several failures in lint-python - #27917

Closed
nchammas wants to merge 1 commit into
apache:branch-3.0from
nchammas:SPARK-31153-lint-python-branch-3.0
Closed

[SPARK-31153][BUILD][3.0] Cleanup several failures in lint-python#27917
nchammas wants to merge 1 commit into
apache:branch-3.0from
nchammas:SPARK-31153-lint-python-branch-3.0

Conversation

@nchammas

Copy link
Copy Markdown
Contributor

Backport of #27910 / 0ce5519.


This PR cleans up several failures -- most of them silent -- in dev/lint-python. I don't understand how we haven't been bitten by these yet. Perhaps we've been lucky?

Fixes include:

  • Fix how we compare versions. All the version checks currently in master silently fail with:

     File "<string>", line 2
    print(LooseVersion("""2.3.1""") >= LooseVersion("""2.4.0"""))
    ^
    IndentationError: unexpected indent
    

    Another problem is that distutils.version is undocumented and unsupported.

  • Fix some basic bugs. e.g. We have an incorrect reference to $PYDOCSTYLEBUILD, which doesn't exist, which was causing the doc style test to silently fail with:

    ./dev/lint-python: line 193: --version: command not found
    
  • Stop suppressing error output! It's hiding problems and serves no purpose here.

lint-python is part of our CI build and is currently doing any combination of the following: silently failing; incorrectly skipping tests; incorrectly downloading libraries when a suitable library is already available.

This PR cleans up several failures -- most of them silent -- in `dev/lint-python`. I don't understand how we haven't been bitten by these yet. Perhaps we've been lucky?
Fixes include:
* Fix how we compare versions. All the version checks currently in `master` silently fail with:
```
File "<string>", line 2
print(LooseVersion("""2.3.1""") >= LooseVersion("""2.4.0"""))
^
IndentationError: unexpected indent
```
Another problem is that `distutils.version` is undocumented and unsupported.
* Fix some basic bugs. e.g. We have an incorrect reference to `$PYDOCSTYLEBUILD`, which doesn't exist, which was causing the doc style test to silently fail with:
```
./dev/lint-python: line 193: --version: command not found
```
* Stop suppressing error output! It's hiding problems and serves no purpose here.
`lint-python` is part of our CI build and is currently doing any combination of the following: silently failing; incorrectly skipping tests; incorrectly downloading libraries when a suitable library is already available.
No.
Lots of manual testing with `set -x` enabled.
Closesapache#27910 from nchammas/SPARK-31153-lint-python.
Authored-by: Nicholas Chammas <nicholas.chammas@liveramp.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@HyukjinKwonHyukjinKwon changed the title [SPARK-31153][BUILD] Cleanup several failures in lint-python[SPARK-31153][BUILD][3.0] Cleanup several failures in lint-pythonMar 15, 2020
@nchammas

Copy link
Copy Markdown
ContributorAuthor

cc @HyukjinKwon. It's my first time backporting a change. Did I do it right? Contributing guide doesn't say much about how to do it.

@HyukjinKwonHyukjinKwon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM pending Jenkins and Github Action tests, assuming it's also manually tested (e.g., version checking when it's not installed)

@HyukjinKwon

Copy link
Copy Markdown
Member

@nchammas sure, looks good! one nit in the PR title I fixed.

@nchammas

Copy link
Copy Markdown
ContributorAuthor

assuming it's also manually tested (e.g., version checking when it's not installed)

Can confirm I tested it manually with set -x enabled and inspected the output carefully.

@SparkQA

Copy link
Copy Markdown

Test build #119810 has finished for PR 27917 at commit 462537d.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@nchammas

Copy link
Copy Markdown
ContributorAuthor

Retest this please.

@SparkQA

Copy link
Copy Markdown

Test build #119814 has finished for PR 27917 at commit 462537d.

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

@HyukjinKwon

Copy link
Copy Markdown
Member

Merged to branch-3.0.

Thank you @nchammas for working on this.

HyukjinKwon pushed a commit that referenced this pull request Mar 16, 2020
Backport of #27910 / 0ce5519.
---
This PR cleans up several failures -- most of them silent -- in `dev/lint-python`. I don't understand how we haven't been bitten by these yet. Perhaps we've been lucky?
Fixes include:
* Fix how we compare versions. All the version checks currently in `master` silently fail with:
```
File "<string>", line 2
print(LooseVersion("""2.3.1""") >= LooseVersion("""2.4.0"""))
^
IndentationError: unexpected indent
```
Another problem is that `distutils.version` is undocumented and unsupported.
* Fix some basic bugs. e.g. We have an incorrect reference to `$PYDOCSTYLEBUILD`, which doesn't exist, which was causing the doc style test to silently fail with:
```
./dev/lint-python: line 193: --version: command not found
```
* Stop suppressing error output! It's hiding problems and serves no purpose here.
`lint-python` is part of our CI build and is currently doing any combination of the following: silently failing; incorrectly skipping tests; incorrectly downloading libraries when a suitable library is already available.
Closes#27917 from nchammas/SPARK-31153-lint-python-branch-3.0.
Authored-by: Nicholas Chammas <nicholas.chammas@liveramp.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@nchammas
nchammas deleted the SPARK-31153-lint-python-branch-3.0 branch March 16, 2020 15:03
Sign up for freeto 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.

3 participants

@nchammas@HyukjinKwon@SparkQA