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

Update debug instruction for SSH Box #1425

Merged
merged 3 commits into from Apr 30, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion opendevin/sandbox/docker/ssh_box.py
Expand Up @@ -176,7 +176,9 @@ def start_ssh_session(self):
else:
username = 'root'
logger.info(
f"Connecting to {username}@{hostname} via ssh. If you encounter any issues, you can try `ssh -v -p {self._ssh_port} {username}@{hostname}` with the password '{self._ssh_password}' and report the issue on GitHub."
f"Connecting to {username}@{hostname} via ssh. "
Copy link
Collaborator

@li-boxuan li-boxuan Apr 28, 2024

Choose a reason for hiding this comment

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

@Borda This shouldn't pass CI linter test as it's using double quotes instead of single quotes... but it does pass CI.

I verified locally that a revert of your e32d95c would report this as lint error, as expected. Could you please check this? Otherwise we may have to revert the PR #1204

Copy link
Contributor

@Borda Borda Apr 28, 2024

Choose a reason for hiding this comment

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

Sure, let me check it on Monday, ref: astral-sh/ruff#7834 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

well, found that format was not ever called correctly; see #1457
but still not resolved fully the single-quote issues yet

Copy link
Collaborator

Choose a reason for hiding this comment

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

The last resort would be to add flake8 back, maybe after ruff, since flake8 only detects but doesn't do the fix.

Copy link
Contributor

Choose a reason for hiding this comment

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

reported in astral-sh/ruff#11209

Copy link
Collaborator

@li-boxuan li-boxuan May 1, 2024

Choose a reason for hiding this comment

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

Apparently they intentionally don't want to enforce quote behavior here. I think that's fine. We already disabled black's quote style fix in pyproject.toml, so we won't see people's IDE plugins changing this line from single to double and from double to single endlessly (unless they manually do so).

f"If you encounter any issues, you can try `ssh -v -p {self._ssh_port} {username}@{hostname}` with the password '{self._ssh_password}' and report the issue on GitHub. "
f"If you started OpenDevin with `docker run`, you should try `ssh -v -p {self._ssh_port} {username}@localhost` with the password '{self._ssh_password} on the host machine (where you started the container)."
)
self.ssh.login(hostname, username, self._ssh_password,
port=self._ssh_port)
Expand Down