Skip to content

Conversation

@nchammas
Copy link
Contributor

@nchammas nchammas commented Mar 14, 2020

What changes were proposed in this pull request?

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.

Why are the changes needed?

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.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Lots of manual testing with set -x enabled.

@SparkQA
Copy link

SparkQA commented Mar 14, 2020

Test build #119787 has finished for PR 27910 at commit 51488cf.

  • 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

nchammas commented Mar 14, 2020

Both Jenkins and GitHub are reporting:

The pydocstyle command was not found. Skipping pydocstyle checks for now.

So we are not running doc style tests anywhere...

I will address this in a separate PR.

@SparkQA
Copy link

SparkQA commented Mar 14, 2020

Test build #119793 has finished for PR 27910 at commit 5ad9396.

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

@SparkQA
Copy link

SparkQA commented Mar 14, 2020

Test build #119792 has finished for PR 27910 at commit 02184d3.

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

@srowen
Copy link
Member

srowen commented Mar 14, 2020

I think it's OK if it fixes the linter, and doesn't uncover old failures that would currently fail.

@nchammas
Copy link
Contributor Author

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Mar 14, 2020

Test build #119801 has finished for PR 27910 at commit 5ad9396.

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

RUN_LOCAL_PYCODESTYLE="False"
if hash "$PYCODESTYLE_BUILD" 2> /dev/null; then
VERSION=$( $PYCODESTYLE_BUILD --version 2> /dev/null)
EXPECTED_PYCODESTYLE=$( ("$PYTHON_EXECUTABLE" -c 'from distutils.version import LooseVersion;
Copy link
Member

Choose a reason for hiding this comment

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

I think it was mistakenly re-indented at 42c4838#diff-ccd847a0316575dde31bd89786bbe1f2. cc @shaneknapp FYI

@HyukjinKwon
Copy link
Member

HyukjinKwon commented Mar 15, 2020

It fixes a bunch of mistakes we should avoid in general ...

@HyukjinKwon
Copy link
Member

HyukjinKwon commented Mar 15, 2020

Merged to master.

@HyukjinKwon
Copy link
Member

@nchammas, it has conflicts with branch-3.0. Do you mind if I ask to make a backporting PR? We should port it back to branch-3.0 as 42c4838 laded to to branch-3.0 too.

@nchammas nchammas deleted the SPARK-31153-lint-python branch March 15, 2020 04:16
nchammas added a commit to nchammas/spark that referenced this pull request Mar 15, 2020
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 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]>
HyukjinKwon pushed a commit that referenced this pull request Mar 17, 2020
### What changes were proposed in this pull request?

As discovered here #27910 (comment), pydocstyle tests were not running anywhere (not on Jenkins; not on GitHub).

~This PR enables those tests.~

It also seems like a [large hill to climb](#27912 (comment)) to enable any meaningful checks, so we're going to just rip pydocstyle out for now.

### Why are the changes needed?

Presumably, we defined those doc style tests because we care about whatever it is they enforce. Since we're not actually testing anything, though, it's better to clear the cruft.

### Does this PR introduce any user-facing change?

No.

### How was this patch tested?

Will check the GitHub workflow logs on this PR.

Closes #27912 from nchammas/SPARK-31155-pydocstyle.

Authored-by: Nicholas Chammas <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
HyukjinKwon pushed a commit that referenced this pull request Mar 17, 2020
### What changes were proposed in this pull request?

As discovered here #27910 (comment), pydocstyle tests were not running anywhere (not on Jenkins; not on GitHub).

~This PR enables those tests.~

It also seems like a [large hill to climb](#27912 (comment)) to enable any meaningful checks, so we're going to just rip pydocstyle out for now.

### Why are the changes needed?

Presumably, we defined those doc style tests because we care about whatever it is they enforce. Since we're not actually testing anything, though, it's better to clear the cruft.

### Does this PR introduce any user-facing change?

No.

### How was this patch tested?

Will check the GitHub workflow logs on this PR.

Closes #27912 from nchammas/SPARK-31155-pydocstyle.

Authored-by: Nicholas Chammas <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
(cherry picked from commit b4748ca)
Signed-off-by: HyukjinKwon <[email protected]>
@shaneknapp
Copy link
Contributor

shaneknapp commented Mar 17, 2020 via email

sjincho pushed a commit to sjincho/spark that referenced this pull request Apr 15, 2020
### What changes were proposed in this pull request?

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.

### Why are the changes needed?

`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.

### Does this PR introduce any user-facing change?

No.

### How was this patch tested?

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]>
sjincho pushed a commit to sjincho/spark that referenced this pull request Apr 15, 2020
### What changes were proposed in this pull request?

As discovered here apache#27910 (comment), pydocstyle tests were not running anywhere (not on Jenkins; not on GitHub).

~This PR enables those tests.~

It also seems like a [large hill to climb](apache#27912 (comment)) to enable any meaningful checks, so we're going to just rip pydocstyle out for now.

### Why are the changes needed?

Presumably, we defined those doc style tests because we care about whatever it is they enforce. Since we're not actually testing anything, though, it's better to clear the cruft.

### Does this PR introduce any user-facing change?

No.

### How was this patch tested?

Will check the GitHub workflow logs on this PR.

Closes apache#27912 from nchammas/SPARK-31155-pydocstyle.

Authored-by: Nicholas Chammas <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
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.

5 participants