Skip to content

Conversation

@nchammas
Copy link
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.

Closes apache#27910 from nchammas/SPARK-31153-lint-python.

Authored-by: Nicholas Chammas <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
@HyukjinKwon HyukjinKwon changed the title [SPARK-31153][BUILD] Cleanup several failures in lint-python [SPARK-31153][BUILD][3.0] Cleanup several failures in lint-python Mar 15, 2020
@nchammas
Copy link
Contributor Author

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.

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

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
Member

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

@nchammas
Copy link
Contributor Author

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

SparkQA commented Mar 15, 2020

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
Contributor Author

Retest this please.

@SparkQA
Copy link

SparkQA commented Mar 15, 2020

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
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 <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
@nchammas nchammas deleted the SPARK-31153-lint-python-branch-3.0 branch March 16, 2020 15:03
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.

3 participants