You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@livy.apache.org by "nileshrathi345 (via GitHub)" <gi...@apache.org> on 2026/10/27 16:04:17 UTC
[PR] [LIVY-1094] Redirect os.system output through Python REPL stdout capture [livy]
nileshrathi345 opened a new pull request, #569:
URL: https://github.com/apache/livy/pull/569
os.system writes to the process stdout pipe and can desynchronize Livy statement JSON replies, which mis-associates Zeppelin paragraph output.
## What changes were proposed in this pull request?
Redirect `os.system()` in the Python REPL (fake_shell.py) through `subprocess` and `print()` so shell output goes into Livy’s captured stdout and stays on the correct statement JSON line (fixes Zeppelin paragraph output appearing under the wrong cell when shell commands bypass `sys.stdout`).
Added regression tests in PythonInterpreterSpec.scala for `os.system` (simple, conditional, multiple calls, stderr merged).
JIRA: [LIVY-1094](https://issues.apache.org/jira/browse/LIVY-1094)
## How was this patch tested?
`mvn test -pl repl/scala-2.13 -am -Dtest=org.apache.livy.repl.PythonInterpreterSpec -DfailIfNoTests=false`
— all tests passed, including four new os.system cases.
## Was this patch authored or co-authored using generative AI tooling?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@livy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LIVY-1094] Redirect os.system output through Python REPL stdout capture [livy]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #569:
URL: https://github.com/apache/livy/pull/569#issuecomment-6453858759
## [Codecov](https://app.codecov.io/gh/apache/livy/pull/569?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 69.11%. Comparing base ([`fc5f238`](https://app.codecov.io/gh/apache/livy/commit/fc5f2387be5682f880503ad98b4fcec3bfa190aa?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7afd9a6`](https://app.codecov.io/gh/apache/livy/commit/7afd9a6078cf8f0b8c2944cc2524edf861711b14?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 2 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #569 +/- ##
============================================
+ Coverage 69.03% 69.11% +0.07%
Complexity 1231 1231
============================================
Files 107 107
Lines 6986 6980 -6
Branches 858 862 +4
============================================
+ Hits 4823 4824 +1
+ Misses 1689 1683 -6
+ Partials 474 473 -1
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/livy/pull/569?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@livy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org