Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-29777][FOLLOW-UP][SPARKR] Remove no longer valid test for recursive calls #27363

Closed
wants to merge 1 commit into from

Conversation

zero323
Copy link
Member

@zero323 zero323 commented Jan 26, 2020

What changes were proposed in this pull request?

Disabling test for cleaning closure of recursive function.

Why are the changes needed?

As of 9514b82 this test is no longer valid, and recursive calls, even simple ones:

  f <- function(x) {
    if(x > 0) {
      f(x - 1)
    } else {
      x
    }
  }

lead to

Error: node stack overflow

This is issue is silenced when tested with testthat 1.x (reason unknown), but cause failures when using testthat 2.x (issue can be reproduced outside test context).

Problem is known and tracked by SPARK-30629

Therefore, keeping this test active doesn't make sense, as it will lead to continuous test failures, when testthat is updated (#27359 / SPARK-23435).

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing tests.

CC @falaki

Signed-off-by: zero323 <mszymkiewicz@gmail.com>
@zero323 zero323 requested a review from mengxr January 26, 2020 03:52
expect_true("f" %in% ls(env))
# Enable once SPARK-30629 is fixed
# nolint start
# expect_true("f" %in% ls(env))
Copy link
Member

Choose a reason for hiding this comment

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

I remember codes in comments break one of the R linter rule. Might be good to double check.

Copy link
Member Author

Choose a reason for hiding this comment

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

They do, that's why it is wrapped with nolint. If I didn't mess up anything, this is cherry picked from previous version of SPARK-23435 proposal, and already passed all tests, but let's see how it goes.

@falaki
Copy link
Contributor

falaki commented Jan 26, 2020

Thanks @zero323

@SparkQA
Copy link

SparkQA commented Jan 26, 2020

Test build #117409 has finished for PR 27363 at commit b552956.

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

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.

Thanks. Since SPARK-29777 is merged to only master, this is only for master. Is it correct?

@dongjoon-hyun
Copy link
Member

Or, do we need to backport SPARK-29777?

@zero323
Copy link
Member Author

zero323 commented Jan 26, 2020

Thanks. Since SPARK-29777 is merged to only master, this is only for master. Is it correct?
Or, do we need to backport SPARK-29777?

It is not my call, but I'd vote against backporting. Despite its value it introduces a breaking change, and as far as I understand, at this point we don't have good fix lined up.

@dongjoon-hyun
Copy link
Member

Thanks for the confirmation. Since this is not a correctness or dataloss issue, it seems to be okay for now.

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, LGTM. (AppVoyer is also finished.)
Merged to master.

@zero323
Copy link
Member Author

zero323 commented Jan 26, 2020

Thanks everyone!

@zero323 zero323 deleted the SPARK-29777-FOLLOWUP branch January 26, 2020 05:17
@HyukjinKwon
Copy link
Member

@dongjoon-hyun, I will backport this to branch-2.4 because if we upgrade R version, that will likely face this issue.

HyukjinKwon pushed a commit that referenced this pull request Jan 26, 2020
…rsive calls

### What changes were proposed in this pull request?

Disabling test for cleaning closure of recursive function.

### Why are the changes needed?

As of 9514b82 this test is no longer valid, and recursive calls, even simple ones:

```lead
  f <- function(x) {
    if(x > 0) {
      f(x - 1)
    } else {
      x
    }
  }
```

lead to

```
Error: node stack overflow
```

This is issue is silenced when tested with `testthat` 1.x (reason unknown), but cause failures when using `testthat` 2.x (issue can be reproduced outside test context).

Problem is known and tracked by [SPARK-30629](https://issues.apache.org/jira/browse/SPARK-30629)

Therefore, keeping this test active doesn't make sense, as it will lead to continuous test failures, when `testthat` is updated (#27359 / SPARK-23435).

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

No.

### How was this patch tested?

Existing tests.

CC falaki

Closes #27363 from zero323/SPARK-29777-FOLLOWUP.

Authored-by: zero323 <mszymkiewicz@gmail.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
@HyukjinKwon
Copy link
Member

Oh, wait SPARK-29777 is in 3.0 only ... Okay. I will revert it back for now. We can handle it later when we actually upgrade in a separate JIRA.

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.

5 participants