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

ShellTask: stores process return code, stdout and stderr for later use. #2229

Merged
merged 2 commits into from
Mar 10, 2024
Merged

ShellTask: stores process return code, stdout and stderr for later use. #2229

merged 2 commits into from
Mar 10, 2024

Conversation

benoistlaurent
Copy link
Contributor

@benoistlaurent benoistlaurent commented Mar 1, 2024

Fixes #4888.

Tracking issue

flyteorg/flyte#4888
followed by @eapolinario

Why are the changes needed?

What changes were proposed in this pull request?

  • Creation of a structure named ProcessResult to store a subprocess return code, stdout and stderr
  • Functions now return an instance of ProcessResult instead of Tuple[str, str]
  • ShellTask stores an instance of ProcessResult

How was this patch tested?

  • ./tests/flytekit/unit/extras/tasks/test_shell.py:

    • test_shell_task_access_to_result added
    • test_subproc_execute() adapted to accommodate subproc_execute new return type
  • I updated the documentation accordingly.

  • All new and existing tests passed.

  • All commits are signed-off.

Copy link

welcome bot commented Mar 1, 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:M This PR changes 30-99 lines, ignoring generated files. label Mar 1, 2024
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.98%. Comparing base (eb20459) to head (ff32fec).
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2229      +/-   ##
==========================================
+ Coverage   84.74%   85.98%   +1.24%     
==========================================
  Files         315      320       +5     
  Lines       24142    24255     +113     
  Branches     3666     3668       +2     
==========================================
+ Hits        20458    20855     +397     
+ Misses       3025     2748     -277     
+ Partials      659      652       -7     

☔ 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 10, 2024
@pingsutw pingsutw merged commit 96f2b2a into flyteorg:master Mar 10, 2024
89 of 92 checks passed
Copy link

welcome bot commented Mar 10, 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
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:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants