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

Add stdin_heartbeat flag to container exec #2602

Closed
wants to merge 2 commits into from

Conversation

azliu0
Copy link
Contributor

@azliu0 azliu0 commented Dec 3, 2024

Adds disable_stdin_heartbeat to ContainerExecRequest, giving us direct control over the stdin timeout behavior for Sandbox.exec instead of using pty_info as a proxy.

For backwards compatibility, the corresponding worker changes will still look at pty_info but will also check whether this flag is set to True as an override.

Backward/forward compatibility checks

Check these boxes or delete any item (or this section) if not relevant for this PR.

  • Client+Server: this change is compatible with old servers
  • Client forward compatibility: this change ensures client can accept data intended for later versions of itself

Note on protobuf: protobuf message changes in one place may have impact to
multiple entities (client, server, worker, database). See points above.


@azliu0 azliu0 requested a review from pawalt December 3, 2024 16:07
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to d07183c in 52 seconds

More details
  • Looked at 42 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. modal/cli/container.py:71
  • Draft comment:
    Consider setting disable_stdin_heartbeat to True if the intent is to disable the stdin timeout for long-running processes. Currently, it is set to False, which might not align with the intended use case described in the PR.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is speculative and does not provide strong evidence that the current setting is incorrect. It assumes an intent without clear justification. The code explicitly sets disable_stdin_heartbeat to False, which might be intentional. The comment does not suggest a clear code change required.
    I might be missing the context of why disable_stdin_heartbeat is set to False. However, without strong evidence or a clear issue, the comment remains speculative.
    The comment does not provide strong evidence or a clear issue with the current code. It is speculative and assumes intent without justification.
    Delete the comment as it is speculative and does not provide strong evidence of an issue.

Workflow ID: wflow_S4aoDoTXIIn1LYek


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@azliu0 azliu0 closed this Dec 3, 2024
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.

1 participant