Proxy doesn't work, while executing jail_code there is no output displayed
還沒有人認領這個 Issue。
評估
研究方向
首先,使用已設定的 CODEJAIL_TEST_USER/ENV 和 CODEJAIL_PROXY 設定重現所提供的 Python 程式碼片段,然後追蹤 jail_code.jail_code(...) 以及 proxy 對 stdout 的處理。確認是否預期漸進式輸出,或是否僅支援 res.stdout;當行為已釐清,且如果這是 bug,已由適當的回歸測試涵蓋時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
Hello,
I would like to execute this python code (containing a print statement and a sleep call for 1 second for each iteration of the range(5)).
The idea was to test and see if PROXY is working as desired. I was excepting to see while executing jail_code.jail_code(...) in the stdout of my terminal progressively displayed the numbers second by second:
1
2
3
4
full-output
- 0
- 1
- 2
- 3
- 4
but didn't happened..
First one should be the output printed by the proxy, and the second one is when I iterate on the result object stdout.
from codejail import jail_code
jail_code.set_limit("REALTIME", 20)
jail_code.set_limit("CPU", 100)
jail_code.set_limit("FSIZE", 10000)
jail_code.set_limit("PROXY", 1)
code = """
import time
for i in range(5):
print(i)
time.sleep(1)
"""
res = jail_code.jail_code(
"python",
code
)
print("full-output")
for line in res.stdout.decode('utf-8').split('\n'):
print("-", line)
The issue here is that during this execution of jail_code.jail_code(...) the PROXY didn't seems to print anything in the output is that normal, I'm missing something ?
Thanks in advance.
PS: I have CODEJAIL_TEST_USER/ENV and CODEJAIL_PROXY configured in my ENV.
- 主要語言
- Python
- 星號
- 477
- 分支
- 83
- 平均合併
- 1 天 8 小時
- 30 天內合併 PR
- 6
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
openedx/codejail 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 35/100
-
難度 2/5 1-3 小時 新手友好度 50/100
-
Stop using global state to store configuration options可能重新可做 關聯的 PR 已關閉且未合併。 未關閉code health
難度 5/5 一週以上 新手友好度 25/100
-
難度 3/5 1-2 天 新手友好度 30/100
-
難度 4/5 3-5 天 新手友好度 35/100
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 64/100
-
難度 2/5 1-3 小時 新手友好度 76/100
btclib-org/btclib-wallet#1045 ·
維護者通常 1 天內回覆
-
area-templates triage:bot-seen triage:needs-human
難度 2/5 1-3 小時 新手友好度 75/100
microsoft/aspire#22356 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
[Train] An elastic ScalingConfig(num_workers=(0, 0)) is accepted and the run waits forever可能已有人在做 @wguo7 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
ray-project/ray#68217 ·
維護者通常 2 天內回覆