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

fix: prevent environment pollution when importing pyspark #1552

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

sam-goodwin
Copy link
Contributor

@sam-goodwin sam-goodwin commented Apr 3, 2024

Closes: #1551

  • Change catch to a finally to ensure environment is always popped when probing for pyspark.pandas in external_config.py
  • Keep track of dirty state and only pop environment variables that were modified

Signed-off-by: Sam Goodwin <sam@packyak.ai>
Signed-off-by: Sam Goodwin <sam@packyak.ai>
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.07%. Comparing base (4df61da) to head (01e0cea).
Report is 51 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1552       +/-   ##
===========================================
- Coverage   94.29%   83.07%   -11.22%     
===========================================
  Files          91      111       +20     
  Lines        7024     8191     +1167     
===========================================
+ Hits         6623     6805      +182     
- Misses        401     1386      +985     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cosmicBboy
Copy link
Collaborator

thanks for the fix!

@cosmicBboy cosmicBboy merged commit c971c8c into unionai-oss:main Apr 3, 2024
73 of 74 checks passed
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.

import pandera breaks SparkSession in AWS EMR
2 participants