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

[BUG] No automated tests for REPLs (pyspark, spark-shell, notebooks) #5704

Open
1 of 3 tasks
Tracked by #5757
gerashegalov opened this issue Jun 1, 2022 · 3 comments
Open
1 of 3 tasks
Tracked by #5757
Assignees
Labels
bug Something isn't working reliability Features to improve reliability or bugs that severly impact the reliability of the plugin

Comments

@gerashegalov
Copy link
Collaborator

gerashegalov commented Jun 1, 2022

Describe the bug
Our codebase contains classloading-sensitve code such as

  • code to support external sources such as Avro.
  • Shim loading from parallel worlds

Classloader architecture in REPLs is different and much more complicated than in batch spark-submitted Spark apps.

REPL's such as jupyter and Databricks notebooks are tested late in the dev-cycle manually. Bugs are detected too late into the release #3760.

We need to shift-left detection of breaking changes by automating manual notebook/REPL tests.

Steps/Code to reproduce bug
Various

Expected behavior
Catch bugs in REPLs and Notebooks no later than nightly tests

Environment details (please complete the following information)
Databricks, local REPL

Additional context
#5646

Tasks

  1. test
    gerashegalov
@gerashegalov gerashegalov added bug Something isn't working ? - Needs Triage Need team to review and classify reliability Features to improve reliability or bugs that severly impact the reliability of the plugin labels Jun 1, 2022
@sameerz sameerz removed the ? - Needs Triage Need team to review and classify label Jun 14, 2022
@GaryShen2008
Copy link
Collaborator

GaryShen2008 commented Jul 13, 2022

We have some notebooks testing on Databricks almost every day.
If there's no requirement for a special test case, I think notebook should have been covered.
@gerashegalov Which test cases do we want to run by pyspark, spark-shell?

@gerashegalov
Copy link
Collaborator Author

Thanks @GaryShen2008 ! This is great! We need to do some forensics with @tgravescs to dig out the notebook that was responsible for #3760 to include this test case into our daily notebook testing.

@tgravescs
Copy link
Collaborator

I don't know what notebook showed this so we would have to go back to try to reproduce

gerashegalov added a commit to gerashegalov/spark-rapids that referenced this issue Oct 20, 2023
@gerashegalov gerashegalov self-assigned this Oct 20, 2023
gerashegalov added a commit that referenced this issue Oct 24, 2023
)

Contributes to #5704

This PR aims to catch issues like #9500. It modifies run_pyspark_from_build mostly to avoid recreating the logic of figuring out jar location etc.

Currently it may not catch this if do not have Spark 3.5.0 CI yet. But this is how it could reproduce the #9500 

```Bash
$ SPARK_HOME=~/dist/spark-3.1.1-bin-hadoop3.2 SPARK_SHELL_SMOKE_TEST=1 ./integration_tests/run_pyspark_from_build.sh
...
+ grep -F 'res0: Array[org.apache.spark.sql.Row] = Array([4950])'
res0: Array[org.apache.spark.sql.Row] = Array([4950])
+ echo 'SUCCESS spark-shell smoke test...'
SUCCESS spark-shell smoke test
$ echo $?
0

$ SPARK_HOME=~/dist/spark-3.5.0-bin-hadoop3 SPARK_SHELL_SMOKE_TEST=1 ./integration_tests/run_pyspark_from_build.sh
$ echo $?
1

SPARK_SHELL_SMOKE_TEST=1 \
  PYSP_TEST_spark_shuffle_manager=com.nvidia.spark.rapids.spark311.RapidsShuffleManager \
  SPARK_HOME=~/dist/spark-3.1.1-bin-hadoop3.2 \
  ./integration_tests/run_pyspark_from_build.sh
+ echo 'SUCCESS spark-shell smoke test'
SUCCESS spark-shell smoke test
$ echo $?
0

SPARK_SHELL_SMOKE_TEST=1 \
  PYSP_TEST_spark_shuffle_manager=com.nvidia.spark.rapids.spark350.RapidsShuffleManager \
  SPARK_HOME=~/dist/spark-3.5.0-bin-hadoop3 \
  ./integration_tests/run_pyspark_from_build.sh
$ echo $?
1
```

Signed-off-by: Gera Shegalov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reliability Features to improve reliability or bugs that severly impact the reliability of the plugin
Projects
None yet
Development

No branches or pull requests

4 participants