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

entrypoint.py: Explicitly import exit from sys #2259

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

WebOfNakedFancies
Copy link
Contributor

Why are the changes needed?

entrypoint.py calls exit(1) when the env var "FLYTE_FAIL_ON_ERROR" is set.
When using the Spark plugin for Databricks jobs,
this results in NameError: name 'exit' is not defined exception,
where a successful exit with return code 1 was expected.

Behavior confirmed for both Databricks Runtime 13.3 LTS (Apache Spark 3.4.1, python 3.10)
and Databricks Runtime 10.4 LTS (Apache Spark 3.2.1, python 3.8)

What changes were proposed in this pull request?

Explicitly importing the exit function from the sys module should fix this.

How was this patch tested?

Setup process

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Copy link

welcome bot commented Mar 12, 2024

Thank you for opening this pull request! 🙌

These tips will help get your PR across the finish line:

  • Most of the repos have a PR template; if not, fill it out to the best of your knowledge.
  • Sign off your commits (Reference: DCO Guide).

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 12, 2024
Signed-off-by: WebOfNakedFancies <[email protected]>
Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.06%. Comparing base (7144ae9) to head (fa17fc0).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2259      +/-   ##
==========================================
- Coverage   83.78%   83.06%   -0.73%     
==========================================
  Files         332      287      -45     
  Lines       25093    22972    -2121     
  Branches     3690     3478     -212     
==========================================
- Hits        21025    19082    -1943     
+ Misses       3448     3268     -180     
- Partials      620      622       +2     

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

@dosubot dosubot bot added the lgtm This PR has been approved by maintainer label Mar 12, 2024
@pingsutw pingsutw merged commit a2888cf into flyteorg:master Mar 12, 2024
46 of 47 checks passed
Copy link

welcome bot commented Mar 12, 2024

Congrats on merging your first pull request! 🎉

austin362667 pushed a commit to austin362667/flytekit that referenced this pull request Mar 16, 2024
fiedlerNr9 pushed a commit that referenced this pull request Jul 25, 2024
Signed-off-by: WebOfNakedFancies <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants